Skip to content

Commit 72dc749

Browse files
authored
Merge pull request #1 from darkdoc/sudoers_crb
feat: Add cluster role binding with sudoers
2 parents 6cfdd1a + 9026459 commit 72dc749

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

.trivyignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hypershift admin ClusterRole is intentionally privileged; suppress noisy RBAC policy checks.
2-
KSV-0041
3-
KSV-0045
4-
KSV-0046
5-
KSV-0049
6-
KSV-0056
2+
AVD-KSV-0041
3+
AVD-KSV-0045
4+
AVD-KSV-0046
5+
AVD-KSV-0049
6+
AVD-KSV-0056
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if .Values.rbac.create }}
2+
{{- range .Values.rbac.sudoerGroups }}
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRoleBinding
5+
metadata:
6+
name: {{ lower . }}-sudoer-crb
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: sudoer
11+
subjects:
12+
- apiGroup: rbac.authorization.k8s.io
13+
kind: Group
14+
name: {{ . }}
15+
{{- end }}
16+
{{- end }}

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ rbac:
1212
name: hcp-admins-crb
1313
users: []
1414
groups: []
15+
sudoerGroups: []
1516

1617
clusterGroup:
1718
isHubCluster: true

0 commit comments

Comments
 (0)