cert-controller-deployment.yaml 3.1 KB

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