{{- if .Values.app.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: warehouse13-app labels: {{- include "warehouse13.labels" . | nindent 4 }} app.kubernetes.io/component: app spec: replicas: {{ .Values.app.replicas }} selector: matchLabels: {{- include "warehouse13.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: app template: metadata: labels: {{- include "warehouse13.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: app spec: imagePullSecrets: - name: gitlab-dev-ns-registry-secret serviceAccountName: {{ include "warehouse13.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: app securityContext: {{- toYaml .Values.securityContext | nindent 10 }} image: "{{ .Values.app.image.repository }}:{{ .Values.app.image.tag }}" imagePullPolicy: {{ .Values.app.image.pullPolicy }} ports: - name: http containerPort: 8000 protocol: TCP env: - name: DATABASE_URL valueFrom: secretKeyRef: name: warehouse13-secrets key: database-url - name: STORAGE_BACKEND valueFrom: configMapKeyRef: name: warehouse13-config key: STORAGE_BACKEND - name: MINIO_ENDPOINT valueFrom: configMapKeyRef: name: warehouse13-config key: MINIO_ENDPOINT - name: MINIO_ACCESS_KEY valueFrom: secretKeyRef: name: warehouse13-secrets key: minio-root-user - name: MINIO_SECRET_KEY valueFrom: secretKeyRef: name: warehouse13-secrets key: minio-root-password - name: MINIO_BUCKET_NAME value: "test-artifacts" - name: MINIO_SECURE value: "false" - name: DEPLOYMENT_MODE valueFrom: configMapKeyRef: name: warehouse13-config key: DEPLOYMENT_MODE resources: {{- toYaml .Values.app.resources | nindent 10 }} {{- if .Values.app.healthCheck.enabled }} livenessProbe: httpGet: path: {{ .Values.app.healthCheck.liveness.path }} port: http initialDelaySeconds: {{ .Values.app.healthCheck.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.app.healthCheck.liveness.periodSeconds }} readinessProbe: httpGet: path: {{ .Values.app.healthCheck.readiness.path }} port: http initialDelaySeconds: {{ .Values.app.healthCheck.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.app.healthCheck.readiness.periodSeconds }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}