apiVersion: apps/v1 kind: Deployment metadata: labels: app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/name: "central-storage" app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} name: "central-storage" namespace: {{ .Release.Namespace | quote }} spec: selector: matchLabels: app.kubernetes.io/name: "central-storage" app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} replicas: {{ .Values.central-storage.replicas }} template: metadata: labels: app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/name: "central-storage" app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} spec: containers: - name: "central-storage" image: "{{ coalesce .Values.central-storage.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.central-storage.image.repository .Values.global.repository }}/{{ .Values.central-storage.image.name }}:{{ .Values.central-storage.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.central-storage.image.imagePullPolicy | default "IfNotPresent" }} ports: {{- range $port := .Values.central-storage.ports }} - containerPort: {{ $port.containerPort }} name: {{ $port.name }} protocol: {{ $port.protocol }} {{- end }} {{- if .Values.central-storage.resources }} resources: {{- toYaml .Values.central-storage.resources | nindent 12 }} {{- end }} {{- if .Values.central-storage.probes }} {{- if and (.Values.central-storage.probes.liveness) (eq .Values.central-storage.probes.liveness.type "httpGet") }} livenessProbe: httpGet: path: {{ .Values.central-storage.probes.liveness.config.path }} port: {{ .Values.central-storage.probes.liveness.config.port }} {{- if .Values.central-storage.probes.liveness.config.initialDelaySeconds }} initialDelaySeconds: {{ .Values.central-storage.probes.liveness.config.initialDelaySeconds }} {{- end }} {{- if .Values.central-storage.probes.liveness.config.periodSeconds }} periodSeconds: {{ .Values.central-storage.probes.liveness.config.periodSeconds }} {{- end }} {{- if .Values.central-storage.probes.liveness.config.timeoutSeconds }} timeoutSeconds: {{ .Values.central-storage.probes.liveness.config.timeoutSeconds }} {{- end }} {{- if .Values.central-storage.probes.liveness.config.successThreshold }} successThreshold: {{ .Values.central-storage.probes.liveness.config.successThreshold }} {{- end }} {{- if .Values.central-storage.probes.liveness.config.failureThreshold }} failureThreshold: {{ .Values.central-storage.probes.liveness.config.failureThreshold }} {{- end }} {{- if .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }} {{- end }} {{- end }} {{- if and (.Values.central-storage.probes.readiness) (eq .Values.central-storage.probes.readiness.type "httpGet") }} readinessProbe: httpGet: path: {{ .Values.central-storage.probes.readiness.config.path }} port: {{ .Values.central-storage.probes.readiness.config.port }} {{- if .Values.central-storage.probes.readiness.config.initialDelaySeconds }} initialDelaySeconds: {{ .Values.central-storage.probes.readiness.config.initialDelaySeconds }} {{- end }} {{- if .Values.central-storage.probes.readiness.config.periodSeconds }} periodSeconds: {{ .Values.central-storage.probes.readiness.config.periodSeconds }} {{- end }} {{- if .Values.central-storage.probes.readiness.config.timeoutSeconds }} timeoutSeconds: {{ .Values.central-storage.probes.readiness.config.timeoutSeconds }} {{- end }} {{- if .Values.central-storage.probes.readiness.config.successThreshold }} successThreshold: {{ .Values.central-storage.probes.readiness.config.successThreshold }} {{- end }} {{- if .Values.central-storage.probes.readiness.config.failureThreshold }} failureThreshold: {{ .Values.central-storage.probes.readiness.config.failureThreshold }} {{- end }}:% {{- if .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }} {{- end }} {{- end }} {{- end}} env: {{- range $key, $value := .Values.central-storage.configs }} - name: {{ $key | snakecase | upper }} valueFrom: secretKeyRef: name: central-storage-config key: {{ $key | snakecase | upper }} {{- end }}