add RBAC and serviceaccount
parent
b6417ed42b
commit
7156f85e77
|
@ -3,7 +3,39 @@ kind: Namespace
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: conduit
|
name: conduit
|
||||||
|
### RBAC ###
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: conduit-controller
|
||||||
|
namespace: conduit
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: conduit-controller
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["extensions"]
|
||||||
|
resources: ["deployments", "replicasets"]
|
||||||
|
verbs: ["list", "get", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods","services","endpoints"]
|
||||||
|
verbs: ["list", "get", "watch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: conduit-controller
|
||||||
|
namespace: conduit
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: conduit-controller
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: conduit-controller
|
||||||
|
namespace: conduit
|
||||||
### Controller ###
|
### Controller ###
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
|
@ -66,6 +98,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
conduit.io/created-by: "conduit/cli v0.1.0"
|
conduit.io/created-by: "conduit/cli v0.1.0"
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccount: conduit-controller
|
||||||
containers:
|
containers:
|
||||||
- name: public-api
|
- name: public-api
|
||||||
ports:
|
ports:
|
||||||
|
@ -179,6 +212,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
conduit.io/created-by: "conduit/cli v0.1.0"
|
conduit.io/created-by: "conduit/cli v0.1.0"
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccount: conduit-controller
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
ports:
|
ports:
|
||||||
|
@ -239,6 +273,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
conduit.io/created-by: "conduit/cli v0.1.0"
|
conduit.io/created-by: "conduit/cli v0.1.0"
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccount: conduit-controller
|
||||||
volumes:
|
volumes:
|
||||||
- name: prometheus-config
|
- name: prometheus-config
|
||||||
configMap:
|
configMap:
|
||||||
|
|
Loading…
Reference in New Issue