Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/production/helm/templates/promtail/daemonset.yaml

98 lines
2.9 KiB

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: {{ template "promtail.fullname" . }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.promtail.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ template "promtail.name" . }}
release: {{ .Release.Name }}
updateStrategy:
type: {{ .Values.promtail.deploymentStrategy }}
{{- if ne .Values.promtail.deploymentStrategy "RollingUpdate" }}
rollingUpdate: null
{{- end }}
template:
metadata:
labels:
app: {{ template "promtail.name" . }}
release: {{ .Release.Name }}
{{- with .Values.promtail.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "promtail.serviceAccountName" . }}
{{- if .Values.promtail.priorityClassName }}
priorityClassName: {{ .Values.promtail.priorityClassName }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.promtail.image.repository }}:{{ .Values.promtail.image.tag }}"
imagePullPolicy: {{ .Values.promtail.image.pullPolicy }}
args:
- "-config.file=/etc/promtail/promtail.yaml"
- "-client.url=http://{{ template "loki.fullname" . }}:{{ .Values.loki.service.port }}/api/prom/push"
volumeMounts:
- name: config
mountPath: /etc/promtail
{{- range .Values.promtail.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .readOnly }}
readOnly: {{ .readOnly}}
{{- end }}
{{- end }}
env:
- name: HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
ports:
- containerPort: 80
name: http-metrics
securityContext:
privileged: true
runAsUser: 0
{{- with .Values.promtail.livenessProbe }}
livenessProbe:
{{ toYaml . | indent 12 }}
{{- end }}
{{- with .Values.promtail.readinessProbe }}
readinessProbe:
{{ toYaml . | indent 12 }}
{{- end }}
{{- with .Values.promtail.resources }}
resources:
{{ toYaml . | indent 12 }}
{{- end }}
{{- with .Values.promtail.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.promtail.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.promtail.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "promtail.fullname" . }}
{{- range .Values.promtail.volumes }}
- name: {{ .name }}
hostPath:
path: {{ .path }}
{{- end }}