From b7f69decf083bf4cccc727fce4197ede4c8834cb Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Wed, 13 Nov 2024 14:06:16 +0530 Subject: [PATCH] set PERCONA_VERSION_SERVICE_URL in everest-operator deployment Signed-off-by: Mayank Shah --- charts/everest/templates/_helpers.tpl | 4 ++++ charts/everest/templates/everest-operator/deployment.yaml | 2 ++ charts/everest/templates/hooks.yaml | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/everest/templates/_helpers.tpl b/charts/everest/templates/_helpers.tpl index 99b49a0f..8192f81e 100644 --- a/charts/everest/templates/_helpers.tpl +++ b/charts/everest/templates/_helpers.tpl @@ -111,3 +111,7 @@ altNames: {{- end }} - localhost {{- end }} + +{{- define "everest.versionMetadataURL" -}} +{{- trimSuffix "/" (default "https://check.percona.com" .Values.versionMetadataURL) -}} +{{- end }} diff --git a/charts/everest/templates/everest-operator/deployment.yaml b/charts/everest/templates/everest-operator/deployment.yaml index a26b13bc..c0144a19 100644 --- a/charts/everest/templates/everest-operator/deployment.yaml +++ b/charts/everest/templates/everest-operator/deployment.yaml @@ -101,6 +101,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name + - name: PERCONA_VERSION_SERVICE_URL + value: {{ printf "%s/%s" (include "everest.versionMetadataURL" .) "versions/v1" }} securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/charts/everest/templates/hooks.yaml b/charts/everest/templates/hooks.yaml index 6cd538a9..8c1008db 100644 --- a/charts/everest/templates/hooks.yaml +++ b/charts/everest/templates/hooks.yaml @@ -1,3 +1,3 @@ {{- if .Values.upgrade.preflightChecks }} -{{- include "everest.preUpgradeChecks" (dict "namespace" (include "everest.namespace" .) "version" .Chart.Version "versionMetadataURL" .Values.versionMetadataURL) }} +{{- include "everest.preUpgradeChecks" (dict "namespace" (include "everest.namespace" .) "version" .Chart.Version "versionMetadataURL" (include "everest.versionMetadataURL" .)) }} {{- end }}