From 5d1f7d31649f67e8b1315a1a6e613397eb2a0c76 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 10 Sep 2024 09:16:41 -0800 Subject: [PATCH] Update keda hostname template (#15) Signed-off-by: Tamal Saha --- charts/dbgate/templates/_helpers.tpl | 2 +- charts/kafka-ui/templates/_helpers.tpl | 2 +- charts/mongo-ui/templates/_helpers.tpl | 2 +- charts/pgadmin/templates/_helpers.tpl | 2 +- charts/phpmyadmin/templates/_helpers.tpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/dbgate/templates/_helpers.tpl b/charts/dbgate/templates/_helpers.tpl index a3f953be..dddc2d8e 100644 --- a/charts/dbgate/templates/_helpers.tpl +++ b/charts/dbgate/templates/_helpers.tpl @@ -65,7 +65,7 @@ Create the name of the service account to use Fake keda hostname */}} {{- define "keda.hostname" -}} -{{- printf "dbgate.%s.%s.%s.%s.kubedb.test" .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace | quote }} +{{- list .Chart.Name .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace "kubedb.internal" | compact | join "." | quote }} {{- end }} {{- define "image.dockerHub" -}} diff --git a/charts/kafka-ui/templates/_helpers.tpl b/charts/kafka-ui/templates/_helpers.tpl index 316edb84..c7f9b38d 100644 --- a/charts/kafka-ui/templates/_helpers.tpl +++ b/charts/kafka-ui/templates/_helpers.tpl @@ -86,7 +86,7 @@ This allows us to check if the registry of the image is specified or not. Fake keda hostname */}} {{- define "keda.hostname" -}} -{{- printf "pgadmin.%s.%s.%s.%s.kubedb.test" .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace | quote }} +{{- list .Chart.Name .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace "kubedb.internal" | compact | join "." | quote }} {{- end }} {{- define "image.dockerHub" -}} diff --git a/charts/mongo-ui/templates/_helpers.tpl b/charts/mongo-ui/templates/_helpers.tpl index 8635d528..3fa7471f 100644 --- a/charts/mongo-ui/templates/_helpers.tpl +++ b/charts/mongo-ui/templates/_helpers.tpl @@ -65,7 +65,7 @@ Create the name of the service account to use Fake keda hostname */}} {{- define "keda.hostname" -}} -{{- printf "%s.%s.%s.%s.kubedb.test" .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace | quote }} +{{- list .Chart.Name .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace "kubedb.internal" | compact | join "." | quote }} {{- end }} {{- define "image.dockerHub" -}} diff --git a/charts/pgadmin/templates/_helpers.tpl b/charts/pgadmin/templates/_helpers.tpl index d2673a31..ba700a0b 100644 --- a/charts/pgadmin/templates/_helpers.tpl +++ b/charts/pgadmin/templates/_helpers.tpl @@ -65,7 +65,7 @@ Create the name of the service account to use Fake keda hostname */}} {{- define "keda.hostname" -}} -{{- printf "pgadmin.%s.%s.%s.%s.kubedb.test" .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace | quote }} +{{- list .Chart.Name .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace "kubedb.internal" | compact | join "." | quote }} {{- end }} {{- define "image.dockerHub" -}} diff --git a/charts/phpmyadmin/templates/_helpers.tpl b/charts/phpmyadmin/templates/_helpers.tpl index 4ca0b1e1..059e344b 100644 --- a/charts/phpmyadmin/templates/_helpers.tpl +++ b/charts/phpmyadmin/templates/_helpers.tpl @@ -65,7 +65,7 @@ Create the name of the service account to use Fake keda hostname */}} {{- define "keda.hostname" -}} -{{- printf "%s.%s.%s.%s.kubedb.test" .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace | quote }} +{{- list .Chart.Name .Values.bind.name .Values.bind.namespace .Values.app.service.name .Values.app.service.namespace "kubedb.internal" | compact | join "." | quote }} {{- end }} {{- define "image.dockerHub" -}}