Skip to content

Commit

Permalink
apps wc: refactor extra dev rbac to separate chart
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-elastisys committed Dec 17, 2024
1 parent 1973a2a commit 450a7d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
13 changes: 13 additions & 0 deletions helmfile.d/stacks/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@ templates:
- values/userCRDs/flux/fluxv2.yaml.gotmpl
- values/userCRDs/mongodbcommunity/mongodb.yaml.gotmpl
- values/userCRDs/strimzi/kafka.yaml.gotmpl

extra-dev-rbac:
inherit: [ template: rbac ]
condition: ck8sWorkloadCluster.enabled
chart: charts/user-crds
version: 1.0.0
name: extra-dev-rbac
needs:
- kube-system/user-rbac
labels:
app: dev-rbac
values:
- values/extra-dev-rbac.yaml.gotmpl
1 change: 1 addition & 0 deletions helmfile.d/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ releases:
- inherit: [ template: admin-rbac ]
- inherit: [ template: dev-rbac ]
- inherit: [ template: dev-rbac-crds ]
- inherit: [ template: extra-dev-rbac ]

- inherit: [ template: networkpolicies-common ]
- inherit: [ template: networkpolicies-service ]
Expand Down
6 changes: 6 additions & 0 deletions helmfile.d/values/extra-dev-rbac.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespaces: {{ toYaml .Values.user.namespaces | nindent 2 }}

roles: {{- toYaml .Values.user.extraRoles | nindent 2 }}
roleBindings: {{- toYaml .Values.user.extraRoleBindings | nindent 2 }}
clusterRoles: {{- toYaml .Values.user.extraClusterRoles | nindent 2 }}
clusterRoleBindings: {{- toYaml .Values.user.extraClusterRoleBindings | nindent 2 }}
5 changes: 0 additions & 5 deletions helmfile.d/values/userCRDs/common.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
namespaces: {{ toYaml .Values.user.namespaces | nindent 2 }}

roles: {{- toYaml .Values.user.extraRoles | nindent 2 }}
roleBindings: {{- toYaml .Values.user.extraRoleBindings | nindent 2 }}
clusterRoles: {{- toYaml .Values.user.extraClusterRoles | nindent 2 }}
clusterRoleBindings: {{- toYaml .Values.user.extraClusterRoleBindings | nindent 2 }}

0 comments on commit 450a7d1

Please sign in to comment.