From 651a2891924ab36afc6b105987e5f0369030a9a9 Mon Sep 17 00:00:00 2001 From: Patrick Vickery Date: Thu, 8 Aug 2024 09:46:44 -0400 Subject: [PATCH] Include labelSelector and matchLabelKeys for topologySpreadConstraints --- charts/external-dns/Chart.yaml | 2 +- charts/external-dns/templates/deployment.yaml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/external-dns/Chart.yaml b/charts/external-dns/Chart.yaml index 51f284c8ec..6e0cc55468 100644 --- a/charts/external-dns/Chart.yaml +++ b/charts/external-dns/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: external-dns description: ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. type: application -version: 1.14.5 +version: 1.14.6 appVersion: 0.14.2 keywords: - kubernetes diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml index 71b00937f6..a4a7242a55 100644 --- a/charts/external-dns/templates/deployment.yaml +++ b/charts/external-dns/templates/deployment.yaml @@ -200,7 +200,18 @@ spec: {{- end }} {{- with .Values.topologySpreadConstraints }} topologySpreadConstraints: - {{- toYaml . | nindent 8 }} + {{- range . }} + - {{ toYaml . | nindent 10 | trim }} + {{- if not (hasKey . "labelSelector") }} + labelSelector: + matchLabels: + {{- include "external-dns.selectorLabels" $ | nindent 12 }} + {{- end }} + {{- if not (hasKey . "matchLabelKeys") }} + matchLabelKeys: + - pod-template-hash + {{- end }} + {{- end }} {{- end }} {{- with .Values.tolerations }} tolerations: