cert-controller-deployment.yaml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. readinessProbe:
  65. httpGet:
  66. port: 8081
  67. path: /readyz
  68. initialDelaySeconds: 20
  69. periodSeconds: 5
  70. {{- with .Values.certController.extraEnv }}
  71. env:
  72. {{- toYaml . | nindent 12 }}
  73. {{- end }}
  74. {{- with .Values.certController.resources }}
  75. resources:
  76. {{- toYaml . | nindent 12 }}
  77. {{- end }}
  78. {{- with .Values.certController.nodeSelector }}
  79. nodeSelector:
  80. {{- toYaml . | nindent 8 }}
  81. {{- end }}
  82. {{- with .Values.certController.affinity }}
  83. affinity:
  84. {{- toYaml . | nindent 8 }}
  85. {{- end }}
  86. {{- with .Values.certController.tolerations }}
  87. tolerations:
  88. {{- toYaml . | nindent 8 }}
  89. {{- end }}
  90. {{- if .Values.certController.priorityClassName }}
  91. priorityClassName: {{ .Values.certController.priorityClassName }}
  92. {{- end }}