forked from constellation-rs/constellation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
123 lines (123 loc) · 2.62 KB
/
k8s.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
apiVersion: v1
kind: Service
metadata:
name: constellation
spec:
selector:
constellation: master
ports:
- name: constellation
protocol: TCP
port: 12321
targetPort: 12321
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: constellation
spec:
replicas: 1
selector:
matchLabels: &labels
constellation: master
template:
metadata:
labels: *labels
spec:
containers:
- name: constellation
image: constellationrs/constellation:0.2.0-alpha.2
args:
- kube
- 0.0.0.0:32123
- 0.0.0.0:12321
- "1GiB"
- "1"
- "1"
env:
- name: CONSTELLATION_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- name: constellation
containerPort: 32123
- name: constellation-b
containerPort: 12321
resources:
requests:
memory: "1Gi"
cpu: "1"
serviceAccountName: constellation-service-account
terminationGracePeriodSeconds: 1
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: constellation
spec:
replicas: 0
selector:
matchLabels:
constellation: node
template:
metadata:
labels:
constellation: node
spec:
containers:
- name: constellation
image: constellationrs/constellation:0.2.0-alpha.2
args:
- 0.0.0.0:32123
env:
- name: CONSTELLATION_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- name: constellation
containerPort: 32123
resources:
requests:
memory: "1Gi"
cpu: "1"
serviceAccountName: constellation-service-account
terminationGracePeriodSeconds: 1
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: constellation-service-account
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: constellation-role
rules:
- apiGroups:
- ""
- apps
resources:
- pods
verbs: ["list", "watch"]
- apiGroups:
- ""
- apps
resources:
- replicasets/scale
verbs: ["patch"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: constellation-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: constellation-role
subjects:
- kind: ServiceAccount
name: constellation-service-account
namespace: default