Repository: kubernetes-sigs/external-dns (language: go)

Issue:
external-dns 1.15.1 helm chart does not support nodeAffinity anymore
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!

-->

**What happened**:

A change was made to `affinity` that blocks access to `nodeAffinity`: https://github.com/kubernetes-sigs/external-dns/commit/844bab3158971ce5a0585d1725de5450bab986c7

**What you expected to happen**:

To be able to use `affinity.nodeAffinity` too:  https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#affinity-v1-core

**How to reproduce it (as minimally and precisely as possible)**:

```yaml
     # This will be ignored
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: topology.kubernetes.io/zone
                operator: In
                values:
                - zoneA
                - zoneB
```


Discussion / hints:

Fix patch:
diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml
index 46a41de4fa..ae60cffcf9 100644
--- a/charts/external-dns/templates/deployment.yaml
+++ b/charts/external-dns/templates/deployment.yaml
@@ -204,6 +204,10 @@ spec:
       {{- end }}
       {{- with .Values.affinity }}
       affinity:
+      {{- with .nodeAffinity }}
+        nodeAffinity:
+          {{- toYaml . | nindent 10 }}
+      {{- end }}
       {{- with .podAffinity }}
         podAffinity:
           {{- with .preferredDuringSchedulingIgnoredDuringExecution }}


Test patch: