[Nodelocal DNS cache] Mount host /run/xtables.lock in nodelocaldns container (#4074)
* Mount host /run/xtables.lock in nodelocaldns container * fix typo in nodelocaldns daemonset manifest yml * Add prometheus scrape annotation, updateStrategy and reduce termination grace period * fix indentation * actually fix it.. * Bump k8s-dns-node-cache tag to 1.15.1 (fixes https://github.com/kubernetes/dns/issues/282)
This commit is contained in:
parent
39dc61b948
commit
595d6427ac
3 changed files with 20 additions and 5 deletions
|
@ -194,7 +194,7 @@ coredns_version: "1.2.6"
|
||||||
coredns_image_repo: "coredns/coredns"
|
coredns_image_repo: "coredns/coredns"
|
||||||
coredns_image_tag: "{{ coredns_version }}"
|
coredns_image_tag: "{{ coredns_version }}"
|
||||||
|
|
||||||
nodelocaldns_version: "1.15.0"
|
nodelocaldns_version: "1.15.1"
|
||||||
nodelocaldns_image_repo: "k8s.gcr.io/k8s-dns-node-cache"
|
nodelocaldns_image_repo: "k8s.gcr.io/k8s-dns-node-cache"
|
||||||
nodelocaldns_image_tag: "{{ nodelocaldns_version }}"
|
nodelocaldns_image_tag: "{{ nodelocaldns_version }}"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- { name: nodelocaldns, file: nodelocaldns-config.yml, type: configmap }
|
- { name: nodelocaldns, file: nodelocaldns-config.yml, type: configmap }
|
||||||
- { name: nodelocaldns, file: nodelocaldns-sa.yml, type: sa }
|
- { name: nodelocaldns, file: nodelocaldns-sa.yml, type: sa }
|
||||||
- { name: nodelocaldns, file: nodelocaldns-deamonset.yml, type: daemonset }
|
- { name: nodelocaldns, file: nodelocaldns-daemonset.yml, type: daemonset }
|
||||||
register: nodelocaldns_manifests
|
register: nodelocaldns_manifests
|
||||||
vars:
|
vars:
|
||||||
clusterIP: "{{ skydns_server }}"
|
clusterIP: "{{ skydns_server }}"
|
||||||
|
|
|
@ -13,8 +13,11 @@ spec:
|
||||||
k8s-app: nodelocaldns
|
k8s-app: nodelocaldns
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: nodelocaldns
|
k8s-app: nodelocaldns
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: 'true'
|
||||||
|
prometheus.io/port: '9253'
|
||||||
spec:
|
spec:
|
||||||
{% if kube_version is version('v1.11.1', '>=') %}
|
{% if kube_version is version('v1.11.1', '>=') %}
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
|
@ -62,6 +65,8 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/coredns
|
mountPath: /etc/coredns
|
||||||
|
- name: xtables-lock
|
||||||
|
mountPath: /run/xtables.lock
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
|
@ -69,4 +74,14 @@ spec:
|
||||||
items:
|
items:
|
||||||
- key: Corefile
|
- key: Corefile
|
||||||
path: Corefile
|
path: Corefile
|
||||||
terminationGracePeriodSeconds: 30
|
- name: xtables-lock
|
||||||
|
hostPath:
|
||||||
|
path: /run/xtables.lock
|
||||||
|
type: FileOrCreate
|
||||||
|
# Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
|
||||||
|
# deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
|
||||||
|
terminationGracePeriodSeconds: 0
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: {{ serial | default('20%') }}
|
||||||
|
type: RollingUpdate
|
Loading…
Reference in a new issue