Add RBAC configuration (#135)
* RBAC resources manifests * Add service account reference * Fix apiGroups
This commit is contained in:
committed by
Henning Jacobs
parent
1181f36c0c
commit
b1150b797f
33
deploy/auth.yaml
Normal file
33
deploy/auth.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: kube-ops-view
|
||||||
|
---
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
metadata:
|
||||||
|
name: kube-ops-view
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes", "pods"]
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services/proxy"]
|
||||||
|
resourceNames: ["heapster"]
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
---
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
metadata:
|
||||||
|
name: kube-ops-view
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: kube-ops-view
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: kube-ops-view
|
||||||
|
namespace: default
|
||||||
@@ -16,6 +16,7 @@ spec:
|
|||||||
application: kube-ops-view
|
application: kube-ops-view
|
||||||
version: v0.0.1
|
version: v0.0.1
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccount: kube-ops-view
|
||||||
containers:
|
containers:
|
||||||
- name: service
|
- name: service
|
||||||
image: hjacobs/kube-ops-view:latest
|
image: hjacobs/kube-ops-view:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user