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.

72 lines
2.0 KiB

  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: Deployment
  4. metadata:
  5. name: dnsmasq
  6. namespace: "kube-system"
  7. labels:
  8. k8s-app: dnsmasq
  9. kubernetes.io/cluster-service: "true"
  10. spec:
  11. replicas: {{ dnsmasq_min_replicas }}
  12. selector:
  13. matchLabels:
  14. k8s-app: dnsmasq
  15. strategy:
  16. type: "Recreate"
  17. template:
  18. metadata:
  19. labels:
  20. k8s-app: dnsmasq
  21. kubernetes.io/cluster-service: "true"
  22. kubespray/dnsmasq-checksum: "{{ dnsmasq_stat.stat.checksum }}"
  23. spec:
  24. {% if kube_version is version('v1.11.1', '>=') %}
  25. priorityClassName: system-cluster-critical
  26. {% endif %}
  27. tolerations:
  28. - effect: NoSchedule
  29. operator: Exists
  30. nodeSelector:
  31. beta.kubernetes.io/os: linux
  32. containers:
  33. - name: dnsmasq
  34. image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
  35. imagePullPolicy: {{ k8s_image_pull_policy }}
  36. command:
  37. - dnsmasq
  38. args:
  39. - -k
  40. - -C
  41. - /etc/dnsmasq.d/01-kube-dns.conf
  42. securityContext:
  43. capabilities:
  44. add:
  45. - NET_ADMIN
  46. resources:
  47. limits:
  48. cpu: {{ dns_cpu_limit }}
  49. memory: {{ dns_memory_limit }}
  50. requests:
  51. cpu: {{ dns_cpu_requests }}
  52. memory: {{ dns_memory_requests }}
  53. ports:
  54. - name: dns
  55. containerPort: 53
  56. protocol: UDP
  57. - name: dns-tcp
  58. containerPort: 53
  59. protocol: TCP
  60. volumeMounts:
  61. - name: etcdnsmasqd
  62. mountPath: /etc/dnsmasq.d
  63. - name: etcdnsmasqdavailable
  64. mountPath: /etc/dnsmasq.d-available
  65. volumes:
  66. - name: etcdnsmasqd
  67. hostPath:
  68. path: /etc/dnsmasq.d
  69. - name: etcdnsmasqdavailable
  70. hostPath:
  71. path: /etc/dnsmasq.d-available
  72. dnsPolicy: Default # Don't use cluster DNS.