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

feat(CAPECPI-2422): expose admin clusterrole #433

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion chart/templates/gotk/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,17 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
name: {{ .Values.gotk.rbac.adminClusterRole.name }}
subjects:
- kind: ServiceAccount
name: fluxcd
namespace: "{{ .Release.Namespace }}"
{{ if .Values.gotk.rbac.adminClusterRole.rules }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Values.gotk.rbac.adminClusterRole.name }}
rules:
{{ .Values.gotk.rbac.adminClusterRole.rules | toYaml }}
{{- end }}
11 changes: 10 additions & 1 deletion chart/templates/kraan/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,18 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
name: {{ .Values.kraan.rbac.adminClusterRole.name }}
subjects:
- kind: ServiceAccount
name: kraan
namespace: {{.Release.Namespace}}
{{ if .Values.kraan.rbac.adminClusterRole.rules }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Values.kraan.rbac.adminClusterRole.name }}
rules:
{{ .Values.kraan.rbac.adminClusterRole.rules | toYaml }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ kraan:
enabled: true
rbac:
enabled: true
adminClusterRole:
# admin ClusterRole to be used by the controller, default is cluster-admin
name: "cluster-admin"
# specify rules to create a ClusterRole
# https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#policyrule-v1-rbac-authorization-k8s-io
# rules: []
netpolicy:
enabled: true
kraanController:
Expand Down Expand Up @@ -79,6 +85,12 @@ kraan:
gotk:
rbac:
enabled: true
adminClusterRole:
# admin ClusterRole to be used by the controller, default is cluster-admin
name: "cluster-admin"
# specify rules to create a ClusterRole
# https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#policyrule-v1-rbac-authorization-k8s-io
# rules: []
netpolicy:
enabled: true

Expand Down
Loading