This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathpurser-controller-setup.yaml
83 lines (83 loc) · 1.92 KB
/
purser-controller-setup.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Service account
apiVersion: v1
kind: ServiceAccount
metadata:
name: purser-service-account
---
# RBAC
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: purser-permissions
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "watch", "list", "update", "create", "delete"]
- apiGroups: ["vmware.purser.com"]
resources: ["groups", "subscribers"]
verbs: ["get", "watch", "list", "update", "create", "delete"]
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list"]
# Uncomment next three lines to enable interactions feature.
# - apiGroups: ["*"]
# resources: ["pods/exec"]
# verbs: ["create"]
---
# ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: purser-cluster-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: purser-permissions
subjects:
- kind: ServiceAccount
name: purser-service-account
namespace: purser
---
apiVersion: v1
kind: Service
metadata:
name: purser
spec:
selector:
app: purser
ports:
- protocol: TCP
port: 3030
targetPort: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: purser
spec:
selector:
matchLabels:
app: purser
replicas: 1
template:
metadata:
labels:
app: purser
spec:
serviceAccountName: purser-service-account
containers:
- name: purser-controller
image: kreddyj/purser:controller-1.0.2
imagePullPolicy: Always
resources:
limits:
memory: 1000Mi
cpu: 300m
requests:
memory: 1000Mi
cpu: 300m
ports:
- name: http
containerPort: 3030
command: ["/controller"]
args: ["--log=info", "--interactions=disable", "--dgraphURL=purser-db", "--dgraphPort=9080"]