mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-25 16:07:24 +00:00
refactor(api/v1beta1/owner_role.go): split cluster role that need to be cluster bound
Signed-off-by: Massimiliano Giovagnoli <me@maxgio.it>
This commit is contained in:
@@ -40,11 +40,15 @@ func (in OwnerSpec) GetRoles(tenant Tenant, index int) []string {
|
||||
|
||||
roles := []string{"admin", "capsule-namespace-deleter"}
|
||||
|
||||
return roles
|
||||
}
|
||||
|
||||
func (in OwnerSpec) GetClusterRoles(tenant Tenant) []string {
|
||||
if tenant.Spec.GitOpsReady {
|
||||
roles = append(roles, in.getGitOpsRoles(tenant)...)
|
||||
return in.getGitOpsRoles(tenant)
|
||||
}
|
||||
|
||||
return roles
|
||||
return []string{}
|
||||
}
|
||||
|
||||
func (in OwnerSpec) getGitOpsRoles(tenant Tenant) []string {
|
||||
|
||||
Reference in New Issue
Block a user