mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-24 07:09:30 +00:00
[common] Add common chart from KaH
This commit is contained in:
39
charts/common/templates/addons/promtail/_container.tpl
Normal file
39
charts/common/templates/addons/promtail/_container.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
{{/*
|
||||
The promtail sidecar container to be inserted.
|
||||
*/}}
|
||||
{{- define "common.addon.promtail.container" -}}
|
||||
{{- if lt (len .Values.addons.promtail.volumeMounts) 1 }}
|
||||
{{- fail "At least 1 volumeMount is required for the promtail container" }}
|
||||
{{- end -}}
|
||||
name: promtail
|
||||
image: "{{ .Values.addons.promtail.image.repository }}:{{ .Values.addons.promtail.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.addons.promtail.pullPolicy }}
|
||||
{{- with .Values.addons.promtail.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.addons.promtail.env }}
|
||||
env:
|
||||
{{- range $k, $v := . }}
|
||||
- name: {{ $k }}
|
||||
value: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
args:
|
||||
{{- range .Values.addons.promtail.args }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
- "-config.file=/etc/promtail/promtail.yaml"
|
||||
volumeMounts:
|
||||
- name: promtail-config
|
||||
mountPath: /etc/promtail/promtail.yaml
|
||||
subPath: promtail.yaml
|
||||
readOnly: true
|
||||
{{- with .Values.addons.promtail.volumeMounts }}
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.addons.promtail.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user