fix: redeploy coredns and nodelocaldns when its config changed (#12401)

This commit is contained in:
Kim Hyunyoung, Abel
2025-09-01 16:23:11 +09:00
committed by GitHub
parent c03c68e8c7
commit 66cab15498
3 changed files with 3 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ spec:
k8s-app: kube-dns{{ coredns_ordinal_suffix }} k8s-app: kube-dns{{ coredns_ordinal_suffix }}
annotations: annotations:
createdby: 'kubespray' createdby: 'kubespray'
checksum/config: "{{ lookup('template', 'coredns-config.yml.j2') | checksum }}"
spec: spec:
securityContext: securityContext:
seccompProfile: seccompProfile:

View File

@@ -17,6 +17,7 @@ spec:
annotations: annotations:
prometheus.io/scrape: 'true' prometheus.io/scrape: 'true'
prometheus.io/port: '{{ nodelocaldns_prometheus_port }}' prometheus.io/port: '{{ nodelocaldns_prometheus_port }}'
checksum/config: "{{ lookup('template', 'nodelocaldns-config.yml.j2') | checksum }}"
spec: spec:
nodeSelector: nodeSelector:
{{ nodelocaldns_ds_nodeselector }} {{ nodelocaldns_ds_nodeselector }}

View File

@@ -17,6 +17,7 @@ spec:
annotations: annotations:
prometheus.io/scrape: 'true' prometheus.io/scrape: 'true'
prometheus.io/port: '{{ nodelocaldns_secondary_prometheus_port }}' prometheus.io/port: '{{ nodelocaldns_secondary_prometheus_port }}'
checksum/config: "{{ lookup('template', 'nodelocaldns-config.yml.j2') | checksum }}"
spec: spec:
nodeSelector: nodeSelector:
{{ nodelocaldns_ds_nodeselector }} {{ nodelocaldns_ds_nodeselector }}