Skip to content

Commit

Permalink
Merge pull request #28 from uswitch/add-rbac
Browse files Browse the repository at this point in the history
Add RBAC & namespace manifest
  • Loading branch information
surajnarwade authored Apr 1, 2022
2 parents bccd29e + 786e2a8 commit 55bdccb
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -44,4 +45,4 @@ spec:
cpu: 10m
memory: 100Mi
limits:
memory: 200Mi
memory: 200Mi
5 changes: 5 additions & 0 deletions example/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: hermod
47 changes: 47 additions & 0 deletions example/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hermod
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- apiGroups:
- "apps"
resources:
- deployments
verbs:
- list
- watch
- update
- patch
- apiGroups:
- "apps"
resources:
- replicasets
verbs:
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hermod
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: hermod
subjects:
- kind: ServiceAccount
name: hermod
namespace: hermod
1 change: 1 addition & 0 deletions example/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Secret
metadata:
Expand Down
6 changes: 6 additions & 0 deletions example/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: hermod
namespace: hermod

0 comments on commit 55bdccb

Please sign in to comment.