diff --git a/packages/system/keycloak-configure/templates/rolebinding.yaml b/packages/system/keycloak-configure/templates/rolebinding.yaml index 53d606a7..a5ea3d46 100644 --- a/packages/system/keycloak-configure/templates/rolebinding.yaml +++ b/packages/system/keycloak-configure/templates/rolebinding.yaml @@ -6,7 +6,7 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: admin + name: kubeapps-admin subjects: - apiGroup: rbac.authorization.k8s.io kind: Group @@ -14,6 +14,22 @@ subjects: --- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kubeapps-admin + namespace: cozy-public +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: diff --git a/packages/system/keycloak-configure/templates/roles.yaml b/packages/system/keycloak-configure/templates/roles.yaml index 8b35215e..ef6ae19c 100644 --- a/packages/system/keycloak-configure/templates/roles.yaml +++ b/packages/system/keycloak-configure/templates/roles.yaml @@ -1,3 +1,45 @@ +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: + - '*' +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: kubeapps-admin + namespace: cozy-public +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: