cert-controller-deployment.yaml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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: 1
  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. {{- with .Values.certController.nodeSelector }}
  80. nodeSelector:
  81. {{- toYaml . | nindent 8 }}
  82. {{- end }}
  83. {{- with .Values.certController.affinity }}
  84. affinity:
  85. {{- toYaml . | nindent 8 }}
  86. {{- end }}
  87. {{- with .Values.certController.tolerations }}
  88. tolerations:
  89. {{- toYaml . | nindent 8 }}
  90. {{- end }}
  91. {{- if .Values.certController.priorityClassName }}
  92. priorityClassName: {{ .Values.certController.priorityClassName }}
  93. {{- end }}
  94. {{- end }}