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.

67 lines
1.8 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. containers:
  28. - name: dnsmasq
  29. image: "{{ dnsmasq_image_repo }}:{{ dnsmasq_image_tag }}"
  30. imagePullPolicy: {{ k8s_image_pull_policy }}
  31. command:
  32. - dnsmasq
  33. args:
  34. - -k
  35. - -C
  36. - /etc/dnsmasq.d/01-kube-dns.conf
  37. securityContext:
  38. capabilities:
  39. add:
  40. - NET_ADMIN
  41. resources:
  42. limits:
  43. cpu: {{ dns_cpu_limit }}
  44. memory: {{ dns_memory_limit }}
  45. requests:
  46. cpu: {{ dns_cpu_requests }}
  47. memory: {{ dns_memory_requests }}
  48. ports:
  49. - name: dns
  50. containerPort: 53
  51. protocol: UDP
  52. - name: dns-tcp
  53. containerPort: 53
  54. protocol: TCP
  55. volumeMounts:
  56. - name: etcdnsmasqd
  57. mountPath: /etc/dnsmasq.d
  58. - name: etcdnsmasqdavailable
  59. mountPath: /etc/dnsmasq.d-available
  60. volumes:
  61. - name: etcdnsmasqd
  62. hostPath:
  63. path: /etc/dnsmasq.d
  64. - name: etcdnsmasqdavailable
  65. hostPath:
  66. path: /etc/dnsmasq.d-available
  67. dnsPolicy: Default # Don't use cluster DNS.