banzai-charts
banzai-charts copied to clipboard
[thanos] rule-volume from configmap is not rendered correctly in rule-statefuleset template
Describe the bug
when the rule component is enabled, the volume from configmap of thanos-rules is not rendered correctly in the rule-statefulset template. Check out this line:
https://github.com/banzaicloud/banzai-charts/blob/master/thanos/templates/rule-statefulset.yaml#L132
{{- if empty .Values.rule.ruleOverrideName -}}
The right-hand trimming-off should be removed, so it looks like this:
- name: rule-volume
configMap:
{{- if empty .Values.rule.ruleOverrideName }}
name: {{ include "thanos.fullname" . }}-rules
{{- else }}
name: {{ .Values.rule.ruleOverrideName }}
{{- end }}
Steps to reproduce the issue:
$ helm template thanos -n monitoring -x templates/rule-statefulset.yaml --set rule.enabled=true
Check the last two lines for rule-volume in the output:
- name: rule-volume
configMap:name: monitoring-thanos-rules
Expected behavior The rule-volume from configmap should be rendered as below:
- name: rule-volume
configMap:
name: monitoring-thanos-rules
Screenshots
Additional context
The workaround is to specify the .Values.rule.ruleOverrideName
value, however, with this .rule.ruleOverrideName
value set, the configmap for the thanos-rules is not turned on, due to the condition for the configmap requiring the ruleOverrideName
be empty: https://github.com/banzaicloud/banzai-charts/blob/master/thanos/templates/rule-configmap.yaml#L1
Hello :) I have also an issue with rule-statefulset when I upgrade Thanos chart with the rule object enable, even without rulefiles.
Error: UPGRADE FAILED: YAML parse error on thanos/templates/rule-statefulset.yaml: error converting YAML to JSON: yaml: line 44: did not find expected key
I Don't kwow if t's related or if someone have encounter similar issue
I'm also experiencing the same issue.
I was able to work around it by changing indent
to nindent