Updated with cleaner toYaml Helm logic

pull/379/head
Nicholas Nezis 6 years ago
parent 844024ca9f
commit 5d75b6abd1
  1. 16
      production/helm/templates/promtail/daemonset.yaml
  2. 6
      production/helm/values.yaml

@ -45,12 +45,8 @@ spec:
volumeMounts:
- name: config
mountPath: /etc/promtail
{{- range .Values.promtail.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .readOnly }}
readOnly: {{ .readOnly}}
{{- end }}
{{- if .Values.promtail.volumeMounts -}}
{{ toYaml .Values.promtail.volumeMounts | nindent 12 }}
{{- end }}
env:
- name: HOSTNAME
@ -91,8 +87,6 @@ spec:
- name: config
configMap:
name: {{ template "promtail.fullname" . }}
{{- range .Values.promtail.volumes }}
- name: {{ .name }}
hostPath:
path: {{ .path }}
{{- end }}
{{- if .Values.promtail.volumes -}}
{{ toYaml .Values.promtail.volumes | nindent 8 }}
{{- end }}

@ -106,9 +106,11 @@ promtail:
volumes:
- name: varlog
path: /var/log
hostPath:
path: /var/log
- name: varlibdockercontainers
path: /var/lib/docker/containers
hostPath:
path: /var/lib/docker/containers
volumeMounts:
- name: varlog

Loading…
Cancel
Save