| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- {{- if .Values.webFrontend.enabled }}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ include "shop-recycle.fullname" . }}-web
- labels:
- app: {{ include "shop-recycle.fullname" . }}-web
- {{- include "shop-recycle.labels" . | nindent 4 }}
- namespace: {{ .Release.Namespace }}
- spec:
- replicas: {{ .Values.webFrontend.replicaCount }}
- selector:
- matchLabels:
- app: {{ include "shop-recycle.fullname" . }}-web
- {{- include "shop-recycle.selectorLabels" . | nindent 6 }}
- template:
- metadata:
- labels:
- app: {{ include "shop-recycle.fullname" . }}-web
- {{- include "shop-recycle.selectorLabels" . | nindent 8 }}
- spec:
- {{- if .Values.rbac.create }}
- serviceAccountName: {{ include "shop-recycle.serviceAccountName" . }}
- {{- end }}
- {{- if or .Values.global.registry.createSecret .Values.global.imagePullSecrets }}
- imagePullSecrets:
- {{- if .Values.global.registry.createSecret }}
- - name: {{ include "shop-recycle.fullname" . }}-registry-secret
- {{- end }}
- {{- with .Values.global.imagePullSecrets }}
- {{ toYaml . | indent 8 }}
- {{- end }}
- {{- end }}
-
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- containers:
- - name: web
- image: "{{ .Values.image.registry }}/{{ .Values.image.namespace }}/{{ .Values.webFrontend.image.name }}:{{ .Values.webFrontend.image.tag | default .Values.image.tag | default .Chart.AppVersion }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - name: http
- containerPort: {{ .Values.webFrontend.containerPort }}
- protocol: {{ .Values.webFrontend.protocol }}
- env:
- {{- range $key, $value := .Values.webFrontend.env }}
- - name: {{ $key }}
- value: "{{ $value }}"
- {{- end }}
- {{- if .Values.webFrontend.livenessProbe }}
- livenessProbe:
- {{- toYaml .Values.webFrontend.livenessProbe | nindent 12 }}
- {{- end }}
- {{- if .Values.webFrontend.readinessProbe }}
- readinessProbe:
- {{- toYaml .Values.webFrontend.readinessProbe | nindent 12 }}
- {{- end }}
- resources:
- {{- toYaml .Values.webFrontend.resources | nindent 12 }}
- {{- end }}
|