Skip to content

Commit

Permalink
fix(operator): feature gates map allows add empty items
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelaraujo committed Dec 12, 2024
1 parent a836da3 commit 48af431
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions charts/opentelemetry-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,11 @@ The image to use for opentelemetry-operator.
{{- end }}
{{- define "opentelemetry-operator.featureGatesMap" -}}
{{$first := true}}
{{- range $key, $value := .Values.manager.featureGatesMap -}}
{{- if $first -}}
{{ $first = false }}
{{- else -}}
,
{{- end -}}
{{- if $value -}}
{{- $key }}
{{- end -}}
{{- $list := list -}}
{{- range $k, $v := .Values.manager.featureGatesMap -}}
{{- if $v -}}
{{- $list = append $list (printf "%s=true" $k) -}}
{{- end -}}
{{- end -}}
{{ join "," $list }}
{{- end }}

0 comments on commit 48af431

Please sign in to comment.