diff --git a/functions/kubernetes/charts/shuffle/templates/shuffle-app/_helpers.tpl b/functions/kubernetes/charts/shuffle/templates/shuffle-app/_helpers.tpl index d8718f3e..6195023c 100644 --- a/functions/kubernetes/charts/shuffle/templates/shuffle-app/_helpers.tpl +++ b/functions/kubernetes/charts/shuffle/templates/shuffle-app/_helpers.tpl @@ -89,8 +89,8 @@ Usage: {{ include "shuffle.appInstance.labels" (dict "app" $app "customLabels" .Values.commonLabels "context" $) }} */}} {{- define "shuffle.appInstance.labels" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") $customLabels -}} -{{ include "common.labels.standard" (dict "customLabels" $customLabels "context" $) }} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} +{{ include "common.labels.standard" (dict "customLabels" $customLabels "context" .context) }} app.shuffler.io/name: {{ include "shuffle.appInstance.name" .app }} app.shuffler.io/version: {{ .app.version | quote }} {{- end -}} @@ -101,8 +101,8 @@ Usage: {{ include "shuffle.appInstance.matchLabels" (dict "app" $app "customLabels" .Values.commonLabels "context" $) }} */}} {{- define "shuffle.appInstance.matchLabels" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") $customLabels -}} -{{ include "common.labels.matchLabels" (dict "customLabels" $customLabels "context" $) }} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} +{{ include "common.labels.matchLabels" (dict "customLabels" $customLabels "context" .context) }} app.shuffler.io/name: {{ include "shuffle.appInstance.name" .app }} app.shuffler.io/version: {{ .app.version | quote }} {{- end -}} @@ -113,8 +113,8 @@ Usage: {{ include "shuffle.appInstance.affinities.pods" (dict "type" "soft" "app" $app "customLabels" $podLabels "context" $) -}} */}} {{- define "shuffle.appInstance.affinities.pods" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") .customLabels -}} -{{- $extraMatchLabels := dict "app.shuffler.io/name" (include "shuffle.appInstance.name" .app) "app.shuffler.io/version" (.app.version | quote) }} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-app" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} +{{- $extraMatchLabels := dict "app.shuffler.io/name" (include "shuffle.appInstance.name" .app) "app.shuffler.io/version" (.app.version) }} {{ include "common.affinities.pods" (dict "type" .type "customLabels" $customLabels "context" .context "extraMatchLabels" $extraMatchLabels )}} {{- end -}} diff --git a/functions/kubernetes/charts/shuffle/templates/shuffle-worker/_helpers.tpl b/functions/kubernetes/charts/shuffle/templates/shuffle-worker/_helpers.tpl index d58b3912..ae8565af 100644 --- a/functions/kubernetes/charts/shuffle/templates/shuffle-worker/_helpers.tpl +++ b/functions/kubernetes/charts/shuffle/templates/shuffle-worker/_helpers.tpl @@ -77,8 +77,8 @@ Usage: {{ include "shuffle.workerInstance.labels" (dict "customLabels" $podLabels "context" $) -}} */}} {{- define "shuffle.workerInstance.labels" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") $customLabels -}} -{{ include "common.labels.standard" (dict "customLabels" $customLabels "context" $) }} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} +{{ include "common.labels.standard" (dict "customLabels" $customLabels "context" .context) }} {{- end -}} {{/* @@ -87,8 +87,8 @@ Usage: {{ include "shuffle.workerInstance.matchLabels" (dict "customLabels" $podLabels "context" $) -}} */}} {{- define "shuffle.workerInstance.matchLabels" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") $customLabels -}} -{{ include "common.labels.matchLabels" (dict "customLabels" $customLabels "context" $) }} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} +{{ include "common.labels.matchLabels" (dict "customLabels" $customLabels "context" .context) }} {{- end -}} {{/* @@ -97,7 +97,7 @@ Usage: {{ include "shuffle.workerInstance.affinities.pods" (dict "type" "soft" "customLabels" $podLabels "context" $) -}} */}} {{- define "shuffle.workerInstance.affinities.pods" -}} -{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") .customLabels -}} +{{- $customLabels := mustMerge (dict "app.kubernetes.io/name" "shuffle-worker" "app.kubernetes.io/part-of" "shuffle") (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) -}} {{ include "common.affinities.pods" (dict "type" .type "customLabels" $customLabels "context" .context )}} {{- end -}} diff --git a/functions/kubernetes/charts/shuffle/templates/shuffle-worker/shuffle-worker-vpa.yaml b/functions/kubernetes/charts/shuffle/templates/shuffle-worker/shuffle-worker-vpa.yaml index d8101831..fbad0237 100644 --- a/functions/kubernetes/charts/shuffle/templates/shuffle-worker/shuffle-worker-vpa.yaml +++ b/functions/kubernetes/charts/shuffle/templates/shuffle-worker/shuffle-worker-vpa.yaml @@ -29,7 +29,6 @@ spec: apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment name: {{ include "shuffle.worker.name" . }} - {{- end }} {{- if .Values.worker.autoscaling.vpa.updatePolicy }} updatePolicy: {{- with .Values.worker.autoscaling.vpa.updatePolicy.updateMode }}