2016-03-18 22:07:33 +08:00
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
2017-02-28 22:56:00 +08:00
|
|
|
kind: Deployment
|
2016-03-18 22:07:33 +08:00
|
|
|
metadata:
|
|
|
|
name: dnsmasq
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2016-03-18 22:07:33 +08:00
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq
|
2017-02-28 22:56:00 +08:00
|
|
|
kubernetes.io/cluster-service: "true"
|
2016-03-18 22:07:33 +08:00
|
|
|
spec:
|
2017-02-28 22:56:00 +08:00
|
|
|
replicas: {{ dnsmasq_min_replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: dnsmasq
|
2017-03-22 18:02:39 +08:00
|
|
|
strategy:
|
|
|
|
type: "Recreate"
|
2016-03-18 22:07:33 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq
|
2017-02-28 22:56:00 +08:00
|
|
|
kubernetes.io/cluster-service: "true"
|
2017-06-17 01:25:46 +08:00
|
|
|
kubespray/dnsmasq-checksum: "{{ dnsmasq_stat.stat.checksum }}"
|
2016-03-18 22:07:33 +08:00
|
|
|
spec:
|
2018-10-17 06:33:30 +08:00
|
|
|
{% if kube_version is version('v1.11.1', '>=') %}
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: system-cluster-critical
|
|
|
|
{% endif %}
|
2017-08-24 17:04:25 +08:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2018-06-05 19:15:20 +08: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 22:07:33 +08:00
|
|
|
containers:
|
|
|
|
- name: dnsmasq
|
2016-10-15 05:46:44 +08:00
|
|
|
image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
|
2016-11-22 23:16:04 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-03-18 22:07:33 +08:00
|
|
|
command:
|
|
|
|
- dnsmasq
|
|
|
|
args:
|
|
|
|
- -k
|
2017-01-20 18:56:26 +08:00
|
|
|
- -C
|
|
|
|
- /etc/dnsmasq.d/01-kube-dns.conf
|
2016-03-18 22:07:33 +08:00
|
|
|
securityContext:
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_ADMIN
|
|
|
|
resources:
|
|
|
|
limits:
|
2016-11-25 18:33:39 +08:00
|
|
|
cpu: {{ dns_cpu_limit }}
|
|
|
|
memory: {{ dns_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ dns_cpu_requests }}
|
|
|
|
memory: {{ dns_memory_requests }}
|
2016-03-18 22:07:33 +08: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-23 01:14:51 +08:00
|
|
|
dnsPolicy: Default # Don't use cluster DNS.
|