2016-03-18 14:07:33 +00:00
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
2017-02-28 14:56:00 +00:00
|
|
|
kind: Deployment
|
2016-03-18 14:07:33 +00:00
|
|
|
metadata:
|
|
|
|
name: dnsmasq
|
2018-03-30 11:29:13 +00:00
|
|
|
namespace: "kube-system"
|
2016-03-18 14:07:33 +00:00
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq
|
2017-02-28 14:56:00 +00:00
|
|
|
kubernetes.io/cluster-service: "true"
|
2016-03-18 14:07:33 +00:00
|
|
|
spec:
|
2017-02-28 14:56:00 +00:00
|
|
|
replicas: {{ dnsmasq_min_replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: dnsmasq
|
2017-03-22 10:02:39 +00:00
|
|
|
strategy:
|
|
|
|
type: "Recreate"
|
2016-03-18 14:07:33 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq
|
2017-02-28 14:56:00 +00:00
|
|
|
kubernetes.io/cluster-service: "true"
|
2017-06-16 17:25:46 +00:00
|
|
|
kubespray/dnsmasq-checksum: "{{ dnsmasq_stat.stat.checksum }}"
|
2016-03-18 14:07:33 +00:00
|
|
|
spec:
|
2018-10-16 22:33:30 +00:00
|
|
|
{% if kube_version is version('v1.11.1', '>=') %}
|
2018-09-25 14:50:22 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
|
|
|
{% endif %}
|
2017-08-24 09:04:25 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2018-06-05 11:15:20 +00:00
|
|
|
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
|
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|
2016-03-18 14:07:33 +00:00
|
|
|
containers:
|
|
|
|
- name: dnsmasq
|
2016-10-14 21:46:44 +00:00
|
|
|
image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
|
2016-11-22 15:16:04 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-03-18 14:07:33 +00:00
|
|
|
command:
|
|
|
|
- dnsmasq
|
|
|
|
args:
|
|
|
|
- -k
|
2017-01-20 10:56:26 +00:00
|
|
|
- -C
|
|
|
|
- /etc/dnsmasq.d/01-kube-dns.conf
|
2016-03-18 14:07:33 +00:00
|
|
|
securityContext:
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_ADMIN
|
|
|
|
resources:
|
|
|
|
limits:
|
2016-11-25 10:33:39 +00:00
|
|
|
cpu: {{ dns_cpu_limit }}
|
|
|
|
memory: {{ dns_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ dns_cpu_requests }}
|
|
|
|
memory: {{ dns_memory_requests }}
|
2016-03-18 14:07:33 +00:00
|
|
|
ports:
|
|
|
|
- name: dns
|
|
|
|
containerPort: 53
|
|
|
|
protocol: UDP
|
|
|
|
- name: dns-tcp
|
|
|
|
containerPort: 53
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- name: etcdnsmasqd
|
|
|
|
mountPath: /etc/dnsmasq.d
|
|
|
|
- name: etcdnsmasqdavailable
|
|
|
|
mountPath: /etc/dnsmasq.d-available
|
|
|
|
volumes:
|
|
|
|
- name: etcdnsmasqd
|
|
|
|
hostPath:
|
|
|
|
path: /etc/dnsmasq.d
|
|
|
|
- name: etcdnsmasqdavailable
|
|
|
|
hostPath:
|
|
|
|
path: /etc/dnsmasq.d-available
|
2016-09-22 17:14:51 +00:00
|
|
|
dnsPolicy: Default # Don't use cluster DNS.
|