-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.v3.yaml
366 lines (366 loc) · 9.45 KB
/
example.v3.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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
version: 3
containers:
- name: gitlab
image: gitlab/latest
imagePullPolicy: Always
command:
- sh
- -c
- |
set -ex
echo "do some stuff here for gitlab container"
args: ["doIt", "--debug"]
workingDir: "/path/to/here"
ports:
- containerPort: 80
name: fred
protocol: TCP
- containerPort: 443
name: mary
kubernetes:
securityContext:
runAsNonRoot: true
privileged: true
livenessProbe:
initialDelaySeconds: 10
httpGet:
path: /ping
port: 8080
readinessProbe:
initialDelaySeconds: 10
httpGet:
path: /pingReady
port: www
startupProbe:
httpGet:
path: /healthz
port: liveness-port
failureThreshold: 30
periodSeconds: 10
envConfig:
attr: foo=bar; name["fred"]="blogs";
foo: bar
brackets: '["hello", "world"]'
restricted: "yes"
switch: on
special: p@ssword's
number: 5242880
my-resource-limit:
resource:
container-name: container1
resource: requests.cpu
divisor: 1m
volumeConfig:
- name: configuration
mountPath: /var/lib/foo
files:
- path: file1
mode: 644
content: |
[config]
foo: bar
- name: myhostpath
mountPath: /host/etc/cni/net.d
hostPath:
path: /etc/cni/net.d
type: Directory
- name: cache-volume
mountPath: /empty-dir
emptyDir:
medium: Memory
- name: log_level
mountPath: /log-config/log_level
configMap:
name: log-config
defaultMode: 511
files:
- key: log_level
path: log_level
mode: 511
- name: mysecret2
mountPath: /secrets
secret:
name: mysecret2
defaultMode: 511
files:
- key: password
path: my-group/my-password
mode: 511
- name: gitlab-helper
image: gitlab-helper/latest
ports:
- containerPort: 8080
protocol: TCP
- name: secret-image-user
imageDetails:
imagePath: staging.registry.org/testing/testing-image@sha256:deed-beef
username: docker-registry
password: hunter2
- name: just-image-details
imageDetails:
imagePath: testing/no-secrets-needed@sha256:deed-beef
- name: gitlab-init
image: gitlab-init/latest
imagePullPolicy: Always
init: true
command:
- sh
- -c
- |
set -ex
echo "do some stuff here for gitlab-init container"
args: ["doIt", "--debug"]
workingDir: "/path/to/here"
ports:
- containerPort: 80
name: fred
protocol: TCP
- containerPort: 443
name: mary
envConfig:
brackets: '["hello", "world"]'
foo: bar
restricted: "yes"
switch: on
special: p@ssword's
configMaps:
mydata:
foo: bar
hello: world
service:
annotations:
foo: bar
scalePolicy: serial
updateStrategy:
type: Recreate
rollingUpdate:
maxUnavailable: 10%
maxSurge: 25%
serviceAccount:
automountServiceAccountToken: true
roles:
- global: true
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
kubernetesResources:
services:
- name: my-service1
labels:
foo: bar
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
- name: my-service2
labels:
app: test
annotations:
cloud.google.com/load-balancer-type: "Internal"
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
type: LoadBalancer
serviceAccounts:
- name: k8sServiceAccount1
automountServiceAccountToken: true
roles:
- name: k8sRole
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
- nonResourceURLs: ["/healthz", "/healthz/*"] # '*' in a nonResourceURL is a suffix glob match
verbs: ["get", "post"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterroles"]
verbs: ["bind"]
resourceNames: ["admin", "edit", "view"]
- name: k8sClusterRole
global: true
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
pod:
annotations:
foo: baz
labels:
foo: bax
restartPolicy: OnFailure
activeDeadlineSeconds: 10
terminationGracePeriodSeconds: 20
securityContext:
runAsNonRoot: true
supplementalGroups: [1, 2]
readinessGates:
- conditionType: PodScheduled
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
hostPID: true
priorityClassName: system-cluster-critical
priority: 2000000000
secrets:
- name: build-robot-secret
type: Opaque
stringData:
config.yaml: |-
apiUrl: "https://my.api.com/api/v1"
username: fred
password: shhhh
- name: another-build-robot-secret
type: Opaque
data:
username: YWRtaW4=
password: MWYyZDFlMmU2N2Rm
customResourceDefinitions:
- name: tfjobs.kubeflow.org
labels:
foo: bar
juju-global-resource-lifecycle: model
spec:
group: kubeflow.org
scope: Cluster
names:
kind: TFJob
singular: tfjob
plural: tfjobs
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta2
served: true
storage: false
conversion:
strategy: None
preserveUnknownFields: false
additionalPrinterColumns:
- name: Worker
type: integer
description: Worker attribute.
jsonPath: .spec.tfReplicaSpecs.Worker
validation:
openAPIV3Schema:
properties:
spec:
properties:
tfReplicaSpecs:
properties:
Worker:
properties:
replicas:
type: integer
minimum: 1
PS:
properties:
replicas:
type: integer
minimum: 1
Chief:
properties:
replicas:
type: integer
minimum: 1
maximum: 1
customResources:
tfjobs.kubeflow.org:
- apiVersion: "kubeflow.org/v1"
kind: "TFJob"
metadata:
name: "dist-mnist-for-e2e-test"
labels:
foo: bar
juju-global-resource-lifecycle: model
spec:
tfReplicaSpecs:
PS:
replicas: 2
restartPolicy: Never
template:
spec:
containers:
- name: tensorflow
image: kubeflow/tf-dist-mnist-test:1.0
Worker:
replicas: 4
restartPolicy: Never
template:
spec:
containers:
- name: tensorflow
image: kubeflow/tf-dist-mnist-test:1.0
ingressResources:
- name: test-ingress
labels:
foo: bar
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
mutatingWebhookConfigurations:
- name: example-mutatingwebhookconfiguration
labels:
foo: bar
annotations:
juju.io/disable-name-prefix: "true"
webhooks:
- name: "example.mutatingwebhookconfiguration.com"
failurePolicy: Ignore
clientConfig:
service:
name: apple-service
namespace: apples
path: /apple
caBundle: "YXBwbGVz"
namespaceSelector:
matchExpressions:
- key: production
operator: DoesNotExist
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- pods
validatingWebhookConfigurations:
- name: pod-policy.example.com
labels:
foo: bar
annotations:
juju.io/disable-name-prefix: "true"
webhooks:
- name: "pod-policy.example.com"
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "Namespaced"
clientConfig:
service:
namespace: "example-namespace"
name: "example-service"
caBundle: "YXBwbGVz"
admissionReviewVersions: ["v1", "v1beta1"]
sideEffects: None
timeoutSeconds: 5