|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "patchbay.fullname" . }}-patchbay-frontend |
| 5 | + labels: |
| 6 | + {{- include "patchbay.labels" . | nindent 4 }} |
| 7 | + role: patchbay-frontend |
| 8 | +spec: |
| 9 | + replicas: {{ .Values.patchbayFrontend.replicaCount }} |
| 10 | + selector: |
| 11 | + matchLabels: |
| 12 | + {{- include "patchbay.selectorLabels" . | nindent 6 }} |
| 13 | + role: patchbay-frontend |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + annotations: |
| 17 | + checksum/config: {{ (include (print $.Template.BasePath "/patchbay-frontend-env.yaml") .) | sha256sum }} |
| 18 | + checksum/secret: {{ (include (print $.Template.BasePath "/patchbay-frontend-secret-env.yaml") .) | sha256sum }} |
| 19 | + {{- if .Values.forceRedeploy }} |
| 20 | + forceRedeploy: {{ randAlphaNum 10 | quote }} |
| 21 | + {{- end }} |
| 22 | + {{- with .Values.patchbayFrontend.podAnnotations }} |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + labels: |
| 26 | + {{- include "patchbay.selectorLabels" . | nindent 8 }} |
| 27 | + role: patchbay-frontend |
| 28 | + spec: |
| 29 | + {{- if or .Values.imageCredentials.enabled .Values.imagePullSecrets }} |
| 30 | + imagePullSecrets: |
| 31 | + {{- if .Values.imageCredentials.enabled }} |
| 32 | + - name: {{ include "patchbay.fullname" . }}-pull-secret |
| 33 | + {{- end }} |
| 34 | + {{- with .Values.imagePullSecrets }} |
| 35 | + {{- toYaml . | nindent 8 }} |
| 36 | + {{- end }} |
| 37 | + {{- end }} |
| 38 | + serviceAccountName: {{ include "patchbay.serviceAccountName" . }} |
| 39 | + securityContext: |
| 40 | + {{- toYaml .Values.patchbayFrontend.podSecurityContext | nindent 8 }} |
| 41 | + containers: |
| 42 | + - name: {{ .Chart.Name }}-patchbay-frontend |
| 43 | + securityContext: |
| 44 | + {{- toYaml .Values.patchbayFrontend.securityContext | nindent 12 }} |
| 45 | + image: "{{ .Values.patchbayFrontend.image.repository }}:{{ .Values.patchbayFrontend.image.tag | default .Values.appVersion }}" |
| 46 | + imagePullPolicy: {{ .Values.patchbayFrontend.image.pullPolicy }} |
| 47 | + envFrom: |
| 48 | + - configMapRef: |
| 49 | + name: {{ include "patchbay.fullname" . }}-env-patchbay-frontend |
| 50 | + - secretRef: |
| 51 | + name: {{ include "patchbay.fullname" . }}-secret-env-patchbay-frontend |
| 52 | + {{- if .Values.patchbayFrontend.externalConfigMapName }} |
| 53 | + - configMapRef: |
| 54 | + name: {{ .Values.patchbayFrontend.externalConfigMapName }} |
| 55 | + {{- end }} |
| 56 | + {{- if .Values.patchbayFrontend.externalSecretName }} |
| 57 | + - secretRef: |
| 58 | + name: {{ .Values.patchbayFrontend.externalSecretName }} |
| 59 | + {{- end }} |
| 60 | + {{- if .Values.patchbayFrontend.extraEnvVars }} |
| 61 | + env: |
| 62 | + {{- include "common.tplvalues.render" (dict "value" .Values.patchbayFrontend.extraEnvVars "context" $) | nindent 12 }} |
| 63 | + {{- end }} |
| 64 | + ports: |
| 65 | + - name: http |
| 66 | + containerPort: {{ .Values.patchbayFrontend.service.port }} |
| 67 | + protocol: TCP |
| 68 | + livenessProbe: |
| 69 | + httpGet: |
| 70 | + path: / |
| 71 | + port: http |
| 72 | + readinessProbe: |
| 73 | + httpGet: |
| 74 | + path: / |
| 75 | + port: http |
| 76 | + resources: |
| 77 | + {{- toYaml .Values.patchbayFrontend.resources | nindent 12 }} |
| 78 | + {{- with .Values.patchbayFrontend.nodeSelector }} |
| 79 | + nodeSelector: |
| 80 | + {{- toYaml . | nindent 8 }} |
| 81 | + {{- end }} |
| 82 | + {{- with .Values.patchbayFrontend.affinity }} |
| 83 | + affinity: |
| 84 | + {{- toYaml . | nindent 8 }} |
| 85 | + {{- end }} |
| 86 | + {{- with .Values.patchbayFrontend.tolerations }} |
| 87 | + tolerations: |
| 88 | + {{- toYaml . | nindent 8 }} |
| 89 | + {{- end }} |
0 commit comments