Add rbac for server

This commit is contained in:
Jim Nicholson 2021-10-11 21:47:51 -07:00
parent 5e8eae2aa8
commit 88a07ac0b1
2 changed files with 41 additions and 1 deletions

View File

@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - namespace.yaml
# - rbac.yaml - rbac.yaml
# - storage.yaml # - storage.yaml
# - deployment.yaml # - deployment.yaml
# - service.yaml # - service.yaml

40
kustomize/rbac.yaml Normal file
View File

@ -0,0 +1,40 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: drone
name: drone
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
- create
- delete
- list
- watch
- update
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: drone
namespace: drone
subjects:
- kind: ServiceAccount
name: default
namespace: drone
roleRef:
kind: Role
name: drone
apiGroup: rbac.authorization.k8s.io