apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: web app.kubernetes.io/part-of: {{ .Release.Name }} spec: revisionHistoryLimit: 3 replicas: {{ .Values.deployment.replicas }} strategy: type: {{ .Values.deployment.strategy }} selector: matchLabels: app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }} spec: serviceAccountName: {{ .Release.Name }} containers: - name: {{ .Release.Name }} image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} ports: - name: http containerPort: {{ .Values.service.http.port }} protocol: TCP volumeMounts: - name: {{ .Release.Name }}-config mountPath: /config resources: {{- toYaml .Values.deployment.resources | nindent 12 }} env: - name: LISTEN value: "0.0.0.0:{{ .Values.service.http.port }}" {{- range $k,$v := .Values.deployment.env }} - name: {{ $k }} value: {{ $v | quote }} {{- end }} {{- with .Values.deployment.envFrom }} envFrom: {{- toYaml . | nindent 12 }} {{- end }} livenessProbe: tcpSocket: port: {{ .Values.service.http.port }} initialDelaySeconds: 0 failureThreshold: 3 timeoutSeconds: 1 periodSeconds: 10 readinessProbe: tcpSocket: port: {{ .Values.service.http.port }} initialDelaySeconds: 0 failureThreshold: 3 timeoutSeconds: 1 periodSeconds: 10 startupProbe: tcpSocket: port: {{ .Values.service.http.port }} initialDelaySeconds: 0 failureThreshold: 30 timeoutSeconds: 1 periodSeconds: 5 volumes: - name: {{ .Release.Name }}-config persistentVolumeClaim: claimName: {{ .Release.Name }}-config