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.

73 lines
2.1 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. # When having win nodes in cluster without this patch, this pod cloud try to be created in windows
  31. nodeSelector:
  32. beta.kubernetes.io/os: linux
  33. containers:
  34. - name: dnsmasq
  35. image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
  36. imagePullPolicy: {{ k8s_image_pull_policy }}
  37. command:
  38. - dnsmasq
  39. args:
  40. - -k
  41. - -C
  42. - /etc/dnsmasq.d/01-kube-dns.conf
  43. securityContext:
  44. capabilities:
  45. add:
  46. - NET_ADMIN
  47. resources:
  48. limits:
  49. cpu: {{ dns_cpu_limit }}
  50. memory: {{ dns_memory_limit }}
  51. requests:
  52. cpu: {{ dns_cpu_requests }}
  53. memory: {{ dns_memory_requests }}
  54. ports:
  55. - name: dns
  56. containerPort: 53
  57. protocol: UDP
  58. - name: dns-tcp
  59. containerPort: 53
  60. protocol: TCP
  61. volumeMounts:
  62. - name: etcdnsmasqd
  63. mountPath: /etc/dnsmasq.d
  64. - name: etcdnsmasqdavailable
  65. mountPath: /etc/dnsmasq.d-available
  66. volumes:
  67. - name: etcdnsmasqd
  68. hostPath:
  69. path: /etc/dnsmasq.d
  70. - name: etcdnsmasqdavailable
  71. hostPath:
  72. path: /etc/dnsmasq.d-available
  73. dnsPolicy: Default # Don't use cluster DNS.