From 42eb718af22a6fde8f87d88841c081dc6a4fb7d5 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Tue, 26 Mar 2024 15:30:01 +0100 Subject: [PATCH] chore(chart): include rollouts cfg for API server Signed-off-by: Hidde Beydals --- charts/kargo/templates/api/configmap.yaml | 6 ++++++ charts/kargo/templates/api/deployment.yaml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/charts/kargo/templates/api/configmap.yaml b/charts/kargo/templates/api/configmap.yaml index 67a160c31..443b752bb 100644 --- a/charts/kargo/templates/api/configmap.yaml +++ b/charts/kargo/templates/api/configmap.yaml @@ -60,4 +60,10 @@ data: ARGOCD_URLS: {{ range $key, $val := .Values.api.argocd.urls }}{{ $key }}={{ $val }},{{- end }} {{- end }} ROLLOUTS_INTEGRATION_ENABLED: {{ quote .Values.api.rollouts.integrationEnabled }} + {{- if .Values.controller.rollouts.integrationEnabled }} + {{- if .Values.kubeconfigSecrets.rollouts }} + ROLLOUTS_KUBECONFIG: /etc/kargo/rollouts-kubeconfig.yaml + {{- end }} + ROLLOUTS_ANALYSIS_RUNS_NAMESPACE: {{ quote .Values.controller.rollouts.analysisRunsNamespace }} + {{- end }} {{- end }} diff --git a/charts/kargo/templates/api/deployment.yaml b/charts/kargo/templates/api/deployment.yaml index fc05371a7..56289272c 100644 --- a/charts/kargo/templates/api/deployment.yaml +++ b/charts/kargo/templates/api/deployment.yaml @@ -69,7 +69,7 @@ spec: {{- end }} initialDelaySeconds: 5 {{- end }} -{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.api.tls.enabled }} +{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.kubeconfigSecrets.rollouts .Values.api.tls.enabled }} volumeMounts: - mountPath: /etc/kargo name: config @@ -77,7 +77,7 @@ spec: {{- end }} resources: {{- toYaml .Values.api.resources | nindent 12 }} -{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.api.tls.enabled }} +{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.kubeconfigSecrets.rollouts .Values.api.tls.enabled }} volumes: - name: config projected: @@ -90,6 +90,14 @@ spec: path: kubeconfig.yaml mode: 0644 {{- end }} +{{- if .Values.kubeconfigSecrets.rollouts }} + - secret: + name: {{ .Values.kubeconfigSecrets.rollouts }} + items: + - key: kubeconfig.yaml + path: rollouts-kubeconfig.yaml + mode: 0644 +{{- end }} {{- if .Values.api.tls.enabled }} - secret: name: kargo-api-cert