[bitnami/common] fix common topology key affinity function (#13593)

* fix common topology key affinity function

Signed-off-by: Kazimieras <kazimieras@omnisend.com>

* remove indent and trim

Signed-off-by: Kazimieras <kazimieras@omnisend.com>

* fix function description

Signed-off-by: Kazimieras <kazimieras@omnisend.com>

Signed-off-by: Kazimieras <kazimieras@omnisend.com>
This commit is contained in:
Kazimieras Černauskis
2022-11-25 11:01:06 +01:00
committed by GitHub
parent 9736ef608a
commit f95dec803b
2 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 2.2.0
appVersion: 2.2.1
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://github.com/bitnami/charts/tree/main/bitnami/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
@@ -20,4 +20,4 @@ sources:
- https://github.com/bitnami/charts
- https://www.bitnami.com/
type: library
version: 2.2.0
version: 2.2.1
+3 -4
View File
@@ -50,8 +50,7 @@ Return a topologyKey definition
{{ include "common.affinities.topologyKey" (dict "topologyKey" "BAR") -}}
*/}}
{{- define "common.affinities.topologyKey" -}}
{{- $topologyKey := default "kubernetes.io/hostname" .topologyKey -}}
{{- $topologyKey | indent 1 -}}
{{ .topologyKey | default "kubernetes.io/hostname" -}}
{{- end -}}
{{/*
@@ -71,7 +70,7 @@ preferredDuringSchedulingIgnoredDuringExecution:
{{- range $key, $value := $extraMatchLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
topologyKey:{{ include "common.affinities.topologyKey" .topologyKey }}
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
weight: 1
{{- end -}}
@@ -91,7 +90,7 @@ requiredDuringSchedulingIgnoredDuringExecution:
{{- range $key, $value := $extraMatchLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
topologyKey:{{ include "common.affinities.topologyKey" .topologyKey }}
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
{{- end -}}
{{/*