{{- if .Values.knativeDeploy }} {{- else }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "fullname" . }} labels: draft: {{ default "draft-app" .Values.draft }} chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" spec: selector: matchLabels: app: {{ template "fullname" . }} {{- if .Values.hpa.enabled }} {{- else }} replicas: {{ .Values.replicaCount }} {{- end }} template: metadata: labels: draft: {{ default "draft-app" .Values.draft }} app: {{ template "fullname" . }} {{- if .Values.podAnnotations }} annotations: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- range $pkey, $pval := .Values.env }} - name: {{ $pkey }} value: {{ quote $pval }} {{- end }} envFrom: {{ toYaml .Values.envFrom | indent 10 }} ports: - containerPort: {{ .Values.service.internalPort }} livenessProbe: httpGet: path: {{ .Values.probePath }} port: {{ .Values.service.internalPort }} initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} successThreshold: {{ .Values.livenessProbe.successThreshold }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: path: {{ .Values.probePath }} port: {{ .Values.service.internalPort }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} successThreshold: {{ .Values.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: {{ toYaml .Values.resources | indent 12 }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- end }}