cert-controller-deployment.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ include "external-secrets.fullname" . }}-cert-controller
  5. namespace: {{ .Release.Namespace | quote }}
  6. labels:
  7. {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
  8. {{- with .Values.certController.deploymentAnnotations }}
  9. annotations:
  10. {{- toYaml . | nindent 4 }}
  11. {{- end }}
  12. spec:
  13. replicas: 1
  14. selector:
  15. matchLabels:
  16. {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 6 }}
  17. template:
  18. metadata:
  19. {{- with .Values.certController.podAnnotations }}
  20. annotations:
  21. {{- toYaml . | nindent 8 }}
  22. {{- end }}
  23. labels:
  24. {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 8 }}
  25. {{- with .Values.certController.podLabels }}
  26. {{- toYaml . | nindent 8 }}
  27. {{- end }}
  28. spec:
  29. {{- with .Values.certController.imagePullSecrets }}
  30. imagePullSecrets:
  31. {{- toYaml . | nindent 8 }}
  32. {{- end }}
  33. serviceAccountName: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
  34. {{- with .Values.certController.podSecurityContext }}
  35. securityContext:
  36. {{- toYaml . | nindent 8 }}
  37. {{- end }}
  38. containers:
  39. - name: cert-controller
  40. {{- with .Values.certController.securityContext }}
  41. securityContext:
  42. {{- toYaml . | nindent 12 }}
  43. {{- end }}
  44. image: "{{ .Values.certController.image.repository }}:{{ .Values.certController.image.tag | default .Chart.AppVersion }}"
  45. imagePullPolicy: {{ .Values.certController.image.pullPolicy }}
  46. args:
  47. - --service-name={{ include "external-secrets.fullname" . }}-webhook
  48. - --service-namespace={{ .Release.Namespace }}
  49. - --secret-name={{ include "external-secrets.fullname" . }}-webhook
  50. - --secret-namespace={{ .Release.Namespace }}
  51. {{- range $key, $value := .Values.certController.extraArgs }}
  52. {{- if $value }}
  53. - --{{ $key }}={{ $value }}
  54. {{- else }}
  55. - --{{ $key }}
  56. {{- end }}
  57. {{- end }}
  58. ports:
  59. - containerPort: {{ .Values.certController.prometheus.service.port }}
  60. protocol: TCP
  61. name: metrics
  62. {{- with .Values.certController.extraEnv }}
  63. env:
  64. {{- toYaml . | nindent 12 }}
  65. {{- end }}
  66. {{- with .Values.certController.resources }}
  67. resources:
  68. {{- toYaml . | nindent 12 }}
  69. {{- end }}
  70. {{- with .Values.certController.nodeSelector }}
  71. nodeSelector:
  72. {{- toYaml . | nindent 8 }}
  73. {{- end }}
  74. {{- with .Values.certController.affinity }}
  75. affinity:
  76. {{- toYaml . | nindent 8 }}
  77. {{- end }}
  78. {{- with .Values.certController.tolerations }}
  79. tolerations:
  80. {{- toYaml . | nindent 8 }}
  81. {{- end }}
  82. {{- if .Values.certController.priorityClassName }}
  83. priorityClassName: {{ .Values.certController.priorityClassName }}
  84. {{- end }}