diff --git a/charts/fluent-bit/templates/_helpers.tpl b/charts/fluent-bit/templates/_helpers.tpl index 84a30563..ddc681ba 100644 --- a/charts/fluent-bit/templates/_helpers.tpl +++ b/charts/fluent-bit/templates/_helpers.tpl @@ -41,6 +41,9 @@ helm.sh/chart: {{ include "fluent-bit.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.labels }} +{{- toYaml .Values.labels }} +{{- end }} {{- end -}} {{/* diff --git a/charts/fluent-bit/templates/daemonset.yaml b/charts/fluent-bit/templates/daemonset.yaml index 12570954..df333668 100644 --- a/charts/fluent-bit/templates/daemonset.yaml +++ b/charts/fluent-bit/templates/daemonset.yaml @@ -6,9 +6,6 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "fluent-bit.labels" . | nindent 4 }} - {{- with .Values.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/fluent-bit/templates/deployment.yaml b/charts/fluent-bit/templates/deployment.yaml index 7ba61b5f..fdca153b 100644 --- a/charts/fluent-bit/templates/deployment.yaml +++ b/charts/fluent-bit/templates/deployment.yaml @@ -6,9 +6,6 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "fluent-bit.labels" . | nindent 4 }} - {{- with .Values.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/fluent-bit/templates/psp.yaml b/charts/fluent-bit/templates/psp.yaml index 2e7f500c..0d9d9836 100644 --- a/charts/fluent-bit/templates/psp.yaml +++ b/charts/fluent-bit/templates/psp.yaml @@ -3,6 +3,8 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ include "fluent-bit.fullname" . }} + labels: + {{- include "fluent-bit.labels" . | nindent 4 }} {{- if .Values.podSecurityPolicy.annotations }} annotations: {{- toYaml .Values.podSecurityPolicy.annotations | nindent 4 }}