feat(helm): allow extraObjects as dict (#13252)

Signed-off-by: TheRealNoob <mike1118@live.com>
Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Co-authored-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
pull/18951/head^2
TheRealNoob 9 months ago committed by GitHub
parent 1cda92572a
commit 6a953bb492
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docs/sources/setup/install/helm/reference.md
  2. 2
      production/helm/loki/CHANGELOG.md
  3. 19
      production/helm/loki/templates/extra-manifests.yaml
  4. 8
      production/helm/loki/values.yaml

@ -4505,10 +4505,10 @@ true
</tr>
<tr>
<td>extraObjects</td>
<td>list</td>
<td>string</td>
<td></td>
<td><pre lang="json">
[]
null
</pre>
</td>
</tr>

@ -13,6 +13,8 @@ Entries should include a reference to the pull request that introduced the chang
## Unreleased
- [ENHANCEMENT] Expand `extraObjects` to have more flexibility in templating [#13252](https://github.com/grafana/loki/pull/13252)
## 6.38.0
- [FEATURE] Make access modes for persistence on all PVCs and StatefulSets editable [#13474](https://github.com/grafana/loki/pull/13474)

@ -1,8 +1,15 @@
{{- range .Values.extraObjects }}
{{- /* Normalize extraObjects to a list, easier to loop over */ -}}
{{- $extraObjects := .Values.extraObjects | default (list) -}}
{{- if kindIs "map" $extraObjects -}}
{{- $extraObjects = values $extraObjects -}}
{{- end -}}
{{- range $extraObjects }}
---
{{ if kindIs "map" . }}
{{ tpl (toYaml .) $ }}
{{ else }}
{{ tpl . $ }}
{{ end }}
{{- if kindIs "map" . }}
{{- tpl (toYaml .) $ | nindent 0 }}
{{- else if kindIs "string" . }}
{{- tpl . $ | nindent 0 }}
{{- end }}
{{- end }}

@ -3815,9 +3815,11 @@ minio:
memory: 128Mi
# Allow the address used by Loki to refer to Minio to be overridden
address: null
# Create extra manifests via values. Would be passed through `tpl` for templating
# objects can also be provided as multiline strings, useful for templating field names
extraObjects: []
# Create extra manifests via values
# Can be a list or dictionary, both are passed through `tpl`. If dict, keys are ignored and only values are used.
# Objects can also be defined as multiline strings, useful for templating field names
extraObjects: null
# - apiVersion: v1
# kind: ConfigMap
# metadata:

Loading…
Cancel
Save