charts/speedtest/templates/deployment.yaml

48 lines
1.4 KiB
YAML
Raw Normal View History

2019-08-05 12:13:12 +00:00
apiVersion: apps/v1
2018-06-23 22:54:10 +00:00
kind: Deployment
metadata:
name: {{ template "speedtest.fullname" . }}
labels:
app: {{ template "speedtest.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "speedtest.name" . }}
release: {{ .Release.Name }}
replicas: {{ default 1 .Values.replicas }}
template:
metadata:
labels:
app: {{ template "speedtest.name" . }}
release: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
2018-06-23 22:54:10 +00:00
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- name: {{ template "speedtest.name" . }}
mountPath: /src/config.ini
subPath: config.ini
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
volumes:
- name: {{ template "speedtest.name" . }}
configMap:
name: {{ template "speedtest.fullname" . }}
items:
- key: config.ini
path: config.ini