From c182ddb3b3a9fe7494e6cc47610c38f21b8e7c82 Mon Sep 17 00:00:00 2001 From: Miguel Martinez Trivino Date: Thu, 9 Jan 2025 19:32:50 +0100 Subject: [PATCH] feat(chart): allow passing cas external URL explicitly (#1717) Signed-off-by: Miguel Martinez --- deployment/chainloop/Chart.yaml | 2 +- deployment/chainloop/README.md | 1 + deployment/chainloop/templates/_helpers.tpl | 4 +++- deployment/chainloop/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/chainloop/Chart.yaml b/deployment/chainloop/Chart.yaml index 091d3f781..93c15ab7a 100644 --- a/deployment/chainloop/Chart.yaml +++ b/deployment/chainloop/Chart.yaml @@ -7,7 +7,7 @@ description: Chainloop is an open source software supply chain control plane, a type: application # Bump the patch (not minor, not major) version on each change in the Chart Source code -version: 1.167.0 +version: 1.167.1 # Do not update appVersion, this is handled automatically by the release process appVersion: v0.149.0 diff --git a/deployment/chainloop/README.md b/deployment/chainloop/README.md index 2bb208119..93214f818 100644 --- a/deployment/chainloop/README.md +++ b/deployment/chainloop/README.md @@ -726,6 +726,7 @@ chainloop config save \ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | | `cas.replicaCount` | Number of replicas | `2` | | `cas.defaultMaxEntrySize` | Maximum size for each entry in the CAS backend, default 100MB | | +| `cas.externalURL` | Optional External URL for the CAS service. If not set it will be derived from the ingress and service configuration | | | `cas.image.registry` | Image registry | `REGISTRY_NAME` | | `cas.image.repository` | Image repository | `REPOSITORY_NAME` | | `cas.containerPorts.http` | controlplane HTTP container port | `8000` | diff --git a/deployment/chainloop/templates/_helpers.tpl b/deployment/chainloop/templates/_helpers.tpl index 471110ce1..cc096d9aa 100644 --- a/deployment/chainloop/templates/_helpers.tpl +++ b/deployment/chainloop/templates/_helpers.tpl @@ -411,7 +411,9 @@ NOTE: Load balancer service type is not supported {{- $service := .Values.cas.service }} {{- $ingress := .Values.cas.ingress }} -{{- if (and $ingress $ingress.enabled $ingress.hostname) }} +{{- if .Values.cas.externalURL }} +{{- .Values.cas.externalURL }} +{{- else if (and $ingress $ingress.enabled $ingress.hostname) }} {{- printf "%s://%s" (ternary "https" "http" $ingress.tls ) $ingress.hostname }} {{- else if (and (eq $service.type "NodePort") $service.nodePorts (not (empty $service.nodePorts.http))) }} {{- printf "http://localhost:%s" $service.nodePorts.http }} diff --git a/deployment/chainloop/values.yaml b/deployment/chainloop/values.yaml index 7119f5bfd..79dc82ba6 100644 --- a/deployment/chainloop/values.yaml +++ b/deployment/chainloop/values.yaml @@ -930,6 +930,9 @@ cas: ## @extra cas.defaultMaxEntrySize Maximum size for each entry in the CAS backend, default 100MB # defaultMaxEntrySize: 100MB + ## @extra cas.externalURL Optional External URL for the CAS service. If not set it will be derived from the ingress and service configuration + # externalURL: "" + ## @param cas.image.registry [default: REGISTRY_NAME] Image registry ## @param cas.image.repository [default: REPOSITORY_NAME] Image repository ## @skip cas.image.tag