Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
first go at adding in the clusterrole for cli access
Browse files Browse the repository at this point in the history
  • Loading branch information
s1cyan committed Jun 12, 2020
1 parent adb767e commit 17fe36a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/orchestrations/cli-services/0.2/kabanero-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ rules:
- '*'
verbs:
- '*'
- apiGroups:
- kabanero.io
resources:
- deployments
verbs:
- get
- list
---
apiVersion: v1
kind: ServiceAccount
Expand Down
22 changes: 22 additions & 0 deletions deploy/kabanero-customresources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,25 @@ subjects:
- kind: ServiceAccount
name: event-listener
namespace: kabanero

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kabanero-cli-service-deployments-role
namespace: kabanero
labels:
kabanero.io/install: 27-cli-service-role
subjects:
- kind: ServiceAccount
- name: kabanero-cli
- namespace: kabanero
rules:
- apiGroups:
- rbac.authorization.k8s.io
resources:
- deployments
verbs:
- get
- list

6 changes: 6 additions & 0 deletions pkg/controller/kabaneroplatform/targetnamespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ func createBindingTemplates(saNamespace string) []targetNamespaceRoleBindingTemp
clusterRoleName: "kabanero-pipeline-deploy-role",
},
// TODO: Second role binding for CLI service
{
name: "kabanero-cli-deploy-rolebinding"
saName: "kabanero-cli"
saNamespace: saNamespace,
clusterRoleName: "kabanero-cli-service-deployments-role"
},
}
}

Expand Down

0 comments on commit 17fe36a

Please sign in to comment.