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
|
2016-12-13 10:43:06 +00:00
|
|
|
namespace: "{{system_namespace}}"
|
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:
|
2017-08-24 09:04:25 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
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.
|