Skip to content

Commit

Permalink
update optional pod labels for use of version, via verbosePodLabels.e…
Browse files Browse the repository at this point in the history
…nabled in values

Signed-off-by: jeremy.hulick <[email protected]>
  • Loading branch information
jhulick committed Dec 11, 2024
1 parent dcb32fc commit aeb9cc3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/fluent-bit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Pod labels
Verbose Pod labels
*/}}
{{- define "fluent-bit.podLabels" -}}
{{- define "fluent-bit.verbosePodLabels" -}}
{{ include "fluent-bit.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
Expand Down
6 changes: 5 additions & 1 deletion charts/fluent-bit/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ spec:
template:
metadata:
labels:
{{- include "fluent-bit.podLabels" . | nindent 8 }}
{{- if .Values.verbosePodLabels.enabled }}
{{- include "fluent-bit.verbosePodLabels" . | nindent 8 }}
{{- else }}
{{- include "fluent-bit.selectorLabels" . | nindent 8 }}
{{- end }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
6 changes: 5 additions & 1 deletion charts/fluent-bit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ spec:
template:
metadata:
labels:
{{- include "fluent-bit.podLabels" . | nindent 8 }}
{{- if .Values.verbosePodLabels.enabled }}
{{- include "fluent-bit.verbosePodLabels" . | nindent 8 }}
{{- else }}
{{- include "fluent-bit.selectorLabels" . | nindent 8 }}
{{- end }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ podAnnotations: {}

podLabels: {}

# adds app.kubernetes.io/version label to pods for istio required labels
verbosePodLabels:
enabled: false

## How long (in seconds) a pods needs to be stable before progressing the deployment
##
minReadySeconds:
Expand Down

0 comments on commit aeb9cc3

Please sign in to comment.