-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-template.yaml
277 lines (266 loc) · 6.53 KB
/
install-template.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
---
apiVersion: v1
kind: Template
metadata:
name: efs-stunnel
parameters:
- name: NAMESPACE
value: openshift-efs-stunnel
- name: REGISTRY
value: docker-registry.default.svc:5000
- name: EFS_MANAGER_IMAGE
value: openshift-efs-stunnel/efs-manager
- name: EFS_MANAGER_IMAGE_TAG
value: latest
- name: EFS_STUNNEL_IMAGE
value: openshift-efs-stunnel/efs-stunnel
- name: EFS_STUNNEL_IMAGE_TAG
value: latest
- name: WORKER_IMAGE
value: openshift/rhel7
- name: WORKER_IMAGE_TAG
value: latest
- name: EFS_STUNNEL_NODE_SELECTOR
value: '{}'
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: efs-manager
namespace: "${NAMESPACE}"
- apiVersion: v1
kind: ServiceAccount
metadata:
name: efs-stunnel
namespace: "${NAMESPACE}"
- apiVersion: v1
kind: ServiceAccount
metadata:
name: efs-worker
namespace: "${NAMESPACE}"
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: edit-efs-manager
namespace: "${NAMESPACE}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: edit
subjects:
- kind: ServiceAccount
name: efs-manager
namespace: "${NAMESPACE}"
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: edit-efs-worker
namespace: "${NAMESPACE}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: edit
subjects:
- kind: ServiceAccount
name: efs-worker
namespace: "${NAMESPACE}"
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:${NAMESPACE}:controller:persistent-volume-binder
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:controller:persistent-volume-binder
subjects:
- kind: ServiceAccount
name: efs-manager
namespace: "${NAMESPACE}"
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: view-efs-stunnel
namespace: "${NAMESPACE}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: efs-stunnel
namespace: "${NAMESPACE}"
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
component: efs-manager
name: efs-manager
namespace: "${NAMESPACE}"
spec:
replicas: 1
selector:
matchLabels:
component: efs-manager
strategy:
type: Recreate
template:
metadata:
labels:
component: efs-manager
spec:
containers:
- name: efs-manager
env:
- name: WORKER_IMAGE
value: "${REGISTRY}/${WORKER_IMAGE}:${WORKER_IMAGE_TAG}"
image: "${REGISTRY}/${EFS_MANAGER_IMAGE}:${EFS_MANAGER_IMAGE_TAG}"
imagePullPolicy: Always
#livenessProbe:
#readinessProbe:
resources:
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
nodeSelector:
node-role.kubernetes.io/infra: "true"
restartPolicy: Always
securityContext: {}
serviceAccount: efs-manager
serviceAccountName: efs-manager
terminationGracePeriodSeconds: 30
- apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
component: efs-stunnel
name: efs-stunnel
namespace: "${NAMESPACE}"
spec:
revisionHistoryLimit: 3
selector:
matchLabels:
component: efs-stunnel
template:
metadata:
labels:
component: efs-stunnel
spec:
containers:
- name: efs-stunnel
image: "${REGISTRY}/${EFS_STUNNEL_IMAGE}:${EFS_STUNNEL_IMAGE_TAG}"
imagePullPolicy: Always
#livenessProbe:
#readinessProbe:
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
hostNetwork: true
nodeSelector: "${{EFS_STUNNEL_NODE_SELECTOR}}"
restartPolicy: Always
securityContext: {}
serviceAccount: efs-stunnel
serviceAccountName: efs-stunnel
terminationGracePeriodSeconds: 10
updateStrategy:
type: RollingUpdate
- apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: efs-stunnel
annotations:
kubernetes.io/description: >-
SCC for efs-stunnel, which requires access to the hostnetwork. This SCC
is based off of hostnetwork.
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: true
allowHostPID: false
allowHostPorts: true
allowPrivilegeEscalation: true
allowPrivilegedContainer: false
allowedCapabilities: null
defaultAddCapabilities: null
fsGroup:
type: MustRunAs
groups: []
priority: 99
readOnlyRootFilesystem: false
requiredDropCapabilities:
- KILL
- MKNOD
- SETUID
- SETGID
runAsUser:
type: MustRunAsRange
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: MustRunAs
users:
- system:serviceaccount:${NAMESPACE}:efs-stunnel
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
- apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: efs-stunnel-worker
annotations:
kubernetes.io/description: >-
SCC for efs-worker pods, which need to run as root to manage
mountpoints within EFS volumes. Based on the standard anyuid SCC.
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: false
allowedCapabilities: null
defaultAddCapabilities: null
fsGroup:
type: RunAsAny
groups: []
priority: 99
readOnlyRootFilesystem: false
requiredDropCapabilities:
- MKNOD
runAsUser:
type: RunAsAny
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:openshift-efs-stunnel:efs-worker
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
- kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: efs-stunnel
provisioner: gnuthought.com/efs-stunnel
parameters:
default_file_system_id: auto
reclaimPolicy: Delete