apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "garage-webui.fullname" . }} labels: {{- include "garage-webui.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "garage-webui.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "garage-webui.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "garage-webui.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 3909 protocol: TCP env: - name: API_BASE_URL value: {{ .Values.garageConfig.adminApiUrl | quote }} - name: S3_ENDPOINT_URL value: {{ .Values.garageConfig.s3Endpoint | quote }} - name: S3_REGION value: {{ .Values.garageConfig.region | quote }} {{- include "garage-webui.secretEnv" . | nindent 12 }} {{- if not (and .Values.secretRefs (and .Values.secretRefs.enabled (index .Values.secretRefs.keys "AUTH_USER_PASS"))) }} - name: AUTH_USER_PASS value: {{ .Values.auth.userPassHash | quote }} {{- end }} {{- if not (and .Values.secretRefs (and .Values.secretRefs.enabled (index .Values.secretRefs.keys "API_ADMIN_KEY"))) }} - name: API_ADMIN_KEY value: {{ .Values.garageConfig.adminApiKey | quote }} {{- end }} livenessProbe: httpGet: path: / port: http initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} readinessProbe: httpGet: path: / port: http initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} volumeMounts: {{- if .Values.config.enabled }} - name: config mountPath: /etc/garage.toml subPath: garage.toml readOnly: true {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: {{- if .Values.config.enabled }} - name: config configMap: name: {{ .Values.config.name }} {{- end }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }}