Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[thanos] rule-volume from configmap is not rendered correctly in rule-statefuleset template #1113

Open
michael-yxf opened this issue Jul 20, 2020 · 2 comments

Comments

@michael-yxf
Copy link

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

@LilaNKM
Copy link

LilaNKM commented Aug 3, 2020

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

@aclowkey
Copy link

aclowkey commented Jul 18, 2021

I'm also experiencing the same issue.
I was able to work around it by changing indent to nindent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants