-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1038 lines (1018 loc) · 38.5 KB
/
openapi.yaml
File metadata and controls
1038 lines (1018 loc) · 38.5 KB
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
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.2
info:
title: cloudharness
version: 1.0.0
components:
schemas:
AutoArtifactSpec:
description: ''
required: []
type: object
properties:
auto:
description: 'When true, enables automatic template'
type: boolean
name:
description: ''
type: string
ServiceAutoArtifactConfig:
description: ''
type: object
allOf:
-
type: object
properties:
port:
description: Service port
type: integer
-
$ref: '#/components/schemas/AutoArtifactSpec'
ApplicationDependenciesConfig:
description: ''
type: object
properties:
hard:
description: >-
Hard dependencies indicate that the application may not start without these other
applications.
type: array
items:
type: string
soft:
description: >-
Soft dependencies indicate that the application will work partially without these
other applications.
type: array
items:
type: string
build:
description: >-
Hard dependencies indicate that the application Docker image build requires these
base/common images
type: array
items:
type: string
git:
description: ''
type: array
items:
$ref: '#/components/schemas/GitDependencyConfig'
DeploymentResourcesConf:
description: ''
type: object
properties:
requests:
$ref: '#/components/schemas/CpuMemoryConfig'
description: ''
limits:
$ref: '#/components/schemas/CpuMemoryConfig'
description: ''
FileResourcesConfig:
description: ''
required:
- name
- src
- dst
type: object
properties:
name:
$ref: '#/components/schemas/Filename'
description: ''
src:
$ref: '#/components/schemas/Filename'
description: ''
dst:
description: ''
type: string
ApplicationProbe:
description: >-
Define a Kubernetes probe See also the
[official
documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
required:
- path
type: object
properties:
path:
$ref: '#/components/schemas/URL'
description: ''
periodSeconds:
description: ''
type: number
failureThreshold:
description: ''
type: number
initialDelaySeconds:
description: ''
type: number
port:
description: ''
type: number
URL:
description: ''
type: string
ApplicationConfig:
description: Place here the values to configure your application helm templates.
required:
- harness
type: object
properties:
harness:
$ref: '#/components/schemas/ApplicationHarnessConfig'
description: >-
Values inside this section have a special meaning to cloudharness (e.g. enabling and
configuring automatic deployment)
additionalProperties: true
RegistrySecretConfig:
description: ''
type: object
properties:
name:
description: The name of the secret to create for docker registry credentials
type: string
value:
description: >-
The value of the secret to create for docker registry credentials. This should be the
raw JSON content of the Google Cloud service account key used for the registry.
type: string
RegistryConfig:
description: ''
required:
- name
type: object
properties:
name:
$ref: '#/components/schemas/URL'
description: The docker registry where built images are pushed
secret:
$ref: '#/components/schemas/RegistrySecretConfig'
description: Optional secret used for pulling from docker registry.
FreeObject:
description: ''
type: object
additionalProperties: true
ApplicationsConfigsMap:
description: ''
type: object
additionalProperties:
$ref: '#/components/schemas/ApplicationConfig'
NameValue:
description: ''
required:
- name
type: object
properties:
name:
description: ''
type: string
value:
description: ''
type: string
UserGroup:
type: object
properties:
access:
type: object
additionalProperties: true
attributes:
$ref: '#/components/schemas/SimpleMap'
additionalProperties: true
clientRoles:
type: object
additionalProperties: true
id:
type: string
name:
type: string
path:
type: string
realmRoles:
type: array
items:
type: string
subGroups:
type: array
items:
$ref: '#/components/schemas/UserGroup'
UserCredential:
type: object
properties:
createdDate:
format: int64
type: integer
credentialData:
type: string
id:
type: string
priority:
format: int32
type: integer
secretData:
type: string
temporary:
type: boolean
type:
type: string
userLabel:
type: string
value:
type: string
User:
type: object
properties:
access:
type: object
additionalProperties: true
attributes:
type: object
additionalProperties: true
clientRoles:
type: object
additionalProperties: true
createdTimestamp:
format: int64
type: integer
credentials:
type: array
items:
$ref: '#/components/schemas/UserCredential'
disableableCredentialTypes:
type: array
items:
type: string
email:
type: string
emailVerified:
type: boolean
enabled:
type: boolean
federationLink:
type: string
firstName:
type: string
groups:
type: array
items:
type: string
id:
type: string
lastName:
type: string
realmRoles:
type: array
items:
type: string
requiredActions:
type: array
items:
type: string
serviceAccountClientId:
type: string
username:
type: string
additionalProperties: {}
userGroups:
description: ''
type: array
items:
$ref: '#/components/schemas/UserGroup'
organizations:
description: ''
type: array
items:
$ref: '#/components/schemas/Organization'
Filename:
description: ''
pattern: '^[^<>:;,?*|]+$'
type: string
PathSpecifier:
description: ''
pattern: '^[^<>:;,?|]+$'
type: string
CDCEventMeta:
description: ''
required:
- app_name
type: object
properties:
app_name:
description: The name of the application/microservice sending the message
type: string
user:
$ref: '#/components/schemas/User'
description: ''
args:
description: the caller function arguments
type: array
items:
$ref: '#/components/schemas/FreeObject'
kwargs:
description: the caller function keyword arguments
description:
description: General description -- for human consumption
type: string
JupyterHubConfig:
description: ''
type: object
properties:
args:
description: arguments passed to the container
type: array
items:
type: string
extraConfig:
$ref: '#/components/schemas/SimpleMap'
description: allows you to add Python snippets to the jupyterhub_config.py file
spawnerExtraConfig:
$ref: '#/components/schemas/FreeObject'
description: allows you to add values to the spawner object without the need of creating a new hook
applicationHook:
description: |-
change the hook function (advanced)
Specify the Python name of the function (full module path, the module must be
installed in the Docker image)
example: my_lib.change_pod_manifest
additionalProperties: true
UserRole:
type: object
properties:
attributes:
type: object
additionalProperties: true
clientRole:
type: boolean
composite:
type: boolean
containerId:
type: string
description:
type: string
id:
type: string
name:
type: string
additionalProperties: true
ApplicationAccountsConfig:
description: ''
type: object
properties:
roles:
description: Specify roles to be created in this deployment specific for this application
type: array
items:
type: string
users:
description: 'Defines test users to be added to the deployment, specific for this application'
type: array
items:
$ref: '#/components/schemas/ApplicationUser'
ApplicationUser:
description: Defines a user
required:
- username
type: object
properties:
username:
description: ''
type: string
password:
description: ''
type: string
clientRoles:
description: ''
type: array
items:
type: string
realmRoles:
description: ''
type: array
items:
type: string
ApplicationTestConfig:
description: ''
required:
- unit
- e2e
- api
type: object
properties:
unit:
$ref: '#/components/schemas/UnitTestsConfig'
description: ''
api:
$ref: '#/components/schemas/ApiTestsConfig'
description: ''
e2e:
$ref: '#/components/schemas/E2ETestsConfig'
description: ''
UnitTestsConfig:
description: ''
required:
- enabled
- commands
type: object
properties:
enabled:
description: 'Enables unit tests for this application (default: true)'
type: boolean
commands:
description: Commands to run unit tests
type: array
items:
type: string
example: '["pytest /usr/src/app/samples/test"]'
E2ETestsConfig:
description: ''
required:
- enabled
- smoketest
type: object
properties:
enabled:
description: 'Enables end to end testing for this application (default: false)'
type: boolean
smoketest:
description: Specify whether to run the common smoke tests
type: boolean
ignoreConsoleErrors:
description: ''
type: boolean
ignoreRequestErrors:
description: ''
type: boolean
ApiTestsConfig:
description: ''
required:
- enabled
- autotest
- checks
type: object
properties:
enabled:
description: 'Enables api tests for this application (default: false)'
type: boolean
autotest:
description: Specify whether to run the common smoke tests
type: boolean
runParams:
description: Additional schemathesis parameters
type: array
items:
type: string
checks:
description: >-
One of the Schemathesis checks:
- not_a_server_error. The response has 5xx HTTP status;
- status_code_conformance. The response status is not defined in the API schema;
- content_type_conformance. The response content type is not defined in the API
schema;
- response_schema_conformance. The response content does not conform to the schema
defined for this specific response;
- response_headers_conformance. The response headers does not contain all defined
headers.
type: array
items:
type: string
example: '["not_a_server_error", "status_code_conformance"]'
SimpleMap:
description: ''
type: object
additionalProperties: true
Quota:
description: ''
type: object
additionalProperties: true
example:
quota-ws-max: 5
quota-storage-max: 1G
GitDependencyConfig:
title: Root Type for GitDependencyConfig
description: Defines a git repo to be cloned inside the application path
required:
- branch_tag
- url
type: object
properties:
url:
type: string
branch_tag:
type: string
path:
description: 'Defines the path where the repo is cloned. default: /git'
type: string
example:
url: 'https://github.com/MetaCell/nwb-explorer.git'
branch_tag: master
path: /git
DockerfileConfig:
description: Configuration for a dockerfile
type: object
properties:
buildArgs:
$ref: '#/components/schemas/SimpleMap'
description: >-
Map of build arguments to provide to the dockerfile at build time.
The use of this feature is to aid in development (e.g. not running tests on every
local build) and not for setting environment variables in different environments;
caution should be taken when using this feature as it can lead to inconsistent
behaviour across environments.
HarnessMainConfig:
description: ''
required:
- local
- secured_gatekeepers
- domain
- namespace
- mainapp
- apps
type: object
properties:
local:
description: 'If set to true, local DNS mapping is added to pods.'
type: boolean
secured_gatekeepers:
description: >-
Enables/disables Gatekeepers on secured applications. Set to false for
testing/development
type: boolean
domain:
description: The root domain
type: string
example: The root domain.
namespace:
description: The K8s namespace.
type: string
mainapp:
description: Defines the app to map to the root domain
type: string
registry:
$ref: '#/components/schemas/RegistryConfig'
description: ''
tag:
description: Docker tag used to push/pull the built images.
type: string
apps:
$ref: '#/components/schemas/ApplicationsConfigsMap'
description: ''
env:
description: Environmental variables added to all pods
type: array
items:
$ref: '#/components/schemas/NameValue'
privenv:
description: Private environmental variables added to all pods
type: array
items:
$ref: '#/components/schemas/NameValue'
backup:
$ref: '#/components/schemas/BackupConfig'
description: ''
name:
description: Base name
type: string
task-images:
$ref: '#/components/schemas/SimpleMap'
description: ''
build_hash:
description: ''
type: string
ingress:
$ref: '#/components/schemas/IngressConfig'
description: ''
additionalProperties: true
Organization:
description: ''
type: object
allOf:
-
type: object
properties:
domains:
description: ''
type: array
items:
$ref: '#/components/schemas/NamedObject'
alias:
description: ''
type: string
enabled:
description: ''
type: boolean
id:
description: ''
type: string
-
$ref: '#/components/schemas/NamedObject'
DatabaseDeploymentConfig:
description: ''
type: object
allOf:
-
type: object
properties:
type:
description: |-
Define the database type.
One of (mongo, postgres, neo4j, sqlite3)
pattern: ^(mongo|postgres|neo4j|sqlite3)$
type: string
example: '"neo4j"'
size:
description: Specify database disk size
type: string
example: 1Gi
user:
description: database username
type: string
pass:
description: Database password
type: string
image_ref:
description: Used for referencing images from the build
type: string
example: 'image_ref: myownpgimage'
mongo:
$ref: '#/components/schemas/FreeObject'
description: Mongo db specific configuration
postgres:
$ref: '#/components/schemas/FreeObject'
description: Postgres database specific configuration
neo4j:
description: Neo4j database specific configuration
resources:
$ref: '#/components/schemas/DeploymentResourcesConf'
description: Database deployment resources
-
$ref: '#/components/schemas/AutoArtifactSpec'
additionalProperties: true
UriRoleMappingConfig:
description: 'Defines the application Gatekeeper configuration, if enabled (i.e. `secured: true`.'
required:
- uri
type: object
properties:
uri:
$ref: '#/components/schemas/PathSpecifier'
description: Path to secure
roles:
description: Roles allowed to access the present uri
type: array
items:
type: string
white-listed:
description: ''
type: boolean
additionalProperties: true
BackupConfig:
description: ''
required:
- dir
- resources
type: object
properties:
active:
description: ''
type: boolean
keep_days:
description: ''
keep_weeks:
description: ''
keep_months:
description: ''
schedule:
description: Cron expression
type: string
suffix:
description: The file suffix added to backup files
type: string
volumesize:
description: The volume size for backups (all backups share the same volume)
type: string
dir:
$ref: '#/components/schemas/Filename'
description: 'Target directory of backups, the mount point of the persistent volume.'
resources:
$ref: '#/components/schemas/DeploymentResourcesConf'
description: ''
CpuMemoryConfig:
description: ''
type: object
properties:
cpu:
description: ''
memory:
description: ''
DeploymentAutoArtifactConfig:
description: ''
type: object
allOf:
-
type: object
properties:
port:
description: Deployment port
replicas:
description: Number of replicas
type: integer
image:
description: >-
Image name to use in the deployment. Leave it blank to set from the
application's
Docker file
pattern: '(?:[a-z]+/)?([a-z]+)(?::[0-9]+)?'
type: string
resources:
$ref: '#/components/schemas/DeploymentResourcesConf'
description: Deployment resources
volume:
$ref: '#/components/schemas/DeploymentVolumeSpec'
description: Volume specification
-
$ref: '#/components/schemas/AutoArtifactSpec'
DeploymentVolumeSpec:
description: |-
Defines a volume attached to the deployment.
Automatically created the volume claim and mounts.
type: object
allOf:
-
required:
- mountpath
type: object
properties:
mountpath:
description: The mount path for the volume
type: string
size:
description: |-
The volume size.
E.g. 5Gi
usenfs:
description: Set to `true` to use the nfs on the created volume and mount as ReadWriteMany.
type: boolean
-
$ref: '#/components/schemas/AutoArtifactSpec'
example:
auto: true
mountpath: /usr/src/app/persistent
name: my-files
size: 5Gi
usenfs: true
CDCEvent:
description: |-
A message sent to the orchestration queue.
Applications can listen to these events to react to data change events happening
on other applications.
required:
- message_type
- operation
- uid
- meta
type: object
properties:
operation:
description: the operation on the object e.g. create / update / delete
enum:
- create
- update
- delete
- other
type: string
uid:
description: the unique identifier attribute of the object
message_type:
description: the type of the message (relates to the object type) e.g. jobs
type: string
resource:
$ref: '#/components/schemas/FreeObject'
description: The target object
meta:
$ref: '#/components/schemas/CDCEventMeta'
description: ''
ProxyConf:
title: Root Type for ProxyConf
description: ''
type: object
properties:
forwardedHeaders:
type: boolean
payload:
$ref: '#/components/schemas/ProxyPayloadConf'
properties:
max:
format: int32
type: integer
timeout:
$ref: '#/components/schemas/ProxyTimeoutConf'
properties:
keepalive:
format: int32
type: integer
read:
format: int32
type: integer
send:
format: int32
type: integer
gatekeeper:
$ref: '#/components/schemas/GatekeeperConf'
description: ''
example:
forwardedHeaders: true
payload:
max: 250
timeout:
keepalive: 60
read: 60
send: 60
ProxyPayloadConf:
title: Root Type for ProxyPayloadConf
description: ''
type: object
properties:
max:
format: int32
type: integer
example:
max: 250
ProxyTimeoutConf:
title: Root Type for ProxyTimeoutConf
description: ''
type: object
properties:
keepalive:
format: int32
type: integer
read:
format: int32
type: integer
send:
format: int32
type: integer
example:
keepalive: 60
read: 60
send: 60
NamedObject:
title: Root Type for NamedObject
description: ''
type: object
properties:
name:
type: string
additionalProperties: true
example:
name: a name
IngressConfig:
description: ''
type: object
allOf:
-
type: object
properties:
ssl_redirect:
description: ''
type: boolean
letsencrypt:
description: ''
type: object
properties:
email:
type: string
enabled:
description: ''
type: boolean
-
$ref: '#/components/schemas/AutoArtifactSpec'
additionalProperties: true
GatekeeperConf:
title: Root Type for GatekeeperConf
description: ''
type: object
properties:
image:
type: string
replicas:
format: int32
type: integer
example:
image: 'quay.io/gogatekeeper/gatekeeper:2.14.3'
replicas: 5
ApplicationHarnessConfig:
description: |-
Define helm variables that allow CloudHarness to enable and configure your
application's deployment
required: []
type: object
properties:
deployment:
$ref: '#/components/schemas/DeploymentAutoArtifactConfig'
description: Defines reference deployment parameters. Values maps to k8s spec
service:
$ref: '#/components/schemas/ServiceAutoArtifactConfig'
description: Defines automatic service parameters.
subdomain:
description: 'If specified, an ingress will be created at [subdomain].[.Values.domain]'
type: string
aliases:
description: 'If specified, an ingress will be created at [alias].[.Values.domain] for each alias'
type: array
items:
type: string
domain:
description: 'If specified, an ingress will be created at [domain]'
type: string
dependencies:
$ref: '#/components/schemas/ApplicationDependenciesConfig'
description: >-
Application dependencies are used to define what is required in the deployment when
--include (-i) is used. Specify application names in the list.
secured:
description: 'When true, the application is shielded with a getekeeper'
uri_role_mapping:
description: 'Map uri/roles to secure with the Gatekeeper (if `secured: true`)'
type: array
items:
$ref: '#/components/schemas/UriRoleMappingConfig'
secrets:
$ref: '#/components/schemas/SimpleMap'
description: |-
Define secrets will be mounted in the deployment
Define as
```yaml
secrets:
secret_name: 'value'
```
Values if left empty are randomly generated
use_services:
description: >-
Specify which services this application uses in the frontend to create proxy
ingresses. e.g.
```
- name: samples
```
type: array
items:
$ref: '#/components/schemas/NamedObject'
database:
$ref: '#/components/schemas/DatabaseDeploymentConfig'
description: ''
resources:
description: |-
Application file resources. Maps from deploy/resources folder and mounts as
configmaps
type: array
items:
$ref: '#/components/schemas/FileResourcesConfig'
readinessProbe:
$ref: '#/components/schemas/ApplicationProbe'
description: Kubernetes readiness probe configuration
startupProbe:
$ref: '#/components/schemas/ApplicationProbe'
description: ''
livenessProbe:
$ref: '#/components/schemas/ApplicationProbe'
description: Kubernetes liveness probe configuration
sourceRoot:
$ref: '#/components/schemas/Filename'
description: ''
name:
description: |-