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

Add cozystack-cluster-admin #517

Merged
merged 4 commits into from
Dec 9, 2024
Merged
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
13 changes: 13 additions & 0 deletions packages/system/keycloak-configure/templates/configure-kk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,16 @@ spec:
realmRef:
name: keycloakrealm-cozy
kind: ClusterKeycloakRealm

---

apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealmGroup
metadata:
name: cozystack-cluster-admin
namespace: cozy-system
spec:
name: cozystack-cluster-admin
realmRef:
name: keycloakrealm-cozy
kind: ClusterKeycloakRealm
33 changes: 32 additions & 1 deletion packages/system/keycloak-configure/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,39 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: admin
name: kubeapps-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: kubeapps-admin

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kubeapps-admin
namespace: cozy-public
kvaps marked this conversation as resolved.
Show resolved Hide resolved
subjects:
- kind: Group
name: kubeapps-admin
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: kubeapps-admin
apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cozystack-cluster-admin-group
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cozystack-cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: cozystack-cluster-admin
57 changes: 57 additions & 0 deletions packages/system/keycloak-configure/templates/roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubeapps-admin
rules:
- apiGroups: [""]
resources:
- "*"
verbs:
- get
- list
- watch
- apiGroups: ["apps.cozystack.io"]
resources:
- '*'
verbs:
- '*'
- apiGroups: ["helm.toolkit.fluxcd.io"]
resources:
- helmreleases
verbs:
- '*'
---
kvaps marked this conversation as resolved.
Show resolved Hide resolved

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kubeapps-admin
namespace: cozy-public
kvaps marked this conversation as resolved.
Show resolved Hide resolved
rules:
- apiGroups: ["source.toolkit.fluxcd.io"]
resources: ["helmrepositories"]
verbs:
- get
- list
- apiGroups: ["source.toolkit.fluxcd.io"]
resources:
- helmcharts
verbs: ["*"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cozystack-cluster-admin
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
kvaps marked this conversation as resolved.
Show resolved Hide resolved