Commit 47a3f937 authored by Lars Fenneberg's avatar Lars Fenneberg

Helm charts: Beautify template output a little bit

parent 9598c469
......@@ -11,7 +11,7 @@ metadata:
name: {{ template "viking-service.fullname" . }}
{{- if .Values.vikingService.annotations }}
annotations:
{{ toYaml .Values.vikingService.annotations | nindent 4}}
{{- toYaml .Values.vikingService.annotations | nindent 4}}
{{- end }}
spec:
{{/* Try to collect kind specific differences here */}}
......@@ -45,31 +45,31 @@ spec:
metadata:
{{- if .Values.vikingService.podAnnotations }}
annotations:
{{ toYaml .Values.vikingService.podAnnotations | nindent 8 }}
{{- toYaml .Values.vikingService.podAnnotations | nindent 8 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ template "viking-service.name" . }}
app.kubernetes.io/component: service
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.vikingService.podLabels }}
{{ toYaml .Values.vikingService.podLabels | nindent 8 }}
{{- end }}
{{- if .Values.vikingService.podLabels }}
{{- toYaml .Values.vikingService.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if .Values.vikingService.dnsConfig }}
dnsConfig:
{{ toYaml .Values.vikingService.dnsConfig | nindent 8 }}
{{- toYaml .Values.vikingService.dnsConfig | nindent 8 }}
{{- end }}
dnsPolicy: {{ .Values.vikingService.dnsPolicy }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | nindent 8 }}
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.vikingService.priorityClassName }}
priorityClassName: "{{ .Values.vikingService.priorityClassName }}"
{{- end }}
{{- if .Values.vikingService.podSecurityContext }}
securityContext:
{{ toYaml .Values.vikingService.podSecurityContext | nindent 8 }}
{{- toYaml .Values.vikingService.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- name: varnish
......@@ -79,7 +79,7 @@ spec:
- -n
- /run/varnish-home
{{- if .Values.vikingService.varnish.extraArgs }}
{{ toYaml .Values.vikingService.varnish.extraArgs | nindent 12 }}
{{- toYaml .Values.vikingService.varnish.extraArgs | nindent 12 }}
{{- end }}
env:
- name: POD_NAME
......@@ -91,7 +91,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.vikingService.varnish.extraEnvs }}
{{ toYaml .Values.vikingService.varnish.extraEnvs | nindent 12 }}
{{- toYaml .Values.vikingService.varnish.extraEnvs | nindent 12 }}
{{- end }}
livenessProbe:
exec:
......@@ -128,7 +128,7 @@ spec:
securityContext:
readOnlyRootFilesystem: true
resources:
{{ toYaml .Values.vikingService.varnish.resources | nindent 12 }}
{{- toYaml .Values.vikingService.varnish.resources | nindent 12 }}
- name: haproxy
image: "{{ .Values.vikingService.haproxy.image.repository }}:{{ .Values.vikingService.haproxy.image.tag }}"
imagePullPolicy: "{{ .Values.vikingService.haproxy.image.pullPolicy }}"
......@@ -176,19 +176,19 @@ spec:
securityContext:
readOnlyRootFilesystem: true
resources:
{{ toYaml .Values.vikingService.haproxy.resources | nindent 12 }}
{{- toYaml .Values.vikingService.haproxy.resources | nindent 12 }}
hostNetwork: {{ .Values.vikingService.hostNetwork }}
{{- if .Values.vikingService.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vikingService.nodeSelector | nindent 8 }}
{{- toYaml .Values.vikingService.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.vikingService.tolerations }}
tolerations:
{{ toYaml .Values.vikingService.tolerations | nindent 8 }}
{{- toYaml .Values.vikingService.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.vikingService.affinity }}
affinity:
{{ toYaml .Values.vikingService.affinity | nindent 8 }}
{{- toYaml .Values.vikingService.affinity | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "viking-service.fullname" . }}
terminationGracePeriodSeconds: {{ .Values.vikingService.terminationGracePeriodSeconds }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment