You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to add additional zabbix role rules via rbac.additionalRulesForClusterRole but it failed with an error: Error: YAML parse error on zabbix/templates/clusterrole.yaml: error converting YAML to JSON: yaml: line 53: did not find expected key
Version of Helm and Kubernetes:
Helm: version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}
What happened:
The helm install (or template) ends with an error: Error: YAML parse error on zabbix/templates/clusterrole.yaml: error converting YAML to JSON: yaml: line 53: did not find expected key
Running with debug flag renders the template with the error which reveals the source of the error:
The template code to render the additional rules looks like:
{{- if .Values.rbac.additionalRulesForClusterRole }}
{{ toYaml .Values.rbac.additionalRulesForClusterRole | indent 0 }}
{{- end }}
{{- end }}
It looks like there is incorrect indent value. Should be 4 instead of 0. We use chart version 4.4.1but the 5.0.0 behaves the same and I see the same code in master branch
What you expected to happen:
Template should be rendered, the release installed.
How to reproduce it (as minimally and precisely as possible):
Add this to the values.overrides.yaml:
rbac:
# -- Specifies whether the RBAC resources should be created
create: true
additionalRulesForClusterRole:
# - apiGroups: [ "" ]
# resources:
# - nodes/proxy
# verbs: [ "get", "list", "watch" ]
# SCC. Unfortunately there is a bug in Zabbix Helm chart preventing setting additional rules.
# https://docs.openshift.com/container-platform/4.15/authentication/managing-security-context-constraints.html#role-based-access-to-ssc_configuring-internal-oauth
- apiGroups:
- security.openshift.io
resourceNames:
- zabbix
resources:
- securitycontextconstraints
verbs:
- use
Describe the bug
I tried to add additional zabbix role rules via rbac.additionalRulesForClusterRole but it failed with an error:
Error: YAML parse error on zabbix/templates/clusterrole.yaml: error converting YAML to JSON: yaml: line 53: did not find expected key
Version of Helm and Kubernetes:
Helm:
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}
What happened:
The helm install (or template) ends with an error:
Error: YAML parse error on zabbix/templates/clusterrole.yaml: error converting YAML to JSON: yaml: line 53: did not find expected key
Running with debug flag renders the template with the error which reveals the source of the error:
The template code to render the additional rules looks like:
It looks like there is incorrect indent value. Should be 4 instead of 0. We use chart version 4.4.1but the 5.0.0 behaves the same and I see the same code in master branch
What you expected to happen:
Template should be rendered, the release installed.
How to reproduce it (as minimally and precisely as possible):
helm template zabbix zabbix-community/zabbix --version 5.0.0 -f values.overrides.yaml
Anything else we need to know:
The text was updated successfully, but these errors were encountered: