diff --git a/charts/coredns/Chart.yaml b/charts/coredns/Chart.yaml index 150348c..ea5230f 100644 --- a/charts/coredns/Chart.yaml +++ b/charts/coredns/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: coredns -version: 1.27.1 +version: 1.28.0 appVersion: 1.11.1 home: https://coredns.io icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png @@ -20,5 +20,5 @@ engine: gotpl type: application annotations: artifacthub.io/changes: | - - kind: fixed - description: Fixed indentation for sidecar containers + - kind: added + description: topologySpreadConstraints can be templated values diff --git a/charts/coredns/templates/deployment.yaml b/charts/coredns/templates/deployment.yaml index fa86957..56e05cc 100644 --- a/charts/coredns/templates/deployment.yaml +++ b/charts/coredns/templates/deployment.yaml @@ -73,7 +73,7 @@ spec: {{- end }} {{- if .Values.topologySpreadConstraints }} topologySpreadConstraints: -{{ toYaml .Values.topologySpreadConstraints | indent 8 }} +{{ tpl (toYaml .Values.topologySpreadConstraints) $ | indent 8 }} {{- end }} {{- if .Values.tolerations }} tolerations: diff --git a/charts/coredns/values.yaml b/charts/coredns/values.yaml index e187c27..b7dad6d 100644 --- a/charts/coredns/values.yaml +++ b/charts/coredns/values.yaml @@ -181,14 +181,23 @@ readinessProbe: affinity: {} # expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#topologyspreadconstraint-v1-core -# for example: +# and supports Helm templating. +# For example: # topologySpreadConstraints: -# - maxSkew: 1 -# topologyKey: zone -# whenUnsatisfiable: DoNotSchedule -# labelSelector: -# matchLabels: -# foo: bar +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: '{{ template "coredns.name" . }}' +# app.kubernetes.io/instance: '{{ .Release.Name }}' +# topologyKey: topology.kubernetes.io/zone +# maxSkew: 1 +# whenUnsatisfiable: ScheduleAnyway +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: '{{ template "coredns.name" . }}' +# app.kubernetes.io/instance: '{{ .Release.Name }}' +# topologyKey: kubernetes.io/hostname +# maxSkew: 1 +# whenUnsatisfiable: ScheduleAnyway topologySpreadConstraints: [] # Node labels for pod assignment