cert-controller-deployment.yaml 3.7 KB

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