cert-controller-deployment.yaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. - certcontroller
  48. - --crd-requeue-interval={{ .Values.certController.requeueInterval }}
  49. - --service-name={{ include "external-secrets.fullname" . }}-webhook
  50. - --service-namespace={{ .Release.Namespace }}
  51. - --secret-name={{ include "external-secrets.fullname" . }}-webhook
  52. - --secret-namespace={{ .Release.Namespace }}
  53. {{- range $key, $value := .Values.certController.extraArgs }}
  54. {{- if $value }}
  55. - --{{ $key }}={{ $value }}
  56. {{- else }}
  57. - --{{ $key }}
  58. {{- end }}
  59. {{- end }}
  60. ports:
  61. - containerPort: {{ .Values.certController.prometheus.service.port }}
  62. protocol: TCP
  63. name: metrics
  64. {{- with .Values.certController.extraEnv }}
  65. env:
  66. {{- toYaml . | nindent 12 }}
  67. {{- end }}
  68. {{- with .Values.certController.resources }}
  69. resources:
  70. {{- toYaml . | nindent 12 }}
  71. {{- end }}
  72. {{- with .Values.certController.nodeSelector }}
  73. nodeSelector:
  74. {{- toYaml . | nindent 8 }}
  75. {{- end }}
  76. {{- with .Values.certController.affinity }}
  77. affinity:
  78. {{- toYaml . | nindent 8 }}
  79. {{- end }}
  80. {{- with .Values.certController.tolerations }}
  81. tolerations:
  82. {{- toYaml . | nindent 8 }}
  83. {{- end }}
  84. {{- if .Values.certController.priorityClassName }}
  85. priorityClassName: {{ .Values.certController.priorityClassName }}
  86. {{- end }}