daemonset.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. kind: DaemonSet
  2. apiVersion: apps/v1
  3. metadata:
  4. name: {{ include "openvpn.fullname" . }}-router
  5. labels:
  6. {{- include "openvpn.router.labels" . | nindent 4 }}
  7. spec:
  8. selector:
  9. matchLabels:
  10. {{- include "openvpn.router.selectorLabels" . | nindent 6 }}
  11. template:
  12. metadata:
  13. labels:
  14. {{- include "openvpn.router.selectorLabels" . | nindent 8 }}
  15. spec:
  16. serviceAccountName: {{ .Release.Name }}-router
  17. {{- if .Values.registry_secret_data }}
  18. imagePullSecrets:
  19. - name: {{ include "openvpn.fullname" . }}-registry-secret
  20. {{- end }}
  21. hostNetwork: true
  22. priorityClassName: system-cluster-critical
  23. containers:
  24. - name: {{ .Chart.Name }}-router
  25. image: "{{ .Values.router.image }}:{{ .Values.router.tag }}"
  26. imagePullPolicy: IfNotPresent
  27. command: ["sleep"]
  28. args: ["infinity"]
  29. securityContext:
  30. capabilities:
  31. add:
  32. - NET_ADMIN
  33. resources:
  34. {{- toYaml .Values.router.resources | nindent 12 }}
  35. volumeMounts:
  36. - name: routecheck
  37. mountPath: /opt
  38. volumes:
  39. - name: routecheck
  40. configMap:
  41. name: {{ include "openvpn.fullname" . }}-routecheck
  42. defaultMode: 0755