forked from sapcc/kubernikus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
657 lines (656 loc) · 16.5 KB
/
swagger.yml
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
consumes:
- application/json
info:
title: Kubernikus
version: 1.0.0
produces:
- application/json
swagger: '2.0'
securityDefinitions:
keystone:
description: OpenStack Keystone Authentication
type: apiKey
in: header
name: x-auth-token
security:
- keystone: []
responses:
errorResponse:
description: Error
schema:
$ref: '#/definitions/error'
paths:
/info:
get:
security: []
operationId: Info
summary: Get info about Kubernikus
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Info'
/api:
get:
security: []
operationId: ListAPIVersions
summary: List available api versions
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ApiVersions'
/api/v1/openstack/metadata:
get:
operationId: GetOpenstackMetadata
summary: Grab bag of openstack metadata
responses:
'200':
description: OK
schema:
$ref: '#/definitions/OpenstackMetadata'
default:
$ref: '#/responses/errorResponse'
/api/v1/clusters:
get:
operationId: ListClusters
summary: List available clusters
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Kluster'
default:
$ref: '#/responses/errorResponse'
post:
operationId: CreateCluster
summary: Create a cluster
responses:
'201':
description: OK
schema:
$ref: '#/definitions/Kluster'
default:
$ref: '#/responses/errorResponse'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Kluster'
'/api/v1/clusters/{name}':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: ShowCluster
summary: Show the specified cluser
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Kluster'
default:
$ref: '#/responses/errorResponse'
delete:
operationId: TerminateCluster
summary: Terminate the specified cluster
responses:
'202':
description: OK
default:
$ref: '#/responses/errorResponse'
put:
operationId: UpdateCluster
summary: Update the specified cluser
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Kluster'
default:
$ref: '#/responses/errorResponse'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Kluster'
'/api/v1/clusters/{name}/credentials':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: GetClusterCredentials
summary: Get user specific credentials to access the cluster
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Credentials'
default:
$ref: '#/responses/errorResponse'
'/api/v1/clusters/{name}/credentials/oidc':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: GetClusterCredentialsOIDC
summary: Get user specific credentials to access the cluster with OIDC
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Credentials'
default:
$ref: '#/responses/errorResponse'
'/api/v1/clusters/{name}/bootstrap':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: GetBootstrapConfig
summary: Get bootstrap config to onboard a node
responses:
'200':
description: OK
schema:
$ref: '#/definitions/BootstrapConfig'
default:
$ref: '#/responses/errorResponse'
'/api/v1/clusters/{name}/info':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: GetClusterInfo
summary: Get user specific info about the cluster
responses:
'200':
description: OK
schema:
$ref: '#/definitions/KlusterInfo'
default:
$ref: '#/responses/errorResponse'
'/api/v1/clusters/{name}/events':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
get:
operationId: GetClusterEvents
summary: Get recent events about the cluster
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Event'
default:
$ref: '#/responses/errorResponse'
'/api/v1/{account}/clusters/{name}/values':
parameters:
- uniqueItems: true
type: string
name: name
required: true
in: path
- uniqueItems: true
type: string
name: account
required: true
in: path
get:
operationId: GetClusterValues
summary: Get values for cluster chart (admin-only)
responses:
'200':
description: OK
schema:
type: object
properties:
values:
description: The values in yaml Format
type: string
default:
$ref: '#/responses/errorResponse'
definitions:
Event:
type: object
properties:
count:
description: The number of times this event has occurred.
type: integer
lastTimestamp:
description: The time at which the most recent occurrence of this event was recorded
type: string
firstTimestamp:
description: The time at which the event was first recorded
type: string
reason:
description: A short, machine understandable string that gives the reason for the event
type: string
message:
description: A human-readable description of the event
type: string
type:
description: Type of this event
type: string
enum: [Normal, Warning]
OpenstackMetadata:
type: object
properties:
availabilityZones:
type: array
items:
x-nullable: false
type: object
x-go-name: AvailabilityZone
properties:
name:
type: string
flavors:
type: array
items:
x-nullable: false
type: object
x-go-name: Flavor
properties:
name:
type: string
id:
type: string
ram:
type: integer
vcpus:
type: integer
securityGroups:
type: array
items:
type: object
x-go-name: SecurityGroup
properties:
name:
type: string
id:
type: string
keyPairs:
type: array
items:
type: object
x-go-name: KeyPair
properties:
name:
type: string
publicKey:
type: string
routers:
type: array
items:
type: object
x-go-name: Router
properties:
name:
type: string
id:
type: string
externalNetworkID:
type: string
x-go-name: ExternalNetworkID
networks:
type: array
items:
type: object
x-go-name: Network
properties:
name:
type: string
id:
type: string
subnets:
type: array
items:
type: object
x-go-name: Subnet
properties:
name:
type: string
id:
type: string
CIDR:
type: string
KlusterPhase:
type: string
enum:
- Pending
- Creating
- Running
- Upgrading
- Terminating
Info:
properties:
gitVersion:
type: string
defaultClusterVersion:
type: string
supportedClusterVersions:
type: array
x-omitempty: true
items:
type: string
availableClusterVersions:
type: array
x-omitempty: true
items:
type: string
KlusterInfo:
properties:
setupCommand:
type: string
binaries:
type: array
items:
type: object
x-go-name: Binaries
x-nullable: false
properties:
name:
type: string
links:
type: array
items:
x-go-name: Link
x-nullable: false
type: object
properties:
platform:
type: string
link:
type: string
ApiVersions:
required:
- versions
properties:
versions:
description: versions are the api versions that are available.
type: array
items:
type: string
Kluster:
type: object
required:
- name
properties:
name:
x-nullable: false
description: name of the cluster
type: string
pattern: '^[a-z]([-a-z0-9]*[a-z0-9])?$'
maxLength: 20
spec:
$ref: '#/definitions/KlusterSpec'
status:
$ref: '#/definitions/KlusterStatus'
KlusterSpec:
type: object
x-nullable: false
properties:
openstack:
$ref: '#/definitions/OpenstackSpec'
noCloud:
type: boolean
dashboard:
type: boolean
x-nullable: true
x-omitempty: false
dex:
type: boolean
x-nullable: true
x-omitempty: false
serviceCIDR:
description: CIDR Range for Services in the cluster. Can not be updated.
default: 198.18.128.0/17
x-nullable: false
type: string
pattern: >-
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
clusterCIDR:
description: CIDR Range for Pods in the cluster. Can not be updated.
default: 100.100.0.0/16
type: string
pattern: >-
^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))?$
nodePools:
type: array
items:
$ref: '#/definitions/NodePool'
advertiseAddress:
x-nullable: false
default: 1.1.1.1
type: string
advertisePort:
x-nullable: false
default: 6443
type: integer
dnsAddress:
type: string
pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
dnsDomain:
x-nullable: false
type: string
default: cluster.local
sshPublicKey:
description: SSH public key that is injected into spawned nodes.
type: string
version:
description: Kubernetes version
pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
type: string
name:
type: string
readOnly: true
backup:
type: string
x-nullable: false
enum: ["on", "off", "externalAWS"]
default: "on"
OpenstackSpec:
type: object
x-nullable: false
properties:
routerID:
type: string
networkID:
type: string
lbSubnetID:
x-go-name: LBSubnetID
type: string
lbFloatingNetworkID:
x-go-name: LBFloatingNetworkID
type: string
securityGroupName:
type: string
NodePool:
x-nullable: false
type: object
required:
- name
- flavor
properties:
name:
x-nullable: false
type: string
pattern: '^[a-z0-9]([-\.a-z0-9]*)?$'
maxLength: 20
size:
x-nullable: false
type: integer
maximum: 127
minimum: 0
default: 0
flavor:
type: string
x-nullable: false
image:
x-nullable: false
type: string
default: coreos-stable-amd64
availabilityZone:
type: string
x-nullable: false
taints:
description: The specified taints will be added to members of this pool once during initial registration of the node
type: array
items:
type: string
# validate [valid label name]=[valid label value]:[valid effect]
pattern: '^([a-z0-9]([-a-z0-9]*[a-z0-9])(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*/)?[A-Za-z0-9][-A-Za-z0-9_.]{0,62}=[A-Za-z0-9][-A-Za-z0-9_.]{0,62}:(NoSchedule|NoExecute|PreferNoSchedule)$'
labels:
description: The specified labels will be added to members of this pool once during initial registration of the node
type: array
items:
type: string
# validate [valid label name]=[valid label value]
pattern: '^([a-z0-9]([-a-z0-9]*[a-z0-9])(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*/)?[A-Za-z0-9][-A-Za-z0-9_.]{0,62}=[A-Za-z0-9][-A-Za-z0-9_.]{0,62}$'
config:
$ref: '#/definitions/NodePoolConfig'
NodePoolConfig:
type: object
x-nullable: true
properties:
allowReboot:
description: Allow automatic drain and reboot of nodes. Enables OS updates. Required by security policy.
x-nullable: true
x-omitempty: false
type: boolean
allowReplace:
description: Allow automatic drain and replacement of nodes. Enables Kubernetes upgrades.
x-nullable: true
x-omitempty: false
type: boolean
KlusterStatus:
readOnly: true
x-nullable: false
type: object
properties:
phase:
$ref: '#/definitions/KlusterPhase'
migrationsPending:
type: boolean
nodePools:
type: array
items:
$ref: '#/definitions/NodePoolInfo'
apiserver:
type: string
dashboard:
type: string
apiserverVersion:
type: string
chartName:
type: string
chartVersion:
type: string
wormhole:
type: string
version:
type: string
specVersion:
type: integer
NodePoolInfo:
x-nullable: false
type: object
properties:
name:
type: string
size:
type: integer
running:
type: integer
healthy:
type: integer
schedulable:
type: integer
Credentials:
type: object
properties:
kubeconfig:
type: string
BootstrapConfig:
type: object
properties:
kubeconfig:
type: string
kubeletClientsCA:
type: string
kubeletClientsCAFile:
type: string
config:
type: string
Principal:
type: object
properties:
authUrl:
description: Identity Endpoint
type: string
name:
description: username
type: string
id:
description: userid
type: string
domain:
description: user's domain name
type: string
account:
description: account id
type: string
account_name:
description: account name
type: string
roles:
description: list of roles the user has in the given scope
type: array
items:
type: string
error:
description: >
the error model is a model for all the error responses coming from
Kubernikus
type: object
required:
- message
- code
properties:
code:
type: integer
description: The error code
x-nullable: false
message:
description: The error message
type: string
x-nullable: false
helpUrl:
description: link to help page explaining the error in more detail
type: string
format: uri