helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Promtail Deamonset custom labels

Open BestChinchilla opened this issue 4 months ago • 0 comments

Hi! How can I add custom labels to promtail daemonset? In helm chart only predefined labels are available

daemonset.yaml

  labels:
    {{- include "promtail.labels" . | nindent 4 }}

_helpers.tpl

{{/*
Common labels
*/}}
{{- define "promtail.labels" -}}
helm.sh/chart: {{ include "promtail.chart" . }}
{{ include "promtail.selectorLabels" . }}
{{- if or .Chart.AppVersion .Values.image.tag }}
app.kubernetes.io/version: {{ mustRegexReplaceAllLiteral "@sha.*" .Values.image.tag "" | default .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "promtail.selectorLabels" -}}
app.kubernetes.io/name: {{ include "promtail.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

BestChinchilla avatar Oct 02 '24 08:10 BestChinchilla