74 lines
2.2 KiB
YAML
74 lines
2.2 KiB
YAML
apiVersion: {{ template "deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "app.name" . }}
|
|
labels:
|
|
app: {{ template "app.name" . }}
|
|
chart: {{ template "app.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "app.name" . }}
|
|
release: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ template "app.name" . }}
|
|
release: {{ .Release.Name }}
|
|
{{- if .Values.podAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: {{ template "app.name" . }}-config
|
|
- name: card-template-volume
|
|
configMap:
|
|
name: {{ template "app.name" . }}-card-template
|
|
securityContext:
|
|
runAsUser: 1000
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
{{- range $key, $value := $.Values.extraEnvs }}
|
|
- name: {{ $key }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /etc/config
|
|
- name: card-template-volume
|
|
mountPath: /etc/template
|
|
args:
|
|
- --config-file=/etc/config/connectors.yaml
|
|
- --template-file=/etc/template/card.tmpl
|
|
{{- with .Values.container.additionalArgs }}
|
|
{{ toYaml . | indent 12 }}
|
|
{{- end}}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.container.port }}
|
|
protocol: TCP
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|