Defining multiple crs in headlamp/bb values results in yaml unmarshall error
Bug
Description
When defining multiple cr's (actually as per example: https://repo1.dso.mil/big-bang/product/packages/headlamp/-/blob/main/docs/keycloak.md?ref_type=heads#example-multiple-groups-with-different-access) then the generated rbac manifest holds an error:
---
# Source: headlamp/templates/bigbang/dev-clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: headlamp-readonly
rules:
- apiGroups:
- ""
resources:
- pods
- services
- configmaps
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- get
- list
- watch--- <====================ERROR
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: headlamp-developer
rules:
This yields a reconcile error eventually:
Warning UpgradeFailed 19s helm-controller Helm upgrade failed for release headlamp/headlamp-headlamp with chart headlamp@0.40.0-bb.0: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
The issue is in the go-templating, specifically:
{{- end }}
could be replaced with:
{{ end }}
To fix the issue (but i don't really excel in go-templating so maybe there are better ways).
I'm running headlamp chart version:
version: 0.40.0-bb.0