Skip to content

Commit dc9ce56

Browse files
authored
Rbacs for plain k8s stack (#840)
* plain k8s stack Signed-off-by: Srinivasan Parthasarathy <[email protected]> * install for plain k8s Signed-off-by: Srinivasan Parthasarathy <[email protected]>
1 parent 4c0551d commit dc9ce56

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resources:
2+
- rolebindings.yaml
3+
- roles.yaml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This cluster role binding enables Iter8 handler to watch
2+
# K8s services in the cluster in any namespace
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRoleBinding
5+
metadata:
6+
name: svc-for-plain-k8s
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: svc-for-plain-k8s
11+
subjects:
12+
- kind: ServiceAccount
13+
name: handlers
14+
---
15+
# This cluster role binding enables Iter8 handler to watch
16+
# K8s deployments and deployment status in any namespace
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: ClusterRoleBinding
19+
metadata:
20+
name: deploy-for-plain-k8s
21+
roleRef:
22+
apiGroup: rbac.authorization.k8s.io
23+
kind: ClusterRole
24+
name: deploy-for-plain-k8s
25+
subjects:
26+
- kind: ServiceAccount
27+
name: handlers
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This cluster role enables getting and watching K8s services
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: svc-for-plain-k8s
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- services
11+
verbs:
12+
- get
13+
- list
14+
- watch
15+
---
16+
# This cluster role enables watching K8s deployments and their statuses
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: ClusterRole
19+
metadata:
20+
name: deploy-for-plain-k8s
21+
rules:
22+
- apiGroups:
23+
- "extensions"
24+
- "apps"
25+
resources:
26+
- deployments
27+
verbs:
28+
- get
29+
- list
30+
- watch
31+
- apiGroups:
32+
- "extensions"
33+
- "apps"
34+
resources:
35+
- deployments/status
36+
verbs:
37+
- get
38+
- list
39+
- watch

install/core/rbac/stacks/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ resources:
1616
- iter8-istio
1717
- iter8-kfserving
1818
- iter8-seldon
19+
- iter8-plain-k8s

mkdocs/docs/getting-started/install.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ kubectl wait --for=condition=Ready pods --all -n iter8-system
2424
To select the version of Iter8 during installation, select any Iter8 version (>= v0.6.0) from [Iter8's release history](https://github.com/iter8-tools/iter8/releases) and use it as the `TAG` above.
2525

2626
## RBAC rules
27-
As part of Iter8 installation, the following RBAC rules are also installed in your cluster.
27+
As part of Iter8 installation, the following RBAC rules are also installed in your cluster. You can Kustomize Iter8 installation in order to install Iter8 only for the K8s environments of your choice, and eliminate RBAC rules not needed in your environment.
28+
2829
??? info "Default RBAC Rules"
2930
| Resource | Permissions | Scope |
3031
| ----- | ---- | ----------- |
@@ -39,3 +40,5 @@ As part of Iter8 installation, the following RBAC rules are also installed in yo
3940
| virtualservices.networking.istio.io | get, list, patch, update, create, delete | Cluster-wide |
4041
| destinationrules.networking.istio.io | get, list, patch, update, create, delete | Cluster-wide |
4142
| seldondeployments.machinelearning.seldon.io | get, list, patch, update | Cluster-wide |
43+
| services | get, list, watch | Cluster-wide |
44+
| deployments | get, list, watch | Cluster-wide |

0 commit comments

Comments
 (0)