deployment.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. {{- if or (.Values.leaderElect) (.Values.extraArgs) }}
  42. args:
  43. {{- if .Values.leaderElect }}
  44. - --enable-leader-election=true
  45. {{- end }}
  46. {{- range $key, $value := .Values.extraArgs }}
  47. {{- if $value }}
  48. - --{{ $key }}={{ $value }}
  49. {{- else }}
  50. - --{{ $key }}
  51. {{- end }}
  52. {{- end }}
  53. {{- end }}
  54. ports:
  55. - containerPort: {{ .Values.prometheus.service.port }}
  56. protocol: TCP
  57. {{- with .Values.extraEnv }}
  58. env:
  59. {{- toYaml . | nindent 12 }}
  60. {{- end }}
  61. {{- with .Values.resources }}
  62. resources:
  63. {{- toYaml . | nindent 12 }}
  64. {{- end }}
  65. {{- with .Values.nodeSelector }}
  66. nodeSelector:
  67. {{- toYaml . | nindent 8 }}
  68. {{- end }}
  69. {{- with .Values.affinity }}
  70. affinity:
  71. {{- toYaml . | nindent 8 }}
  72. {{- end }}
  73. {{- with .Values.tolerations }}
  74. tolerations:
  75. {{- toYaml . | nindent 8 }}
  76. {{- end }}