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.

64 lines
1.7 KiB

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