Put RBAC configuration together

Although it duplicates some code, we prefer duplicate some code and
place this files together.
This commit is contained in:
Néstor Salceda 2018-11-12 17:34:21 +01:00
parent c24fa324d2
commit 1308d7fc35
4 changed files with 27 additions and 4 deletions

View File

@ -1,7 +1,7 @@
deploy: rbac create configure
rbac:
kubectl apply -f ../cluster-role.yaml
kubectl apply -f cluster-role.yaml
kubectl apply -f cluster-role-binding.yaml
create:
@ -14,4 +14,4 @@ configure:
clean:
terraform destroy -force
kubectl delete -f cluster-role-binding.yaml
kubectl delete -f ../cluster-role.yaml
kubectl delete -f cluster-role.yaml

View File

@ -1,11 +1,9 @@
deploy:
kubectl apply -f nats/
kubectl apply -f kubeless/
kubectl apply -f ../cluster-role.yaml
kubectl apply -f .
clean:
kubectl delete -f kubeless/
kubectl delete -f nats/
kubectl delete -f .
kubectl delete -f ../cluster-role.yaml

View File

@ -0,0 +1,25 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kubernetes-response-engine-cluster-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- delete
- list
- patch
- apiGroups:
- ""
resources:
- nodes
verbs:
- patch
- apiGroups:
- batch
resources:
- jobs
verbs:
- create