Skip to content

Commit b9bbc10

Browse files
authored
Merge pull request #9006 from zalando-incubator/slow-down-coredns-termination
Slow down coredns shutdown
2 parents ef93e60 + 5c03f76 commit b9bbc10

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

cluster/manifests/coredns-local/daemonset-coredns.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ spec:
2525
prometheus.io/scrape: "true"
2626
prometheus.io/port: "9153"
2727
spec:
28+
terminationGracePeriodSeconds: 40
2829
initContainers:
2930
- name: ensure-apiserver
3031
image: container-registry.zalando.net/teapot/ensure-apiserver:master-6
@@ -66,7 +67,7 @@ spec:
6667
lifecycle:
6768
preStop:
6869
sleep:
69-
seconds: 25
70+
seconds: 35
7071
resources:
7172
requests:
7273
ephemeral-storage: 256Mi
@@ -137,6 +138,10 @@ spec:
137138
limits:
138139
cpu: {{.Cluster.ConfigItems.dns_dnsmasq_cpu}}
139140
memory: {{.Cluster.ConfigItems.dns_dnsmasq_mem}}
141+
lifecycle:
142+
preStop:
143+
sleep:
144+
seconds: 35
140145
- name: sidecar
141146
image: container-registry.zalando.net/teapot/k8s-dns-sidecar:1.17.4-master-15
142147
securityContext:
@@ -165,6 +170,10 @@ spec:
165170
limits:
166171
cpu: {{.Cluster.ConfigItems.dns_dnsmasq_sidecar_cpu}}
167172
memory: {{.Cluster.ConfigItems.dns_dnsmasq_sidecar_mem}}
173+
lifecycle:
174+
preStop:
175+
sleep:
176+
seconds: 35
168177
{{ end }}
169178
- name: coredns
170179
image: container-registry.zalando.net/teapot/coredns:1.12.0-master-25
@@ -208,6 +217,10 @@ spec:
208217
limits:
209218
cpu: {{.Cluster.ConfigItems.dns_coredns_cpu}}
210219
memory: {{.Cluster.ConfigItems.dns_coredns_mem}}
220+
lifecycle:
221+
preStop:
222+
sleep:
223+
seconds: 35
211224
priorityClassName: system-node-critical
212225
serviceAccountName: coredns
213226
hostNetwork: true

0 commit comments

Comments
 (0)