You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: DaemonSet
  4. metadata:
  5. name: dnsmasq
  6. namespace: "{{system_namespace}}"
  7. labels:
  8. k8s-app: dnsmasq
  9. spec:
  10. template:
  11. metadata:
  12. labels:
  13. k8s-app: dnsmasq
  14. spec:
  15. containers:
  16. - name: dnsmasq
  17. image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
  18. imagePullPolicy: {{ k8s_image_pull_policy }}
  19. command:
  20. - dnsmasq
  21. args:
  22. - -k
  23. - -C
  24. - /etc/dnsmasq.d/01-kube-dns.conf
  25. securityContext:
  26. capabilities:
  27. add:
  28. - NET_ADMIN
  29. imagePullPolicy: IfNotPresent
  30. resources:
  31. limits:
  32. cpu: {{ dns_cpu_limit }}
  33. memory: {{ dns_memory_limit }}
  34. requests:
  35. cpu: {{ dns_cpu_requests }}
  36. memory: {{ dns_memory_requests }}
  37. ports:
  38. - name: dns
  39. containerPort: 53
  40. protocol: UDP
  41. - name: dns-tcp
  42. containerPort: 53
  43. protocol: TCP
  44. volumeMounts:
  45. - name: etcdnsmasqd
  46. mountPath: /etc/dnsmasq.d
  47. - name: etcdnsmasqdavailable
  48. mountPath: /etc/dnsmasq.d-available
  49. volumes:
  50. - name: etcdnsmasqd
  51. hostPath:
  52. path: /etc/dnsmasq.d
  53. - name: etcdnsmasqdavailable
  54. hostPath:
  55. path: /etc/dnsmasq.d-available
  56. dnsPolicy: Default # Don't use cluster DNS.