deployment.yaml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ include "external-secrets.fullname" . }}
  5. labels:
  6. {{- include "external-secrets.labels" . | nindent 4 }}
  7. spec:
  8. replicas: {{ .Values.replicaCount }}
  9. selector:
  10. matchLabels:
  11. {{- include "external-secrets.selectorLabels" . | nindent 6 }}
  12. template:
  13. metadata:
  14. {{- with .Values.podAnnotations }}
  15. annotations:
  16. {{- toYaml . | nindent 8 }}
  17. {{- end }}
  18. labels:
  19. {{- include "external-secrets.selectorLabels" . | nindent 8 }}
  20. {{- with .Values.podLabels }}
  21. {{- toYaml . | nindent 8 }}
  22. {{- end }}
  23. spec:
  24. {{- with .Values.imagePullSecrets }}
  25. imagePullSecrets:
  26. {{- toYaml . | nindent 8 }}
  27. {{- end }}
  28. serviceAccountName: {{ include "external-secrets.serviceAccountName" . }}
  29. {{- with .Values.podSecurityContext }}
  30. securityContext:
  31. {{- toYaml . | nindent 8 }}
  32. {{- end }}
  33. containers:
  34. - name: {{ .Chart.Name }}
  35. {{- with .Values.securityContext }}
  36. securityContext:
  37. {{- toYaml . | nindent 12 }}
  38. {{- end }}
  39. image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
  40. imagePullPolicy: {{ .Values.image.pullPolicy }}
  41. args:
  42. {{- if .Values.leaderElect }}
  43. - --enable-leader-election=true
  44. {{- end }}
  45. {{- range $key, $value := .Values.extraArgs }}
  46. {{- if $value }}
  47. - --{{ $key }}={{ $value }}
  48. {{- else }}
  49. - --{{ $key }}
  50. {{- end }}
  51. {{- end }}
  52. ports:
  53. - containerPort: {{ .Values.prometheus.service.port }}
  54. protocol: TCP
  55. {{- with .Values.extraEnv }}
  56. env:
  57. {{- toYaml . | nindent 12 }}
  58. {{- end }}
  59. {{- with .Values.resources }}
  60. resources:
  61. {{- toYaml . | nindent 12 }}
  62. {{- end }}
  63. {{- with .Values.nodeSelector }}
  64. nodeSelector:
  65. {{- toYaml . | nindent 8 }}
  66. {{- end }}
  67. {{- with .Values.affinity }}
  68. affinity:
  69. {{- toYaml . | nindent 8 }}
  70. {{- end }}
  71. {{- with .Values.tolerations }}
  72. tolerations:
  73. {{- toYaml . | nindent 8 }}
  74. {{- end }}