1
+ # Source: https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/coredns/coredns.yaml.base
2
+ ---
1
3
apiVersion : v1
2
4
kind : ServiceAccount
3
5
metadata :
4
6
name : coredns
5
7
namespace : kube-system
8
+ labels :
9
+ kubernetes.io/cluster-service : " true"
10
+ addonmanager.kubernetes.io/mode : Reconcile
6
11
---
7
12
apiVersion : rbac.authorization.k8s.io/v1
8
13
kind : ClusterRole
9
14
metadata :
10
15
labels :
11
16
kubernetes.io/bootstrapping : rbac-defaults
17
+ addonmanager.kubernetes.io/mode : Reconcile
12
18
name : system:coredns
13
19
rules :
14
20
- apiGroups :
@@ -42,6 +48,7 @@ metadata:
42
48
rbac.authorization.kubernetes.io/autoupdate : " true"
43
49
labels :
44
50
kubernetes.io/bootstrapping : rbac-defaults
51
+ addonmanager.kubernetes.io/mode : EnsureExists
45
52
name : system:coredns
46
53
roleRef :
47
54
apiGroup : rbac.authorization.k8s.io
@@ -61,13 +68,19 @@ data:
61
68
Corefile : |
62
69
.:53 {
63
70
errors
64
- health
71
+ health {
72
+ lameduck 5s
73
+ }
65
74
ready
66
75
kubernetes cluster.local in-addr.arpa ip6.arpa {
67
- pods insecure
68
- fallthrough in-addr.arpa ip6.arpa
76
+ pods insecure
77
+ fallthrough in-addr.arpa ip6.arpa
78
+ ttl 30
69
79
}
70
80
prometheus :9153
81
+ forward . /etc/resolv.conf {
82
+ max_concurrent 1000
83
+ }
71
84
cache 30
72
85
loop
73
86
reload
@@ -81,6 +94,8 @@ metadata:
81
94
namespace : kube-system
82
95
labels :
83
96
k8s-app : kube-dns
97
+ kubernetes.io/cluster-service : " true"
98
+ addonmanager.kubernetes.io/mode : Reconcile
84
99
kubernetes.io/name : " CoreDNS"
85
100
spec :
86
101
replicas : {{ .Values.coredns.replicaCount }}
@@ -96,13 +111,27 @@ spec:
96
111
labels :
97
112
k8s-app : kube-dns
98
113
spec :
114
+ securityContext :
115
+ seccompProfile :
116
+ type : RuntimeDefault
99
117
priorityClassName : system-cluster-critical
100
118
serviceAccountName : coredns
119
+ affinity :
120
+ podAntiAffinity :
121
+ preferredDuringSchedulingIgnoredDuringExecution :
122
+ - weight : 100
123
+ podAffinityTerm :
124
+ labelSelector :
125
+ matchExpressions :
126
+ - key : k8s-app
127
+ operator : In
128
+ values : ["kube-dns"]
129
+ topologyKey : kubernetes.io/hostname
101
130
tolerations :
102
131
- key : " CriticalAddonsOnly"
103
132
operator : " Exists"
104
133
nodeSelector :
105
- beta. kubernetes.io/os : linux
134
+ kubernetes.io/os : linux
106
135
{{- with .Values.coredns.image.pullSecrets }}
107
136
imagePullSecrets :
108
137
{{- toYaml . | nindent 10 }}
@@ -130,14 +159,6 @@ spec:
130
159
- containerPort : 9153
131
160
name : metrics
132
161
protocol : TCP
133
- securityContext :
134
- allowPrivilegeEscalation : false
135
- capabilities :
136
- add :
137
- - NET_BIND_SERVICE
138
- drop :
139
- - all
140
- readOnlyRootFilesystem : true
141
162
livenessProbe :
142
163
httpGet :
143
164
path : /health
@@ -152,6 +173,14 @@ spec:
152
173
path : /ready
153
174
port : 8181
154
175
scheme : HTTP
176
+ securityContext :
177
+ allowPrivilegeEscalation : false
178
+ capabilities :
179
+ add :
180
+ - NET_BIND_SERVICE
181
+ drop :
182
+ - all
183
+ readOnlyRootFilesystem : true
155
184
dnsPolicy : Default
156
185
volumes :
157
186
- name : config-volume
@@ -172,6 +201,7 @@ metadata:
172
201
labels :
173
202
k8s-app : kube-dns
174
203
kubernetes.io/cluster-service : " true"
204
+ addonmanager.kubernetes.io/mode : Reconcile
175
205
kubernetes.io/name : " CoreDNS"
176
206
spec :
177
207
selector :
0 commit comments