loki
loki copied to clipboard
Loki helm chart validation fails when schemaConfig isn't provided and managing own config
Describe the bug
When trying to render the chart, with the value generatedConfigObjectName
set to an empty string, the rendering fails with an execution error in validate.yaml
The chart expects to set a value for schemaConfig even if it won´t be used.
To Reproduce Steps to reproduce the behavior:
- fetched the chart
- in a separate values file, set
loki.generatedConfigObjectName: ""
, don't setschemaConfig
oruseTestSchema
. Don't usestructuredConfig
- generate the manifests from the chart.
- result:
Error: execution error at (loki/templates/validate.yaml:40:4): You must provide a schema_config for Loki, one is not provided as this will be individual for every Loki cluster. See https://grafana.com/docs/loki/latest/operations/storage/schema/ for schema information. For quick testing (with no persistence) add `--set loki.useTestSchema=true`
Expected behavior a rendered chart without any config objects.
Environment:
- Infrastructure: laptop
- Deployment tool: helm
Screenshots, Promtail config, or terminal output snippet from validate.yaml
{{- if and (empty .Values.loki.schemaConfig) (empty .Values.loki.structuredConfig.schema_config) (not .Values.loki.useTestSchema) }}
{{- fail "You must provide a schema_config for Loki, one is not provided as this will be individual for every Loki cluster. See https://grafana.com/docs/loki/latest/operations/storage/schema/ for schema information. For quick testing (with no persistence) add `--set loki.useTestSchema=true`"}}
{{- end }}
does not take into account case where we want to use an existing CM for config, stated in values.yaml:
# 3. Use an existing secret or configmap to provide the configuration.
# This option is mostly provided for folks who have external processes which provide or modify the configuration.
# When using this option you can specify a different name for loki.generatedConfigObjectName and configObjectName
# if you have a process which takes the generated config and modifies it, or you can stop the chart from generating
# a config entirely by setting loki.generatedConfigObjectName to