apiVersion: apps/v1 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 }} 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