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.

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