63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "app.name" . }}
|
|
labels:
|
|
{{- include "app.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "app.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "app.selectorLabels" . | nindent 8 }}
|
|
{{- if .Values.podAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ template "app.serviceAccountName" . }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args:
|
|
{{- range $key, $value := .Values.args }}
|
|
{{- if $value }}
|
|
- --{{ $key }}={{ $value }}
|
|
{{- else }}
|
|
- --{{ $key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
env:
|
|
{{- if .Values.envVars }}
|
|
{{ toYaml .Values.envVars | nindent 12 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{ toYaml .Values.securityContext | indent 12 }}
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
volumeMounts:
|
|
- mountPath: /work
|
|
name: work
|
|
- mountPath: /tmp
|
|
name: tmp
|
|
volumes:
|
|
- name: work
|
|
emptyDir: {}
|
|
- name: tmp
|
|
emptyDir: {}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|