Update CoreDNS templates to newest version and fix kubedns-autoscaler (#3483)
* Update CoreDNS templates to newest version * Add watch to ClusterRole. Fixes #3460
This commit is contained in:
parent
3f786542d3
commit
cdce8c81da
7 changed files with 14 additions and 13 deletions
|
@ -4,7 +4,6 @@ kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
kubernetes.io/bootstrapping: rbac-defaults
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
name: system:coredns
|
name: system:coredns
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
|
|
|
@ -6,7 +6,6 @@ metadata:
|
||||||
rbac.authorization.kubernetes.io/autoupdate: "true"
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||||
labels:
|
labels:
|
||||||
kubernetes.io/bootstrapping: rbac-defaults
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
addonmanager.kubernetes.io/mode: EnsureExists
|
|
||||||
name: system:coredns
|
name: system:coredns
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
|
@ -4,8 +4,6 @@ kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: coredns
|
name: coredns
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
|
||||||
addonmanager.kubernetes.io/mode: EnsureExists
|
|
||||||
data:
|
data:
|
||||||
Corefile: |
|
Corefile: |
|
||||||
.:53 {
|
.:53 {
|
||||||
|
@ -27,4 +25,7 @@ data:
|
||||||
proxy . /etc/resolv.conf
|
proxy . /etc/resolv.conf
|
||||||
{% endif %}
|
{% endif %}
|
||||||
cache 30
|
cache 30
|
||||||
|
loop
|
||||||
|
reload
|
||||||
|
loadbalance
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,7 @@ metadata:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
k8s-app: coredns{{ coredns_ordinal_suffix | default('') }}
|
k8s-app: coredns{{ coredns_ordinal_suffix | default('') }}
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/name: "coredns{{ coredns_ordinal_suffix | default('') }}"
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
kubernetes.io/name: "CoreDNS"
|
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ coredns_replicas }}
|
replicas: {{ coredns_replicas }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -79,6 +77,14 @@ spec:
|
||||||
- containerPort: 9153
|
- containerPort: 9153
|
||||||
name: metrics
|
name: metrics
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_BIND_SERVICE
|
||||||
|
drop:
|
||||||
|
- all
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
|
|
|
@ -4,6 +4,3 @@ kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: coredns
|
name: coredns
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
|
||||||
kubernetes.io/cluster-service: "true"
|
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: coredns{{ coredns_ordinal_suffix | default('') }}
|
k8s-app: coredns{{ coredns_ordinal_suffix | default('') }}
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
kubernetes.io/name: "coredns{{ coredns_ordinal_suffix | default('') }}"
|
||||||
kubernetes.io/name: "CoreDNS"
|
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/path: /metrics
|
prometheus.io/path: /metrics
|
||||||
prometheus.io/port: "9153"
|
prometheus.io/port: "9153"
|
||||||
|
|
|
@ -21,7 +21,7 @@ metadata:
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["nodes"]
|
resources: ["nodes"]
|
||||||
verbs: ["list"]
|
verbs: ["list", "watch"]
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["replicationcontrollers/scale"]
|
resources: ["replicationcontrollers/scale"]
|
||||||
verbs: ["get", "update"]
|
verbs: ["get", "update"]
|
||||||
|
|
Loading…
Reference in a new issue