charts/speedtest/templates/deployment.yaml

43 lines
1.3 KiB
YAML
Raw Normal View History

2018-06-23 22:54:10 +00:00
apiVersion: extensions/v1beta1
#apiVersion: apps/v1beta2
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 }}
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