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