Compare commits

...

173 Commits

Author SHA1 Message Date
Andrey Melnikov
bd5641bedc fix: bash missing character 2021-03-26 13:00:59 -07:00
Andrey Melnikov
aeba4ee8a2 fix: separate windows sections as windows doesn't use $PWD.
remove: minikube section as that is no longer recommended.
2021-03-26 12:53:34 -07:00
Andrey Melnikov
d69f6a4947 Merge pull request #897 from Vafilor/fix/secret.updates
fix:  add error detection when environment variable is too long
2021-03-12 11:38:35 -08:00
Andrey Melnikov
b2119d86d0 fix: detect case where secret is too long. Also only log the secret name. In case of long secret values this would flood the console. 2021-03-12 10:42:52 -08:00
Rush Tehrani
9938b60118 Update README.md 2021-03-08 10:01:47 -08:00
Rush Tehrani
1424d24772 Merge pull request #889 from Vafilor/fix/workspaces
fix: incorrectly formatted label for workspaces
2021-03-03 12:21:56 -08:00
Andrey Melnikov
52e4117ab4 chore: codacy fixes 2021-03-03 12:18:09 -08:00
Andrey Melnikov
d6a2e98fc8 fix: incorrectly formatted label for workspaces 2021-03-03 12:14:51 -08:00
Andrey Melnikov
a4dcbdf6dc Merge pull request #888 from Vafilor/feat/workspace.machine.type
feat: add machine type to workspace listing
2021-03-03 10:07:13 -08:00
Andrey Melnikov
e114701958 Merge branch 'feat/workspace.machine.type' of github.com:Vafilor/core into feat/workspace.machine.type 2021-03-03 10:03:05 -08:00
Andrey Melnikov
f0588b7dc4 fix: revert debugging code 2021-03-03 10:02:18 -08:00
Andrey Melnikov
3a17632575 chore: added logging for unexpected error. 2021-03-03 10:02:18 -08:00
Andrey Melnikov
9ed7fc7cc3 feat: add machine type to workspace response 2021-03-03 10:01:37 -08:00
Rush Tehrani
07b525d4d3 Merge pull request #887 from rushtehrani/chore/readme
chore: Update README.md
2021-03-02 18:16:27 -08:00
Rush Tehrani
3d02e8de18 Update README.md 2021-03-02 18:13:48 -08:00
Rush Tehrani
a88066cd22 fix type in README 2021-03-02 18:12:16 -08:00
Rush Tehrani
eb5a248244 upload new logo 2021-03-02 18:10:00 -08:00
Rush Tehrani
90787ba733 Update README.md 2021-03-02 18:06:03 -08:00
rushtehrani
723d8854d7 update features image 2021-03-02 17:46:36 -08:00
rushtehrani
da804eeee0 fix logo 2021-03-02 15:13:48 -08:00
Rush Tehrani
87f13f7c28 Merge pull request #886 from rushtehrani/chore/readme
chore: Update README
2021-03-02 13:47:33 -08:00
Andrey Melnikov
78c576b674 Merge pull request #881 from Vafilor/feat/upgrade.and.resume
feat: allow changing machine type when resuming
2021-03-02 13:04:57 -08:00
Andrey Melnikov
c52f7290ea chore: remove checking for hidden inputs in resume workspace 2021-03-02 13:00:51 -08:00
Andrey Melnikov
ada5f5f588 Merge branch 'feat/upgrade.and.resume' of github.com:Vafilor/core into feat/upgrade.and.resume 2021-03-02 12:59:42 -08:00
Andrey Melnikov
e9c804d718 chore: update auto-generated files 2021-03-02 12:56:58 -08:00
Andrey Melnikov
638647f478 feat: resume workspace now allows changing machine type 2021-03-02 12:55:58 -08:00
rushtehrani
5b52991f18 additional README updates 2021-03-02 12:15:05 -08:00
rushtehrani
ee74238c8d update README 2021-03-02 12:03:11 -08:00
Rush Tehrani
35bc8b9bc6 Merge pull request #884 from Vafilor/feat/filtering.updates
feat: updated workflow/workspace fields to allow some related field queries
2021-02-26 12:16:33 -08:00
Andrey Melnikov
8e36a07ede feat: updated workflow/workspace fields to allow some related field queries. 2021-02-26 10:19:22 -08:00
Andrey Melnikov
ebd304b7e1 Merge pull request #883 from Vafilor/feat/filtering.updates
feat: added methods to get just the field name for resources
2021-02-26 09:49:10 -08:00
Andrey Melnikov
15de7c7e1f chore: documented new methods 2021-02-26 09:36:44 -08:00
Andrey Melnikov
d597ccc13f feat: added methods to get just the field name for workflows, templates, workspaces, and workspace templates 2021-02-25 17:14:28 -08:00
Rush Tehrani
4ce7175424 Merge pull request #882 from rushtehrani/feat/policy-labels
feat: Add labels for better policy management
2021-02-25 12:03:41 -08:00
rushtehrani
9713d4928a add labels to Workflow pods for policy management 2021-02-24 19:26:42 -08:00
rushtehrani
af5bc31410 add labels to Workspace pod for policy management 2021-02-24 19:07:15 -08:00
Rush Tehrani
cce7d4a2ee Merge pull request #880 from Vafilor/feat/update.workspace.templates
feat: Update workspace templates
2021-02-24 12:32:51 -08:00
Andrey Melnikov
098efadc7f feat: resume workspace now allows changing machine type 2021-02-24 11:42:22 -08:00
Andrey Melnikov
ac9753941e feat: update workspace templates 2021-02-24 10:57:36 -08:00
Andrey Melnikov
34d3efd67d chore: added logging for unexpected error. 2021-02-24 10:15:53 -08:00
Andrey Melnikov
547dcec0c6 fix: removed code from resume workspace changes 2021-02-24 10:15:40 -08:00
Andrey Melnikov
058e31d0de feat: add machine type to workspace response 2021-02-24 09:57:39 -08:00
Rush Tehrani
8418962b9e Merge pull request #837 from Vafilor/feat/upgrade.argo.2.12.4
feat: upgrade argo to 2.12.9
2021-02-23 09:17:59 -08:00
Rush Tehrani
410a8741ae Merge pull request #879 from Vafilor/feat/filesyncer.sidecar
feat: filesyncer sidecar for workflows
2021-02-19 16:24:04 -08:00
Andrey Melnikov
4e6e0fb801 feat: update filesyncer 2021-02-19 16:21:32 -08:00
Andrey Melnikov
88a06a5461 feat: remove workflow manifest parts that are not used. 2021-02-19 15:10:33 -08:00
Andrey Melnikov
0343c6fb52 fix: only add filesyncer sidecar if there are volume mounts 2021-02-17 13:06:31 -08:00
Andrey Melnikov
5b0bc517d3 feat: auto-inject filesyncer sidecar 2021-02-16 12:29:34 -08:00
Rush Tehrani
ace9e6e7f0 Merge pull request #876 from onepanelio/update-README
docs: Update README.md
2021-02-15 17:48:23 -08:00
Rush Tehrani
a7b6a1fc77 Update README.md 2021-02-13 10:15:28 -08:00
Andrey Melnikov
5619122e35 Merge pull request #875 from rushtehrani/fix/main-container
fix: Add ONEPANEL_MAIN_CONTAINER env var to all Workspaces
2021-02-09 14:38:04 -08:00
rushtehrani
bf9c20de64 add ONEPANEL_MAIN_CONTAINER env var to all Workspaces 2021-02-09 14:09:21 -08:00
Andrey Melnikov
4275c3c740 Merge pull request #873 from Vafilor/fix/migrations.configmap
fix: db not reconnecting
2021-02-05 11:19:00 -08:00
Andrey Melnikov
1da29e550f fix: reconnect db 2021-02-05 11:17:41 -08:00
Rush Tehrani
3b9c84544c Merge pull request #872 from Vafilor/fix/migrations.configmap 2021-02-04 18:31:37 -08:00
Andrey Melnikov
f88a98c774 fix: move db migrations outside of configmap changes. This was causing an issue where go and sql migrations clashed. 2021-02-04 18:25:30 -08:00
Rush Tehrani
63afd315ff Merge pull request #871 from rushtehrani/chore/update-nni-template
chore: Update hyperparameter tuning template
2021-02-04 10:52:12 -08:00
rushtehrani
8a6a79a4bc update hyperparam tuning template 2021-02-04 10:30:15 -08:00
Rush Tehrani
3b9875ab2d Merge pull request #869 from Vafilor/feat/add.bucket
feat: Add bucket to config response
2021-02-03 12:02:43 -08:00
Andrey Melnikov
5c09e07ab8 feat: separated out config from namespace config 2021-02-03 11:55:36 -08:00
Andrey Melnikov
de9d38a656 chore: cleaned up repository logic since we use minio for non-s3 providers 2021-02-03 11:32:53 -08:00
Andrey Melnikov
e906edc1ec feat: add bucket to config response 2021-02-03 11:25:26 -08:00
rushtehrani
a079c17693 update docs url for training templates 2021-02-02 09:55:59 -08:00
rushtehrani
1413d98ef0 update mrcnn params 2021-02-01 16:46:35 -08:00
rushtehrani
5e8b85c9e9 use correct versioning convention 2021-02-01 14:04:53 -08:00
Rush Tehrani
e5a1276e1d Merge pull request #867 from rushtehrani/chore/filesyncer
chore: Use v0.18.0 for FileSyncer
2021-02-01 13:16:02 -08:00
rushtehrani
ffcef0c0dc use v0.18.0 for filesyncer 2021-02-01 13:10:50 -08:00
Rush Tehrani
257d838092 Merge pull request #866 from rushtehrani/fix/templates
fix: Fix Workflow Template comment
2021-02-01 11:40:16 -08:00
Rush Tehrani
fa6fa6c10e Merge pull request #865 from Vafilor/feat/workspace.updates
feat: workspace updates
2021-02-01 11:36:03 -08:00
rushtehrani
daf0b4622d minor comment fix 2021-01-31 19:17:34 -08:00
Rush Tehrani
a4d7f69118 Merge pull request #860 from onepanelio/feat/update-templates
feat: Update all templates for dynamic node labels and new file syncing
2021-01-31 17:39:38 -08:00
rushtehrani
a8cf80396f update labels 2021-01-30 17:13:33 -08:00
rushtehrani
c5fc80d979 template cleanup 2021-01-29 18:24:15 -08:00
rushtehrani
f55b82f4b1 use correct template name vars 2021-01-29 18:12:12 -08:00
rushtehrani
bd052005f1 update vscode template 2021-01-29 15:37:59 -08:00
rushtehrani
dcab30f839 use correct image 2021-01-29 15:22:57 -08:00
rushtehrani
c91048aae7 update JupyterLab workspace template 2021-01-29 14:24:26 -08:00
Andrey Melnikov
a9ae982e61 Merge branch 'feat/workspace.updates' of github.com:Vafilor/core into feat/workspace.updates 2021-01-29 13:54:42 -08:00
Andrey Melnikov
559d937e79 feat: support sinceTime for workspace container logs 2021-01-29 13:54:08 -08:00
rushtehrani
0283aecfad update CVAT template 2021-01-29 13:47:12 -08:00
rushtehrani
53612cc145 update TFOD template 2021-01-29 12:46:25 -08:00
rushtehrani
f44e1d31c0 update MaskRCNN template 2021-01-29 12:20:28 -08:00
rushtehrani
35ea2164eb update MaskRCNN template 2021-01-29 12:07:25 -08:00
Andrey Melnikov
986b0ec7ee chore: missing comment 2021-01-29 09:57:00 -08:00
Andrey Melnikov
e1e382e223 fix: added missing proto data for workspace component service 2021-01-29 09:57:00 -08:00
Andrey Melnikov
3ae767d8f9 fix: onepanel helper image reference in contributing.md 2021-01-29 09:57:00 -08:00
Andrey Melnikov
dac793601d feat: updated workspace API request to return file syncer url if available 2021-01-29 09:57:00 -08:00
Andrey Melnikov
8f1d1ee7e0 chore: missing comment 2021-01-29 09:56:23 -08:00
Andrey Melnikov
4e2154b3e2 fix: added missing proto data for workspace component service 2021-01-29 09:55:12 -08:00
Andrey Melnikov
0664eb37c2 fix: onepanel helper image reference in contributing.md 2021-01-29 09:54:05 -08:00
Andrey Melnikov
2c86994919 feat: updated workspace API request to return file syncer url if available 2021-01-29 09:53:40 -08:00
Andrey Melnikov
4bc9cc1204 Merge pull request #851 from rushtehrani/feat/workspace-logs
feat: Add GetWorkspaceContainerLogs
2021-01-29 09:48:29 -08:00
Rush Tehrani
e240532756 Merge pull request #858 from onepanelio/chore/fix-badge
chore: Fix LFAI badge
2021-01-27 11:41:04 -08:00
Rush Tehrani
a0d9285646 chore: Fix LFAI badge 2021-01-27 09:41:53 -08:00
Andrey Melnikov
bb4cd8b283 Merge pull request #855 from rushtehrani/feat/nodepool-default
feat: Allow default for nodepool option
2021-01-25 16:35:12 -08:00
rushtehrani
33a25397c3 use an env var for more flexibility 2021-01-25 16:22:37 -08:00
rushtehrani
67180fdba3 allow default for nodepool option 2021-01-25 16:14:06 -08:00
Andrey Melnikov
527bcd835e Merge branch 'feat/upgrade.argo.2.12.4' of github.com:Vafilor/core into feat/upgrade.argo.2.12.4 2021-01-25 14:36:42 -08:00
Andrey Melnikov
488a32d5d5 fix: issue where filterOutCustomTypesFromManifest was crashing 2021-01-25 14:31:47 -08:00
Andrey Melnikov
989ec1f02d fix: wrong format for wfv1.Item 2021-01-25 14:31:47 -08:00
Andrey Melnikov
5a66c278e4 feat: update argo to 2.12.4 (WIP) 2021-01-25 14:31:47 -08:00
Andrey Melnikov
8799a79643 Merge pull request #853 from Vafilor/fix/workflow.template.version.archive
fix: issue where workflow template version did not ignore archived template
2021-01-23 19:51:19 -08:00
Andrey Melnikov
3c8d0ad5db fix: issue where workflow template version did not ignore archived templates 2021-01-23 19:44:56 -08:00
rushtehrani
0a690ad77a add comments to exported funcs 2021-01-20 16:52:40 -08:00
rushtehrani
932b343738 use correct http endpoint for workspace logs 2021-01-20 16:48:16 -08:00
rushtehrani
4a22327fec add GetWorkspaceContainerLogs 2021-01-20 16:32:32 -08:00
Rush Tehrani
1d20348a50 Merge pull request #850 from Vafilor/feat/workspace.uid.param
fix: workspace uid was name and not uid and namespace was not replaced
2021-01-19 15:57:06 -08:00
Andrey Melnikov
c7021b735e chore: codacy method comment 2021-01-19 15:54:40 -08:00
Andrey Melnikov
a132ce4e34 chore: codacy 2021-01-19 15:50:34 -08:00
Andrey Melnikov
26218bb426 fix: workspace uid was name and not uid. Also namespace was not replaced. 2021-01-19 15:33:43 -08:00
Rush Tehrani
744b79ee73 Merge pull request #849 from Vafilor/feat/workspace.uid.param
feat: add {{workspace.uid}} to parameters as a replaceable value
2021-01-19 14:42:16 -08:00
Andrey Melnikov
734d793d83 chore: codacy formatting 2021-01-19 13:19:10 -08:00
Andrey Melnikov
23f8200042 feat: add {{workspace.uid}} to parameters as a replacable value 2021-01-19 13:03:07 -08:00
Andrey Melnikov
f1bdbbad28 chore: code cleanup 2021-01-19 10:55:55 -08:00
Andrey Melnikov
a6cfbe24df chore: codacy method comments 2021-01-18 10:41:17 -08:00
Andrey Melnikov
d630508c0f feat: update workflow templates to have dynamic node pool label 2021-01-18 10:37:08 -08:00
Andrey Melnikov
e02db631b7 Merge pull request #844 from rushtehrani/feat/nodepoollabel
feat: Evaluate node pool label in Workflow Templates
2021-01-18 09:48:39 -08:00
rushtehrani
3c8556e17b evaluate nodepoollabel in workflow templates 2021-01-17 13:15:58 -08:00
Andrey Melnikov
e66255b4ca fix: issue where filterOutCustomTypesFromManifest was crashing 2021-01-15 13:28:50 -08:00
Rush Tehrani
2cb43850be Merge pull request #843 from Vafilor/fix/migration.rollback
fix: wrong file for migration rollback
2021-01-15 12:40:11 -08:00
Andrey Melnikov
08b5edde72 fix: wrong file name for migration rollback 20201113094916 2021-01-15 12:37:48 -08:00
Andrey Melnikov
82a411ebda fix: wrong file for migration rollback 2021-01-15 12:29:00 -08:00
Rush Tehrani
b30be5277a Merge pull request #839 from rushtehrani/docs/readme
docs: Update images, text and links
2021-01-14 10:00:12 -08:00
rushtehrani
4ca5ee3ded update lfai badge and text 2021-01-14 09:49:23 -08:00
rushtehrani
b09cf245d6 update README layout 2021-01-14 09:37:03 -08:00
rushtehrani
c3082cb3cc update onepanel.gif 2021-01-13 15:48:06 -08:00
Rush Tehrani
ab057f25d8 Merge pull request #838 from onepanelio/docs/readme
docs: Update README.md
2021-01-13 13:26:19 -08:00
Rush Tehrani
8081a62771 shorten hyperparameter sentence 2021-01-13 12:57:38 -08:00
Rush Tehrani
83642dd5b0 shorten feature sentences 2021-01-13 12:46:33 -08:00
Rush Tehrani
456d0f9f3c clean up and shorten some sentences 2021-01-13 12:34:01 -08:00
Rush Tehrani
13274ec703 shorten sentences 2021-01-13 12:00:06 -08:00
Rush Tehrani
45454cb783 add hyperparameter tuning bullet 2021-01-13 11:56:56 -08:00
Rush Tehrani
8a68e0e07b update note about python sdk 2021-01-13 11:52:21 -08:00
Rush Tehrani
91b9e86792 shorten sentences 2021-01-13 11:35:17 -08:00
Rush Tehrani
b5fdfa4783 clean up and wording changes 2021-01-13 11:33:04 -08:00
Rush Tehrani
99ef4ef2ac Update README.md 2021-01-13 11:05:38 -08:00
Andrey Melnikov
6e0ca2e1e4 fix: wrong format for wfv1.Item 2021-01-12 16:04:40 -08:00
Andrey Melnikov
edcc42ba4b feat: update argo to 2.12.4 (WIP) 2021-01-12 15:58:49 -08:00
Andrey Melnikov
cebbc069fc Merge pull request #832 from Vafilor/feat/rename.dev
feat: change "dev" tag to be "latest" for images
2021-01-12 11:33:38 -08:00
Rush Tehrani
709871dd3b Merge pull request #834 from rushtehrani/fix/params
fix: Only remove whitespaces in var references
2021-01-11 20:44:37 -08:00
rushtehrani
1d0c898fa4 code cleanup + no param mutation 2021-01-11 20:37:23 -08:00
rushtehrani
1355f8039e only remove whitespaces in var references 2021-01-11 20:05:58 -08:00
Andrey Melnikov
132e4f1d9c feat: change "dev" tag to be "latest" for images 2021-01-11 11:53:32 -08:00
Rush Tehrani
2c187ad784 Merge pull request #830 from Vafilor/feat/workflow.template.version.parameters
feat: add parameters to workflow template versions response
2021-01-09 20:36:51 -08:00
Andrey Melnikov
c2a80121b7 fix: issue where opts.params were overwritten because of pointer reference - this caused the params stored in database to be altered 2021-01-09 19:26:33 -08:00
Andrey Melnikov
5275aa2ea7 Merge branch 'feat/workflow.template.version.parameters' of github.com:Vafilor/core into feat/workflow.template.version.parameters 2021-01-09 19:25:50 -08:00
Andrey Melnikov
682994c4c2 feat: add parameters to workflow template versions response 2021-01-09 19:20:25 -08:00
Andrey Melnikov
302731e23a feat: replace parameter namespace values for workflow/workspace with the runtime value 2021-01-09 15:14:38 -08:00
Andrey Melnikov
f9338bd51e feat: add parameters to workflow template versions response 2021-01-08 10:47:06 -08:00
Andrey Melnikov
f424e5e661 Merge pull request #826 from rushtehrani/fix/tfod
fix: Rename train.py => main.py in TFOD workflow template
2021-01-07 12:54:07 -08:00
rushtehrani
d9cc564596 rename train.py => main.py in tfod workflow template 2021-01-07 12:50:37 -08:00
Andrey Melnikov
fbc780ab4d Merge pull request #824 from rushtehrani/feat/update-cvat
feat: Update CVAT and FileSyncer images
2021-01-07 10:05:28 -08:00
rushtehrani
5f531f2ac0 update cvat and filesyncer images 2021-01-07 09:59:26 -08:00
Rush Tehrani
208828fcaf Merge pull request #822 from aleksandrmelnikov/feat/core.804-upg.k8s.arg.support.secrets
feat: Adding support for ImagePullSecrets in workspaces and workflows
2021-01-06 12:14:31 -08:00
Rush Tehrani
855eaf2a40 Merge pull request #823 from rushtehrani/fix/tf-training
fix: Remove used-by: cvat from tf training workflow
2021-01-06 10:00:41 -08:00
rushtehrani
d230357a28 remove used-by: cvat from tf training workflow 2021-01-05 16:48:50 -08:00
Aleksandr Melnikov
6e0131636e go fmt. 2021-01-05 12:28:12 -08:00
Aleksandr Melnikov
70e3d36416 Adding support for ImagePullSecrets in workspaces. 2021-01-05 11:44:10 -08:00
Rush Tehrani
313e6841b1 Merge pull request #821 from rushtehrani/feat/cleanup
chore: Remove archive from templates
2021-01-04 13:51:39 -08:00
rushtehrani
22abceb9df remove archive from templates 2021-01-04 13:47:32 -08:00
Rush Tehrani
e6889ac470 Merge pull request #820 from Vafilor/fix/finished.logs
fix: issue where logs would sometimes crash
2020-12-31 23:36:16 -08:00
Andrey Melnikov
5669d03c5c chore: codacy 2020-12-31 23:33:42 -08:00
Andrey Melnikov
a8f5cde75e fix: issue where logs would sometimes accumulate because there was no newline in the content. 2020-12-31 23:23:13 -08:00
Rush Tehrani
67af745dab Merge pull request #818 from Vafilor/fix/finished.logs
fix: issues with finished logs
2020-12-31 11:12:09 -08:00
Andrey Melnikov
080624d9e2 fix: issues with finished logs. Content was repeating, resulting in a large data load - making the stream fail.
No timestamps were being returned as timestamps for time 0.
Occasionally lines would cut off across multiple lines.
2020-12-31 11:07:39 -08:00
Rush Tehrani
69c523ee23 Merge pull request #815 from Vafilor/feat/default.make.api
feat: make api command use docker by default.
2020-12-30 15:18:46 -08:00
Andrey Melnikov
303cee3e9f feat: make api command use docker by default. 2020-12-30 15:05:16 -08:00
Rush Tehrani
3cb799f6fe Merge pull request #814 from Vafilor/fix/timestamp.logs
fix: workflow execution logs showing timestamps incorrectly
2020-12-30 13:25:35 -08:00
Andrey Melnikov
8d896c03c0 Merge branch 'fix/timestamp.logs' of github.com:Vafilor/core into fix/timestamp.logs 2020-12-30 12:05:37 -08:00
Andrey Melnikov
543367c36e feat: updated workflow logs to return a response that may contain several log entries. 2020-12-30 12:04:21 -08:00
Andrey Melnikov
ba776cddbd fix: fixed issue with logs where the timestamp parsing ignored newlines 2020-12-30 12:04:21 -08:00
Andrey Melnikov
ea89ddf289 feat: updated workflow logs to return a response that may contain several log entries. 2020-12-30 12:02:25 -08:00
Andrey Melnikov
48d66004ec fix: fixed issue with logs where the timestamp parsing ignored newlines 2020-12-30 11:49:37 -08:00
85 changed files with 7183 additions and 1631 deletions

View File

@@ -33,6 +33,6 @@ jobs:
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
tags: "dev"
tags: "latest"
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

View File

@@ -4,11 +4,22 @@
Note: Up migrations are automatically executed when the application is run.
#### Linux / Mac
```bash
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db/sql create <name> sql # Create migration in db/sql folder
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose help # See all available commands
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db/sql create <name> sql # Create migration in db/sql folder
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose help # See all available commands
```
#### Windows
```bash
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db/sql create wow sql # Create migration in db/sql folder
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose help # See all available commands
```
### Local
@@ -64,86 +75,27 @@ Make sure that your `$GOBIN` is in your `$PATH`.
### Docker
Generate Go and Swagger APIs:
Generate Go and Swagger APIs
#### Linux / Mac
```bash
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 make api version=1.0.0
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api-internal version=1.0.0
```
#### Windows
```bash
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 make api-internal version=1.0.0
```
### Local Installation
Generate Go and Swagger APIs:
```bash
make api version=1.0.0
make api-internal version=1.0.0
```
## Minikube Debugging and Development
It is possible to access host resources with minikube.
- This means you can run core and core-ui on your machine, and have minikube
execute API calls to your machine.
NOTE:
- Do not use host access with Minikube and VMWare. This has been shown not to work
in our testing.
If you have a work-around, feel free to let us know.
To make this work, some setup is needed.
- Minikube started with driver=virtualbox
Get your Minikube ssh IP
https://minikube.sigs.k8s.io/docs/handbook/host-access/
```shell script
minikube ssh "route -n | grep ^0.0.0.0 | awk '{ print \$2 }'"
```
Example output:
```shell script
10.0.2.2
```
When running core api, add these ENV variables.
```shell script
ONEPANEL_CORE_SERVICE_HOST=10.0.2.2 # IP you just got
ONEPANEL_CORE_SERVICE_PORT=8888 # HTTP Port set in main.go
```
DB Access
- You will need to change the Postgres service from ClusterIP to NodePort
Run
```shell script
minikube service list
```
Look at Postgres, you'll see something like this:
```shell script
$ minikube service list
|----------------------|----------------------------------------|--------------------|--------------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|----------------------|----------------------------------------|--------------------|--------------------------------|
| application-system | application-controller-manager-service | No node port |
| default | kubernetes | No node port |
| kube-system | kube-dns | No node port |
| kubernetes-dashboard | dashboard-metrics-scraper | No node port |
| kubernetes-dashboard | kubernetes-dashboard | No node port |
| onepanel | onepanel-core | http/8888 | http://192.168.99.101:32000 |
| | | grpc/8887 | http://192.168.99.101:32001 |
| onepanel | onepanel-core-ui | http/80 | http://192.168.99.101:32002 |
| onepanel | postgres | 5432 | http://192.168.99.101:31975 |
|----------------------|----------------------------------------|--------------------|--------------------------------|
```
Grab `http://192.168.99.101:31975`
Use this in main.go for the following lines:
```shell script
databaseDataSourceName := fmt.Sprintf("port=31975 host=%v user=%v password=%v dbname=%v sslmode=disable",
"192.168.99.101", config["databaseUsername"], config["databasePassword"], config["databaseName"])
```
This should connect your developing core to the minikube db.
After this, build main.go and run the executable.
- Or use your IDE equivalent
## Code Structure & Organization
### `utils` dir

View File

@@ -35,10 +35,10 @@ protoc:
--openapiv2_opt simple_operation_ids=true \
api/proto/*.proto
api: init protoc jq
api-internal: init protoc jq
api-docker: init
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api version=$(version)
api: init
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api-internal version=$(version)
docker-build:
docker build -t onepanel-core .

View File

@@ -1,4 +1,4 @@
<img width="240px" src="img/logo.png">
<img width="200px" src="img/logo.png">
![build](https://img.shields.io/github/workflow/status/onepanelio/core/Publish%20dev%20docker%20image/master?color=01579b)
![code](https://img.shields.io/codacy/grade/d060fc4d1ac64b85b78f85c691ead86a?color=01579b)
@@ -7,76 +7,41 @@
[![docs](https://img.shields.io/github/v/release/onepanelio/core?color=01579b&label=docs)](https://docs.onepanel.io)
[![issues](https://img.shields.io/github/issues-raw/onepanelio/core?color=01579b&label=issues)](https://github.com/onepanelio/core/issues)
[![chat](https://img.shields.io/badge/support-slack-01579b)](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg)
[![lfai](https://img.shields.io/badge/link-LFAI-01579b)](https://landscape.lfai.foundation/?selected=onepanel)
[![license](https://img.shields.io/github/license/onepanelio/core?color=01579b)](https://opensource.org/licenses/Apache-2.0)
Production scale vision AI platform with fully integrated components for model building, automated labeling, data processing and model training pipelines.
The open and extensible integrated development environment (IDE) for computer vision with built-in modules for model building, automated labeling, data processing, model training, hyperparameter tuning and workflow orchestration.
<img width="100%" src="img/onepanel.gif">
## Why Onepanel?
- End-to-end automation for production scale vision AI pipelines
- Best of breed, open source deep learning tools seamlessly integrated in one unified platform
- Infrastructure automation so you can easily scale your data processing and training pipelines to multiple nodes
- Customizable, reproducible and version controlled tooling and pipeline templates
- Scalability, flexibility and resiliency of Kubernetes without the deployment and configuration complexities
Onepanel can be found on [LF AI Landscape](http://landscape.lfai.foundation/selected=onepanel)
## Features
- Annotate images and video with automatic annotation of bounding boxes and polygon masks, fully integrated with data processing and training pipelines.
- JupyterLab configured with extensions for TensorBoard, Git/GitHub, debugging, notebook diffing and support for Conda, OpenCV, Tensorflow and PyTorch with GPU.
- Build fully reproducible, distributed and parallel data processing and training pipelines with real-time logs and output snapshots.
- Bring your own IDEs, annotation tools and pipelines with a version controlled YAML and Docker based template engine.
- Track and visualize model metrics and experiments with TensorBoard or bring your own experiment tracking tools.
- Extend Onepanel with powerful REST APIs and SDKs to further automate your workflows.
## Online demo
We have created an [online demo environment](https://onepanel.typeform.com/to/kQfDX5Vf?product=github) so that you can quickly try Onepanel.
**Note:** This is a shared, read only demo environment that is reset every few hours.
<img width="100%" src="img/features.png">
## Quick start
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started with the platform of your choice.
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started.
### Quick start videos
[Getting started with Microsoft Azure](https://youtu.be/CQBIYfBk3Zk)\
[Getting started with Amazon EKS](https://youtu.be/Ipdd8f6D6IM)\
[Getting started with Google GKE](https://youtu.be/pZRO63SnQ8A)
## Online demo
For a quick look at some features see this shared, read-only [online demo](https://onepanel.typeform.com/to/kQfDX5Vf?product=github).
## Community
See [documentation](https://docs.onepanel.ai) to get started or for more detailed operational and user guides.
To submit a feature request, report a bug or documentation issue, please open a GitHub [pull request](https://github.com/onepanelio/core/pulls) or [issue](https://github.com/onepanelio/core/issues).
For help, questions, release announcements and contribution discussions, join us on [Slack](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg) or [GitHub discussions](https://github.com/onepanelio/core/discussions).
For help, questions, release announcements and contribution discussions, join us on [Slack](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg).
## Contributing
Onepanel is modular and consists of [multiple repositories](https://docs.onepanel.ai/docs/getting-started/contributing/#project-repositories).
Onepanel is modular and consists of the following repositories:
[Backend](https://github.com/onepanelio/core/) (this repository) - Code base for backend (Go)\
[Frontend](https://github.com/onepanelio/core-ui/) - Code base for frontend (Angular + TypeScript)\
[CLI](https://github.com/onepanelio/cli/) - Code base for installation and management CLI (Go)\
[Manifests](https://github.com/onepanelio/manifests/) - Kustomize manifests used by installation and management CLI (YAML)\
[Python SDK](https://github.com/onepanelio/python-sdk/) - Python SDK code and documentation (Python)\
[Templates](https://github.com/onepanelio/templates) - Various Workspace, Workflow, Task and Sidecar Templates\
[Documentation](https://github.com/onepanelio/core-docs/) - The repository for documentation site\
[API Documentation](https://github.com/onepanelio/core-api-docs/) - API documentation if you choose to use the API directly
See `CONTRIBUTING.md` in each repository for development guidelines. Also, see [contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) for additional guidelines.
See [contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) and `CONTRIBUTING.md` in each repository for additional contribution guidelines.
## Acknowledgments
Onepanel seamlessly integrates the following excellent open source projects. We are grateful for the support these communities provide and do our best to contribute back as much as possible.
Onepanel seamlessly integrates the following open source projects under the hood:
[Argo](https://github.com/argoproj/argo)\
[CVAT](https://github.com/opencv/cvat)\
[JupyterLab](https://github.com/jupyterlab/jupyterlab)\
[NNI](https://github.com/microsoft/nni)
[Argo](https://github.com/argoproj/argo) | [Couler](https://github.com/couler-proj/couler) | [CVAT](https://github.com/opencv/cvat) | [JupyterLab](https://github.com/jupyterlab/jupyterlab) | [NNI](https://github.com/microsoft/nni)
We are grateful for the support these communities provide and do our best to contribute back as much as possible.
## License
Onepanel is licensed under [Apache 2.0](https://github.com/onepanelio/core/blob/master/LICENSE).
## Need a managed solution?
Visit our [website](https://www.onepanel.io/) for more information about our managed offerings.
## For organizations
Visit our [website](https://www.onepanel.ai/) for more information on support options and enterprise solution.

View File

@@ -3,7 +3,7 @@
"info": {
"title": "Onepanel",
"description": "Onepanel API",
"version": "0.17.0",
"version": "0.19.0",
"contact": {
"name": "Onepanel project",
"url": "https://github.com/onepanelio/core"
@@ -22,6 +22,156 @@
"application/octet-stream"
],
"paths": {
"/apis/v1beta/{namespace}/field/workflow_executions/{fieldName}": {
"get": {
"operationId": "ListWorkflowExecutionsField",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ListWorkflowExecutionsFieldResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "fieldName",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta/{namespace}/field/workflow_templates/{fieldName}": {
"get": {
"operationId": "ListWorkflowTemplatesField",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ListWorkflowTemplatesFieldResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "fieldName",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "isSystem",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
"WorkflowTemplateService"
]
}
},
"/apis/v1beta/{namespace}/field/workspace_templates/{fieldName}": {
"get": {
"operationId": "ListWorkspaceTemplatesField",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ListWorkspaceTemplatesFieldResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "fieldName",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkspaceTemplateService"
]
}
},
"/apis/v1beta/{namespace}/field/workspaces/{fieldName}": {
"get": {
"operationId": "ListWorkspacesField",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ListWorkspacesFieldResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "fieldName",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkspaceService"
]
}
},
"/apis/v1beta1/auth": {
"post": {
"operationId": "IsAuthorized",
@@ -215,6 +365,36 @@
]
}
},
"/apis/v1beta1/{namespace}/config": {
"get": {
"operationId": "GetNamespaceConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetNamespaceConfigResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"ConfigService"
]
}
},
"/apis/v1beta1/{namespace}/cron_workflow": {
"post": {
"operationId": "CreateCronWorkflow",
@@ -1289,13 +1469,13 @@
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/LogEntry"
"$ref": "#/definitions/LogStreamResponse"
},
"error": {
"$ref": "#/definitions/google.rpc.Status"
}
},
"title": "Stream result of LogEntry"
"title": "Stream result of LogStreamResponse"
}
},
"default": {
@@ -2558,6 +2738,64 @@
]
}
},
"/apis/v1beta1/{namespace}/workspaces/{uid}/containers/{containerName}/logs": {
"get": {
"operationId": "GetWorkspaceContainerLogs",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/LogStreamResponse"
},
"error": {
"$ref": "#/definitions/google.rpc.Status"
}
},
"title": "Stream result of LogStreamResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/google.rpc.Status"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "containerName",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "sinceTime",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"WorkspaceService"
]
}
},
"/apis/v1beta1/{namespace}/workspaces/{uid}/pause": {
"put": {
"operationId": "PauseWorkspace",
@@ -2623,6 +2861,14 @@
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateWorkspaceBody"
}
}
],
"tags": [
@@ -3170,6 +3416,14 @@
}
}
},
"GetNamespaceConfigResponse": {
"type": "object",
"properties": {
"bucket": {
"type": "string"
}
}
},
"GetWorkflowExecutionMetricsResponse": {
"type": "object",
"properties": {
@@ -3382,6 +3636,17 @@
}
}
},
"ListWorkflowExecutionsFieldResponse": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ListWorkflowExecutionsResponse": {
"type": "object",
"properties": {
@@ -3428,6 +3693,17 @@
}
}
},
"ListWorkflowTemplatesFieldResponse": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ListWorkflowTemplatesResponse": {
"type": "object",
"properties": {
@@ -3505,6 +3781,17 @@
}
}
},
"ListWorkspaceTemplatesFieldResponse": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ListWorkspaceTemplatesResponse": {
"type": "object",
"properties": {
@@ -3532,6 +3819,17 @@
}
}
},
"ListWorkspacesFieldResponse": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"LogEntry": {
"type": "object",
"properties": {
@@ -3543,6 +3841,28 @@
}
}
},
"LogStreamResponse": {
"type": "object",
"properties": {
"logEntries": {
"type": "array",
"items": {
"$ref": "#/definitions/LogEntry"
}
}
}
},
"MachineType": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"Metric": {
"type": "object",
"properties": {
@@ -3920,6 +4240,26 @@
"items": {
"$ref": "#/definitions/Parameter"
}
},
"workspaceComponents": {
"type": "array",
"items": {
"$ref": "#/definitions/WorkspaceComponent"
}
},
"machineType": {
"$ref": "#/definitions/MachineType"
}
}
},
"WorkspaceComponent": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},

View File

@@ -183,6 +183,163 @@ func (x *ParameterOption) GetValue() string {
return ""
}
type LogStreamResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LogEntries []*LogEntry `protobuf:"bytes,1,rep,name=logEntries,proto3" json:"logEntries,omitempty"`
}
func (x *LogStreamResponse) Reset() {
*x = LogStreamResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogStreamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogStreamResponse) ProtoMessage() {}
func (x *LogStreamResponse) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LogStreamResponse.ProtoReflect.Descriptor instead.
func (*LogStreamResponse) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{2}
}
func (x *LogStreamResponse) GetLogEntries() []*LogEntry {
if x != nil {
return x.LogEntries
}
return nil
}
type LogEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *LogEntry) Reset() {
*x = LogEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogEntry) ProtoMessage() {}
func (x *LogEntry) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.
func (*LogEntry) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{3}
}
func (x *LogEntry) GetTimestamp() string {
if x != nil {
return x.Timestamp
}
return ""
}
func (x *LogEntry) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
type MachineType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *MachineType) Reset() {
*x = MachineType{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineType) ProtoMessage() {}
func (x *MachineType) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MachineType.ProtoReflect.Descriptor instead.
func (*MachineType) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{4}
}
func (x *MachineType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MachineType) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{
@@ -205,10 +362,22 @@ var file_common_proto_rawDesc = []byte{
0x73, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x24,
0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65,
0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x42,
0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f,
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69,
0x65, 0x73, 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c,
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x37, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -223,18 +392,22 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_common_proto_goTypes = []interface{}{
(*Parameter)(nil), // 0: api.Parameter
(*ParameterOption)(nil), // 1: api.ParameterOption
(*Parameter)(nil), // 0: api.Parameter
(*ParameterOption)(nil), // 1: api.ParameterOption
(*LogStreamResponse)(nil), // 2: api.LogStreamResponse
(*LogEntry)(nil), // 3: api.LogEntry
(*MachineType)(nil), // 4: api.MachineType
}
var file_common_proto_depIdxs = []int32{
1, // 0: api.Parameter.options:type_name -> api.ParameterOption
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
3, // 1: api.LogStreamResponse.logEntries:type_name -> api.LogEntry
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@@ -267,6 +440,42 @@ func file_common_proto_init() {
return nil
}
}
file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LogStreamResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LogEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -274,7 +483,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},

View File

@@ -27,6 +27,100 @@ const (
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type GetNamespaceConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *GetNamespaceConfigRequest) Reset() {
*x = GetNamespaceConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNamespaceConfigRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNamespaceConfigRequest) ProtoMessage() {}
func (x *GetNamespaceConfigRequest) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNamespaceConfigRequest.ProtoReflect.Descriptor instead.
func (*GetNamespaceConfigRequest) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{0}
}
func (x *GetNamespaceConfigRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetNamespaceConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
}
func (x *GetNamespaceConfigResponse) Reset() {
*x = GetNamespaceConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNamespaceConfigResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNamespaceConfigResponse) ProtoMessage() {}
func (x *GetNamespaceConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNamespaceConfigResponse.ProtoReflect.Descriptor instead.
func (*GetNamespaceConfigResponse) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{1}
}
func (x *GetNamespaceConfigResponse) GetBucket() string {
if x != nil {
return x.Bucket
}
return ""
}
type GetConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -41,7 +135,7 @@ type GetConfigResponse struct {
func (x *GetConfigResponse) Reset() {
*x = GetConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[0]
mi := &file_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -54,7 +148,7 @@ func (x *GetConfigResponse) String() string {
func (*GetConfigResponse) ProtoMessage() {}
func (x *GetConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[0]
mi := &file_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -67,7 +161,7 @@ func (x *GetConfigResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.
func (*GetConfigResponse) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{0}
return file_config_proto_rawDescGZIP(), []int{2}
}
func (x *GetConfigResponse) GetApiUrl() string {
@@ -110,7 +204,7 @@ type NodePoolOption struct {
func (x *NodePoolOption) Reset() {
*x = NodePoolOption{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[1]
mi := &file_config_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -123,7 +217,7 @@ func (x *NodePoolOption) String() string {
func (*NodePoolOption) ProtoMessage() {}
func (x *NodePoolOption) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[1]
mi := &file_config_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -136,7 +230,7 @@ func (x *NodePoolOption) ProtoReflect() protoreflect.Message {
// Deprecated: Use NodePoolOption.ProtoReflect.Descriptor instead.
func (*NodePoolOption) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{1}
return file_config_proto_rawDescGZIP(), []int{3}
}
func (x *NodePoolOption) GetName() string {
@@ -165,7 +259,7 @@ type NodePool struct {
func (x *NodePool) Reset() {
*x = NodePool{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[2]
mi := &file_config_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -178,7 +272,7 @@ func (x *NodePool) String() string {
func (*NodePool) ProtoMessage() {}
func (x *NodePool) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[2]
mi := &file_config_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -191,7 +285,7 @@ func (x *NodePool) ProtoReflect() protoreflect.Message {
// Deprecated: Use NodePool.ProtoReflect.Descriptor instead.
func (*NodePool) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{2}
return file_config_proto_rawDescGZIP(), []int{4}
}
func (x *NodePool) GetLabel() string {
@@ -215,34 +309,49 @@ var file_config_proto_rawDesc = []byte{
0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82,
0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06,
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65,
0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50,
0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x4f, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f,
0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x32, 0x6a, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x24, 0x5a, 0x22,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61,
0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67,
0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39,
0x0a, 0x19, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x1a, 0x47, 0x65, 0x74,
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22,
0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a,
0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x64,
0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65,
0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x4f, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f,
0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x32, 0xeb, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7f,
0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f,
0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -257,20 +366,24 @@ func file_config_proto_rawDescGZIP() []byte {
return file_config_proto_rawDescData
}
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_config_proto_goTypes = []interface{}{
(*GetConfigResponse)(nil), // 0: api.GetConfigResponse
(*NodePoolOption)(nil), // 1: api.NodePoolOption
(*NodePool)(nil), // 2: api.NodePool
(*emptypb.Empty)(nil), // 3: google.protobuf.Empty
(*GetNamespaceConfigRequest)(nil), // 0: api.GetNamespaceConfigRequest
(*GetNamespaceConfigResponse)(nil), // 1: api.GetNamespaceConfigResponse
(*GetConfigResponse)(nil), // 2: api.GetConfigResponse
(*NodePoolOption)(nil), // 3: api.NodePoolOption
(*NodePool)(nil), // 4: api.NodePool
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
}
var file_config_proto_depIdxs = []int32{
2, // 0: api.GetConfigResponse.nodePool:type_name -> api.NodePool
1, // 1: api.NodePool.options:type_name -> api.NodePoolOption
3, // 2: api.ConfigService.GetConfig:input_type -> google.protobuf.Empty
0, // 3: api.ConfigService.GetConfig:output_type -> api.GetConfigResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
4, // 0: api.GetConfigResponse.nodePool:type_name -> api.NodePool
3, // 1: api.NodePool.options:type_name -> api.NodePoolOption
5, // 2: api.ConfigService.GetConfig:input_type -> google.protobuf.Empty
0, // 3: api.ConfigService.GetNamespaceConfig:input_type -> api.GetNamespaceConfigRequest
2, // 4: api.ConfigService.GetConfig:output_type -> api.GetConfigResponse
1, // 5: api.ConfigService.GetNamespaceConfig:output_type -> api.GetNamespaceConfigResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
@@ -283,7 +396,7 @@ func file_config_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetConfigResponse); i {
switch v := v.(*GetNamespaceConfigRequest); i {
case 0:
return &v.state
case 1:
@@ -295,7 +408,7 @@ func file_config_proto_init() {
}
}
file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePoolOption); i {
switch v := v.(*GetNamespaceConfigResponse); i {
case 0:
return &v.state
case 1:
@@ -307,6 +420,30 @@ func file_config_proto_init() {
}
}
file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetConfigResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePoolOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePool); i {
case 0:
return &v.state
@@ -325,7 +462,7 @@ func file_config_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_config_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -50,6 +50,58 @@ func local_request_ConfigService_GetConfig_0(ctx context.Context, marshaler runt
}
func request_ConfigService_GetNamespaceConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetNamespaceConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := client.GetNamespaceConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigService_GetNamespaceConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetNamespaceConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := server.GetNamespaceConfig(ctx, &protoReq)
return msg, metadata, err
}
// RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux".
// UnaryRPC :call ConfigServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -79,6 +131,29 @@ func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
})
mux.Handle("GET", pattern_ConfigService_GetNamespaceConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ConfigService/GetNamespaceConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigService_GetNamespaceConfig_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetNamespaceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -140,13 +215,37 @@ func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
})
mux.Handle("GET", pattern_ConfigService_GetNamespaceConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ConfigService/GetNamespaceConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigService_GetNamespaceConfig_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetNamespaceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_ConfigService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "config"}, ""))
pattern_ConfigService_GetNamespaceConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "config"}, ""))
)
var (
forward_ConfigService_GetConfig_0 = runtime.ForwardResponseMessage
forward_ConfigService_GetNamespaceConfig_0 = runtime.ForwardResponseMessage
)

View File

@@ -19,6 +19,7 @@ const _ = grpc.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ConfigServiceClient interface {
GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error)
GetNamespaceConfig(ctx context.Context, in *GetNamespaceConfigRequest, opts ...grpc.CallOption) (*GetNamespaceConfigResponse, error)
}
type configServiceClient struct {
@@ -38,11 +39,21 @@ func (c *configServiceClient) GetConfig(ctx context.Context, in *emptypb.Empty,
return out, nil
}
func (c *configServiceClient) GetNamespaceConfig(ctx context.Context, in *GetNamespaceConfigRequest, opts ...grpc.CallOption) (*GetNamespaceConfigResponse, error) {
out := new(GetNamespaceConfigResponse)
err := c.cc.Invoke(ctx, "/api.ConfigService/GetNamespaceConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ConfigServiceServer is the server API for ConfigService service.
// All implementations must embed UnimplementedConfigServiceServer
// for forward compatibility
type ConfigServiceServer interface {
GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error)
GetNamespaceConfig(context.Context, *GetNamespaceConfigRequest) (*GetNamespaceConfigResponse, error)
mustEmbedUnimplementedConfigServiceServer()
}
@@ -53,6 +64,9 @@ type UnimplementedConfigServiceServer struct {
func (UnimplementedConfigServiceServer) GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented")
}
func (UnimplementedConfigServiceServer) GetNamespaceConfig(context.Context, *GetNamespaceConfigRequest) (*GetNamespaceConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNamespaceConfig not implemented")
}
func (UnimplementedConfigServiceServer) mustEmbedUnimplementedConfigServiceServer() {}
// UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -84,6 +98,24 @@ func _ConfigService_GetConfig_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _ConfigService_GetNamespaceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNamespaceConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigServiceServer).GetNamespaceConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ConfigService/GetNamespaceConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigServiceServer).GetNamespaceConfig(ctx, req.(*GetNamespaceConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ConfigService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.ConfigService",
HandlerType: (*ConfigServiceServer)(nil),
@@ -92,6 +124,10 @@ var _ConfigService_serviceDesc = grpc.ServiceDesc{
MethodName: "GetConfig",
Handler: _ConfigService_GetConfig_Handler,
},
{
MethodName: "GetNamespaceConfig",
Handler: _ConfigService_GetNamespaceConfig_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "config.proto",

File diff suppressed because it is too large Load Diff

View File

@@ -1333,6 +1333,78 @@ func local_request_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx context.
}
func request_WorkflowService_ListWorkflowExecutionsField_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkflowExecutionsFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := client.ListWorkflowExecutionsField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkflowService_ListWorkflowExecutionsField_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkflowExecutionsFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := server.ListWorkflowExecutionsField(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkflowServiceHandlerServer registers the http handlers for service WorkflowService to "mux".
// UnaryRPC :call WorkflowServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -1698,6 +1770,29 @@ func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.Serv
})
mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutionsField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/ListWorkflowExecutionsField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkflowService_ListWorkflowExecutionsField_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkflowService_ListWorkflowExecutionsField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -2079,6 +2174,26 @@ func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.Serv
})
mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutionsField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/ListWorkflowExecutionsField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkflowService_ListWorkflowExecutionsField_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkflowService_ListWorkflowExecutionsField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -2116,6 +2231,8 @@ var (
pattern_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, ""))
pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, ""))
pattern_WorkflowService_ListWorkflowExecutionsField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta", "namespace", "field", "workflow_executions", "fieldName"}, ""))
)
var (
@@ -2152,4 +2269,6 @@ var (
forward_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage
forward_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage
forward_WorkflowService_ListWorkflowExecutionsField_0 = runtime.ForwardResponseMessage
)

View File

@@ -37,6 +37,7 @@ type WorkflowServiceClient interface {
UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error)
UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error)
ListWorkflowExecutionsField(ctx context.Context, in *ListWorkflowExecutionsFieldRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsFieldResponse, error)
}
type workflowServiceClient struct {
@@ -140,7 +141,7 @@ func (c *workflowServiceClient) GetWorkflowExecutionLogs(ctx context.Context, in
}
type WorkflowService_GetWorkflowExecutionLogsClient interface {
Recv() (*LogEntry, error)
Recv() (*LogStreamResponse, error)
grpc.ClientStream
}
@@ -148,8 +149,8 @@ type workflowServiceGetWorkflowExecutionLogsClient struct {
grpc.ClientStream
}
func (x *workflowServiceGetWorkflowExecutionLogsClient) Recv() (*LogEntry, error) {
m := new(LogEntry)
func (x *workflowServiceGetWorkflowExecutionLogsClient) Recv() (*LogStreamResponse, error) {
m := new(LogStreamResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
@@ -246,6 +247,15 @@ func (c *workflowServiceClient) UpdateWorkflowExecutionMetrics(ctx context.Conte
return out, nil
}
func (c *workflowServiceClient) ListWorkflowExecutionsField(ctx context.Context, in *ListWorkflowExecutionsFieldRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsFieldResponse, error) {
out := new(ListWorkflowExecutionsFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowExecutionsField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkflowServiceServer is the server API for WorkflowService service.
// All implementations must embed UnimplementedWorkflowServiceServer
// for forward compatibility
@@ -269,6 +279,7 @@ type WorkflowServiceServer interface {
UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*emptypb.Empty, error)
AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error)
UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error)
ListWorkflowExecutionsField(context.Context, *ListWorkflowExecutionsFieldRequest) (*ListWorkflowExecutionsFieldResponse, error)
mustEmbedUnimplementedWorkflowServiceServer()
}
@@ -327,6 +338,9 @@ func (UnimplementedWorkflowServiceServer) AddWorkflowExecutionMetrics(context.Co
func (UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionMetrics not implemented")
}
func (UnimplementedWorkflowServiceServer) ListWorkflowExecutionsField(context.Context, *ListWorkflowExecutionsFieldRequest) (*ListWorkflowExecutionsFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowExecutionsField not implemented")
}
func (UnimplementedWorkflowServiceServer) mustEmbedUnimplementedWorkflowServiceServer() {}
// UnsafeWorkflowServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -460,7 +474,7 @@ func _WorkflowService_GetWorkflowExecutionLogs_Handler(srv interface{}, stream g
}
type WorkflowService_GetWorkflowExecutionLogsServer interface {
Send(*LogEntry) error
Send(*LogStreamResponse) error
grpc.ServerStream
}
@@ -468,7 +482,7 @@ type workflowServiceGetWorkflowExecutionLogsServer struct {
grpc.ServerStream
}
func (x *workflowServiceGetWorkflowExecutionLogsServer) Send(m *LogEntry) error {
func (x *workflowServiceGetWorkflowExecutionLogsServer) Send(m *LogStreamResponse) error {
return x.ServerStream.SendMsg(m)
}
@@ -652,6 +666,24 @@ func _WorkflowService_UpdateWorkflowExecutionMetrics_Handler(srv interface{}, ct
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_ListWorkflowExecutionsField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowExecutionsFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).ListWorkflowExecutionsField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/ListWorkflowExecutionsField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).ListWorkflowExecutionsField(ctx, req.(*ListWorkflowExecutionsFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkflowService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkflowService",
HandlerType: (*WorkflowServiceServer)(nil),
@@ -716,6 +748,10 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
MethodName: "UpdateWorkflowExecutionMetrics",
Handler: _WorkflowService_UpdateWorkflowExecutionMetrics_Handler,
},
{
MethodName: "ListWorkflowExecutionsField",
Handler: _WorkflowService_ListWorkflowExecutionsField_Handler,
},
},
Streams: []grpc.StreamDesc{
{

View File

@@ -1043,6 +1043,116 @@ func (x *GetWorkflowTemplateLabelsRequest) GetVersion() int64 {
return 0
}
type ListWorkflowTemplatesFieldRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
FieldName string `protobuf:"bytes,2,opt,name=fieldName,proto3" json:"fieldName,omitempty"`
IsSystem bool `protobuf:"varint,3,opt,name=isSystem,proto3" json:"isSystem,omitempty"`
}
func (x *ListWorkflowTemplatesFieldRequest) Reset() {
*x = ListWorkflowTemplatesFieldRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_workflow_template_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkflowTemplatesFieldRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkflowTemplatesFieldRequest) ProtoMessage() {}
func (x *ListWorkflowTemplatesFieldRequest) ProtoReflect() protoreflect.Message {
mi := &file_workflow_template_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkflowTemplatesFieldRequest.ProtoReflect.Descriptor instead.
func (*ListWorkflowTemplatesFieldRequest) Descriptor() ([]byte, []int) {
return file_workflow_template_proto_rawDescGZIP(), []int{15}
}
func (x *ListWorkflowTemplatesFieldRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListWorkflowTemplatesFieldRequest) GetFieldName() string {
if x != nil {
return x.FieldName
}
return ""
}
func (x *ListWorkflowTemplatesFieldRequest) GetIsSystem() bool {
if x != nil {
return x.IsSystem
}
return false
}
type ListWorkflowTemplatesFieldResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
}
func (x *ListWorkflowTemplatesFieldResponse) Reset() {
*x = ListWorkflowTemplatesFieldResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_workflow_template_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkflowTemplatesFieldResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkflowTemplatesFieldResponse) ProtoMessage() {}
func (x *ListWorkflowTemplatesFieldResponse) ProtoReflect() protoreflect.Message {
mi := &file_workflow_template_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkflowTemplatesFieldResponse.ProtoReflect.Descriptor instead.
func (*ListWorkflowTemplatesFieldResponse) Descriptor() ([]byte, []int) {
return file_workflow_template_proto_rawDescGZIP(), []int{16}
}
func (x *ListWorkflowTemplatesFieldResponse) GetValues() []string {
if x != nil {
return x.Values
}
return nil
}
var File_workflow_template_proto protoreflect.FileDescriptor
var file_workflow_template_proto_rawDesc = []byte{
@@ -1194,105 +1304,128 @@ var file_workflow_template_proto_rawDesc = []byte{
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xec, 0x0b, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0xae, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x24,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x55, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x4f, 0x22, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x22, 0x3c, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x32, 0xa3, 0x0d, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xae, 0x01, 0x0a,
0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x55, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x22, 0x3b,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69,
0x64, 0x7d, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x10, 0x77, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x9b, 0x01,
0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2c, 0x2f, 0x61, 0x70,
0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f,
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x1d,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40,
0x22, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60,
0x22, 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10,
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x12, 0xc2, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d,
0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xd3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69,
0x64, 0x7d, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65,
0x2e, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x12, 0xd3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x22, 0x83, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x47, 0x12,
0x45, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c,
0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x73, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f,
0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x95, 0x01, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x8e, 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12,
0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01,
0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c,
0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x22, 0x95, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x8e, 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70,
0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f,
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f,
0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69,
0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f,
0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72,
0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c,
0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68,
0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63,
0x68, 0x69, 0x76, 0x65, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f,
0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x3c, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12,
0xb4, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x26,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f,
0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1307,7 +1440,7 @@ func file_workflow_template_proto_rawDescGZIP() []byte {
return file_workflow_template_proto_rawDescData
}
var file_workflow_template_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_workflow_template_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_workflow_template_proto_goTypes = []interface{}{
(*GenerateWorkflowTemplateRequest)(nil), // 0: api.GenerateWorkflowTemplateRequest
(*CreateWorkflowTemplateRequest)(nil), // 1: api.CreateWorkflowTemplateRequest
@@ -1324,8 +1457,10 @@ var file_workflow_template_proto_goTypes = []interface{}{
(*CronWorkflowStatisticsReport)(nil), // 12: api.CronWorkflowStatisticsReport
(*WorkflowTemplate)(nil), // 13: api.WorkflowTemplate
(*GetWorkflowTemplateLabelsRequest)(nil), // 14: api.GetWorkflowTemplateLabelsRequest
(*KeyValue)(nil), // 15: api.KeyValue
(*Parameter)(nil), // 16: api.Parameter
(*ListWorkflowTemplatesFieldRequest)(nil), // 15: api.ListWorkflowTemplatesFieldRequest
(*ListWorkflowTemplatesFieldResponse)(nil), // 16: api.ListWorkflowTemplatesFieldResponse
(*KeyValue)(nil), // 17: api.KeyValue
(*Parameter)(nil), // 18: api.Parameter
}
var file_workflow_template_proto_depIdxs = []int32{
13, // 0: api.GenerateWorkflowTemplateRequest.workflowTemplate:type_name -> api.WorkflowTemplate
@@ -1334,10 +1469,10 @@ var file_workflow_template_proto_depIdxs = []int32{
13, // 3: api.ListWorkflowTemplateVersionsResponse.workflowTemplates:type_name -> api.WorkflowTemplate
13, // 4: api.ListWorkflowTemplatesResponse.workflowTemplates:type_name -> api.WorkflowTemplate
13, // 5: api.ArchiveWorkflowTemplateResponse.workflowTemplate:type_name -> api.WorkflowTemplate
15, // 6: api.WorkflowTemplate.labels:type_name -> api.KeyValue
17, // 6: api.WorkflowTemplate.labels:type_name -> api.KeyValue
11, // 7: api.WorkflowTemplate.stats:type_name -> api.WorkflowExecutionStatisticReport
12, // 8: api.WorkflowTemplate.cronStats:type_name -> api.CronWorkflowStatisticsReport
16, // 9: api.WorkflowTemplate.parameters:type_name -> api.Parameter
18, // 9: api.WorkflowTemplate.parameters:type_name -> api.Parameter
0, // 10: api.WorkflowTemplateService.GenerateWorkflowTemplate:input_type -> api.GenerateWorkflowTemplateRequest
1, // 11: api.WorkflowTemplateService.CreateWorkflowTemplate:input_type -> api.CreateWorkflowTemplateRequest
1, // 12: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:input_type -> api.CreateWorkflowTemplateRequest
@@ -1346,16 +1481,18 @@ var file_workflow_template_proto_depIdxs = []int32{
7, // 15: api.WorkflowTemplateService.ListWorkflowTemplates:input_type -> api.ListWorkflowTemplatesRequest
4, // 16: api.WorkflowTemplateService.CloneWorkflowTemplate:input_type -> api.CloneWorkflowTemplateRequest
9, // 17: api.WorkflowTemplateService.ArchiveWorkflowTemplate:input_type -> api.ArchiveWorkflowTemplateRequest
13, // 18: api.WorkflowTemplateService.GenerateWorkflowTemplate:output_type -> api.WorkflowTemplate
13, // 19: api.WorkflowTemplateService.CreateWorkflowTemplate:output_type -> api.WorkflowTemplate
13, // 20: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:output_type -> api.WorkflowTemplate
13, // 21: api.WorkflowTemplateService.GetWorkflowTemplate:output_type -> api.WorkflowTemplate
6, // 22: api.WorkflowTemplateService.ListWorkflowTemplateVersions:output_type -> api.ListWorkflowTemplateVersionsResponse
8, // 23: api.WorkflowTemplateService.ListWorkflowTemplates:output_type -> api.ListWorkflowTemplatesResponse
13, // 24: api.WorkflowTemplateService.CloneWorkflowTemplate:output_type -> api.WorkflowTemplate
10, // 25: api.WorkflowTemplateService.ArchiveWorkflowTemplate:output_type -> api.ArchiveWorkflowTemplateResponse
18, // [18:26] is the sub-list for method output_type
10, // [10:18] is the sub-list for method input_type
15, // 18: api.WorkflowTemplateService.ListWorkflowTemplatesField:input_type -> api.ListWorkflowTemplatesFieldRequest
13, // 19: api.WorkflowTemplateService.GenerateWorkflowTemplate:output_type -> api.WorkflowTemplate
13, // 20: api.WorkflowTemplateService.CreateWorkflowTemplate:output_type -> api.WorkflowTemplate
13, // 21: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:output_type -> api.WorkflowTemplate
13, // 22: api.WorkflowTemplateService.GetWorkflowTemplate:output_type -> api.WorkflowTemplate
6, // 23: api.WorkflowTemplateService.ListWorkflowTemplateVersions:output_type -> api.ListWorkflowTemplateVersionsResponse
8, // 24: api.WorkflowTemplateService.ListWorkflowTemplates:output_type -> api.ListWorkflowTemplatesResponse
13, // 25: api.WorkflowTemplateService.CloneWorkflowTemplate:output_type -> api.WorkflowTemplate
10, // 26: api.WorkflowTemplateService.ArchiveWorkflowTemplate:output_type -> api.ArchiveWorkflowTemplateResponse
16, // 27: api.WorkflowTemplateService.ListWorkflowTemplatesField:output_type -> api.ListWorkflowTemplatesFieldResponse
19, // [19:28] is the sub-list for method output_type
10, // [10:19] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
@@ -1549,6 +1686,30 @@ func file_workflow_template_proto_init() {
return nil
}
}
file_workflow_template_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWorkflowTemplatesFieldRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workflow_template_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWorkflowTemplatesFieldResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1556,7 +1717,7 @@ func file_workflow_template_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_workflow_template_proto_rawDesc,
NumEnums: 0,
NumMessages: 15,
NumMessages: 17,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -893,6 +893,96 @@ func local_request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx context
}
var (
filter_WorkflowTemplateService_ListWorkflowTemplatesField_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "fieldName": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
func request_WorkflowTemplateService_ListWorkflowTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkflowTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_ListWorkflowTemplatesField_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListWorkflowTemplatesField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkflowTemplateService_ListWorkflowTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkflowTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_ListWorkflowTemplatesField_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListWorkflowTemplatesField(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkflowTemplateServiceHandlerServer registers the http handlers for service WorkflowTemplateService to "mux".
// UnaryRPC :call WorkflowTemplateServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -1129,6 +1219,29 @@ func RegisterWorkflowTemplateServiceHandlerServer(ctx context.Context, mux *runt
})
mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkflowTemplateService_ListWorkflowTemplatesField_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkflowTemplateService_ListWorkflowTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1370,6 +1483,26 @@ func RegisterWorkflowTemplateServiceHandlerClient(ctx context.Context, mux *runt
})
mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkflowTemplateService_ListWorkflowTemplatesField_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkflowTemplateService_ListWorkflowTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1393,6 +1526,8 @@ var (
pattern_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "clone", "name", "version"}, ""))
pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "archive"}, ""))
pattern_WorkflowTemplateService_ListWorkflowTemplatesField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta", "namespace", "field", "workflow_templates", "fieldName"}, ""))
)
var (
@@ -1415,4 +1550,6 @@ var (
forward_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.ForwardResponseMessage
forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.ForwardResponseMessage
forward_WorkflowTemplateService_ListWorkflowTemplatesField_0 = runtime.ForwardResponseMessage
)

View File

@@ -26,6 +26,7 @@ type WorkflowTemplateServiceClient interface {
ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error)
CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error)
ListWorkflowTemplatesField(ctx context.Context, in *ListWorkflowTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesFieldResponse, error)
}
type workflowTemplateServiceClient struct {
@@ -108,6 +109,15 @@ func (c *workflowTemplateServiceClient) ArchiveWorkflowTemplate(ctx context.Cont
return out, nil
}
func (c *workflowTemplateServiceClient) ListWorkflowTemplatesField(ctx context.Context, in *ListWorkflowTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesFieldResponse, error) {
out := new(ListWorkflowTemplatesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplatesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkflowTemplateServiceServer is the server API for WorkflowTemplateService service.
// All implementations must embed UnimplementedWorkflowTemplateServiceServer
// for forward compatibility
@@ -121,6 +131,7 @@ type WorkflowTemplateServiceServer interface {
ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error)
CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error)
ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error)
ListWorkflowTemplatesField(context.Context, *ListWorkflowTemplatesFieldRequest) (*ListWorkflowTemplatesFieldResponse, error)
mustEmbedUnimplementedWorkflowTemplateServiceServer()
}
@@ -152,6 +163,9 @@ func (UnimplementedWorkflowTemplateServiceServer) CloneWorkflowTemplate(context.
func (UnimplementedWorkflowTemplateServiceServer) ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplatesField(context.Context, *ListWorkflowTemplatesFieldRequest) (*ListWorkflowTemplatesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplatesField not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) mustEmbedUnimplementedWorkflowTemplateServiceServer() {
}
@@ -310,6 +324,24 @@ func _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler(srv interface{}, c
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_ListWorkflowTemplatesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowTemplatesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplatesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplatesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplatesField(ctx, req.(*ListWorkflowTemplatesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkflowTemplateService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkflowTemplateService",
HandlerType: (*WorkflowTemplateServiceServer)(nil),
@@ -346,6 +378,10 @@ var _WorkflowTemplateService_serviceDesc = grpc.ServiceDesc{
MethodName: "ArchiveWorkflowTemplate",
Handler: _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler,
},
{
MethodName: "ListWorkflowTemplatesField",
Handler: _WorkflowTemplateService_ListWorkflowTemplatesField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workflow_template.proto",

File diff suppressed because it is too large Load Diff

View File

@@ -545,6 +545,14 @@ func request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marshaler r
var protoReq ResumeWorkspaceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
@@ -581,6 +589,14 @@ func local_request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marsh
var protoReq ResumeWorkspaceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
@@ -757,6 +773,143 @@ func local_request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Conte
}
var (
filter_WorkspaceService_GetWorkspaceContainerLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1, "containerName": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
)
func request_WorkspaceService_GetWorkspaceContainerLogs_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (WorkspaceService_GetWorkspaceContainerLogsClient, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceContainerLogsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
val, ok = pathParams["containerName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "containerName")
}
protoReq.ContainerName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "containerName", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceService_GetWorkspaceContainerLogs_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
stream, err := client.GetWorkspaceContainerLogs(ctx, &protoReq)
if err != nil {
return nil, metadata, err
}
header, err := stream.Header()
if err != nil {
return nil, metadata, err
}
metadata.HeaderMD = header
return stream, metadata, nil
}
func request_WorkspaceService_ListWorkspacesField_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspacesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := client.ListWorkspacesField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_ListWorkspacesField_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspacesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := server.ListWorkspacesField(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkspaceServiceHandlerServer registers the http handlers for service WorkspaceService to "mux".
// UnaryRPC :call WorkspaceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -993,6 +1146,36 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceContainerLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
})
mux.Handle("GET", pattern_WorkspaceService_ListWorkspacesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/ListWorkspacesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_ListWorkspacesField_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_ListWorkspacesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1234,6 +1417,46 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceContainerLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/GetWorkspaceContainerLogs")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_GetWorkspaceContainerLogs_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_GetWorkspaceContainerLogs_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceService_ListWorkspacesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/ListWorkspacesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_ListWorkspacesField_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_ListWorkspacesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -1257,6 +1480,10 @@ var (
pattern_WorkspaceService_DeleteWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, ""))
pattern_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "retry"}, ""))
pattern_WorkspaceService_GetWorkspaceContainerLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "containers", "containerName", "logs"}, ""))
pattern_WorkspaceService_ListWorkspacesField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta", "namespace", "field", "workspaces", "fieldName"}, ""))
)
var (
@@ -1279,4 +1506,8 @@ var (
forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_GetWorkspaceContainerLogs_0 = runtime.ForwardResponseStream
forward_WorkspaceService_ListWorkspacesField_0 = runtime.ForwardResponseMessage
)

View File

@@ -28,6 +28,8 @@ type WorkspaceServiceClient interface {
ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetWorkspaceContainerLogs(ctx context.Context, in *GetWorkspaceContainerLogsRequest, opts ...grpc.CallOption) (WorkspaceService_GetWorkspaceContainerLogsClient, error)
ListWorkspacesField(ctx context.Context, in *ListWorkspacesFieldRequest, opts ...grpc.CallOption) (*ListWorkspacesFieldResponse, error)
}
type workspaceServiceClient struct {
@@ -128,6 +130,47 @@ func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, i
return out, nil
}
func (c *workspaceServiceClient) GetWorkspaceContainerLogs(ctx context.Context, in *GetWorkspaceContainerLogsRequest, opts ...grpc.CallOption) (WorkspaceService_GetWorkspaceContainerLogsClient, error) {
stream, err := c.cc.NewStream(ctx, &_WorkspaceService_serviceDesc.Streams[0], "/api.WorkspaceService/GetWorkspaceContainerLogs", opts...)
if err != nil {
return nil, err
}
x := &workspaceServiceGetWorkspaceContainerLogsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type WorkspaceService_GetWorkspaceContainerLogsClient interface {
Recv() (*LogStreamResponse, error)
grpc.ClientStream
}
type workspaceServiceGetWorkspaceContainerLogsClient struct {
grpc.ClientStream
}
func (x *workspaceServiceGetWorkspaceContainerLogsClient) Recv() (*LogStreamResponse, error) {
m := new(LogStreamResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *workspaceServiceClient) ListWorkspacesField(ctx context.Context, in *ListWorkspacesFieldRequest, opts ...grpc.CallOption) (*ListWorkspacesFieldResponse, error) {
out := new(ListWorkspacesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/ListWorkspacesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceServiceServer is the server API for WorkspaceService service.
// All implementations must embed UnimplementedWorkspaceServiceServer
// for forward compatibility
@@ -142,6 +185,8 @@ type WorkspaceServiceServer interface {
ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*emptypb.Empty, error)
DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error)
RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error)
GetWorkspaceContainerLogs(*GetWorkspaceContainerLogsRequest, WorkspaceService_GetWorkspaceContainerLogsServer) error
ListWorkspacesField(context.Context, *ListWorkspacesFieldRequest) (*ListWorkspacesFieldResponse, error)
mustEmbedUnimplementedWorkspaceServiceServer()
}
@@ -179,6 +224,12 @@ func (UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *Del
func (UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented")
}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceContainerLogs(*GetWorkspaceContainerLogsRequest, WorkspaceService_GetWorkspaceContainerLogsServer) error {
return status.Errorf(codes.Unimplemented, "method GetWorkspaceContainerLogs not implemented")
}
func (UnimplementedWorkspaceServiceServer) ListWorkspacesField(context.Context, *ListWorkspacesFieldRequest) (*ListWorkspacesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspacesField not implemented")
}
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -372,6 +423,45 @@ func _WorkspaceService_RetryLastWorkspaceAction_Handler(srv interface{}, ctx con
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspaceContainerLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetWorkspaceContainerLogsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(WorkspaceServiceServer).GetWorkspaceContainerLogs(m, &workspaceServiceGetWorkspaceContainerLogsServer{stream})
}
type WorkspaceService_GetWorkspaceContainerLogsServer interface {
Send(*LogStreamResponse) error
grpc.ServerStream
}
type workspaceServiceGetWorkspaceContainerLogsServer struct {
grpc.ServerStream
}
func (x *workspaceServiceGetWorkspaceContainerLogsServer) Send(m *LogStreamResponse) error {
return x.ServerStream.SendMsg(m)
}
func _WorkspaceService_ListWorkspacesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspacesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).ListWorkspacesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/ListWorkspacesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).ListWorkspacesField(ctx, req.(*ListWorkspacesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkspaceService",
HandlerType: (*WorkspaceServiceServer)(nil),
@@ -416,7 +506,17 @@ var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
MethodName: "RetryLastWorkspaceAction",
Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler,
},
{
MethodName: "ListWorkspacesField",
Handler: _WorkspaceService_ListWorkspacesField_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "GetWorkspaceContainerLogs",
Handler: _WorkspaceService_GetWorkspaceContainerLogs_Handler,
ServerStreams: true,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workspace.proto",
}

View File

@@ -720,6 +720,108 @@ func (x *ListWorkspaceTemplateVersionsResponse) GetWorkspaceTemplates() []*Works
return nil
}
type ListWorkspaceTemplatesFieldRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
FieldName string `protobuf:"bytes,2,opt,name=fieldName,proto3" json:"fieldName,omitempty"`
}
func (x *ListWorkspaceTemplatesFieldRequest) Reset() {
*x = ListWorkspaceTemplatesFieldRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_template_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkspaceTemplatesFieldRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkspaceTemplatesFieldRequest) ProtoMessage() {}
func (x *ListWorkspaceTemplatesFieldRequest) ProtoReflect() protoreflect.Message {
mi := &file_workspace_template_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkspaceTemplatesFieldRequest.ProtoReflect.Descriptor instead.
func (*ListWorkspaceTemplatesFieldRequest) Descriptor() ([]byte, []int) {
return file_workspace_template_proto_rawDescGZIP(), []int{10}
}
func (x *ListWorkspaceTemplatesFieldRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListWorkspaceTemplatesFieldRequest) GetFieldName() string {
if x != nil {
return x.FieldName
}
return ""
}
type ListWorkspaceTemplatesFieldResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
}
func (x *ListWorkspaceTemplatesFieldResponse) Reset() {
*x = ListWorkspaceTemplatesFieldResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_template_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkspaceTemplatesFieldResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkspaceTemplatesFieldResponse) ProtoMessage() {}
func (x *ListWorkspaceTemplatesFieldResponse) ProtoReflect() protoreflect.Message {
mi := &file_workspace_template_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkspaceTemplatesFieldResponse.ProtoReflect.Descriptor instead.
func (*ListWorkspaceTemplatesFieldResponse) Descriptor() ([]byte, []int) {
return file_workspace_template_proto_rawDescGZIP(), []int{11}
}
func (x *ListWorkspaceTemplatesFieldResponse) GetValues() []string {
if x != nil {
return x.Values
}
return nil
}
var File_workspace_template_proto protoreflect.FileDescriptor
var file_workspace_template_proto_rawDesc = []byte{
@@ -828,87 +930,109 @@ var file_workspace_template_proto_rawDesc = []byte{
0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x32, 0xce, 0x09,
0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x45,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x17,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 0x2f, 0x61,
0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
0x7d, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22,
0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63,
0x68, 0x69, 0x76, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12,
0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a,
0x22, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22,
0x3d, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x32, 0x89,
0x0b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29,
0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22,
0x45, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b,
0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12,
0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12,
0xbc, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e,
0x12, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x75, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a,
0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 0x2f,
0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69,
0x64, 0x7d, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72,
0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35,
0x12, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f,
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x24,
0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65,
0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x2f, 0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x12, 0xbc, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x3e, 0x12, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0xb8, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -923,7 +1047,7 @@ func file_workspace_template_proto_rawDescGZIP() []byte {
return file_workspace_template_proto_rawDescData
}
var file_workspace_template_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_workspace_template_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_workspace_template_proto_goTypes = []interface{}{
(*WorkspaceTemplate)(nil), // 0: api.WorkspaceTemplate
(*GenerateWorkspaceTemplateWorkflowTemplateRequest)(nil), // 1: api.GenerateWorkspaceTemplateWorkflowTemplateRequest
@@ -935,12 +1059,14 @@ var file_workspace_template_proto_goTypes = []interface{}{
(*ListWorkspaceTemplatesResponse)(nil), // 7: api.ListWorkspaceTemplatesResponse
(*ListWorkspaceTemplateVersionsRequest)(nil), // 8: api.ListWorkspaceTemplateVersionsRequest
(*ListWorkspaceTemplateVersionsResponse)(nil), // 9: api.ListWorkspaceTemplateVersionsResponse
(*WorkflowTemplate)(nil), // 10: api.WorkflowTemplate
(*KeyValue)(nil), // 11: api.KeyValue
(*ListWorkspaceTemplatesFieldRequest)(nil), // 10: api.ListWorkspaceTemplatesFieldRequest
(*ListWorkspaceTemplatesFieldResponse)(nil), // 11: api.ListWorkspaceTemplatesFieldResponse
(*WorkflowTemplate)(nil), // 12: api.WorkflowTemplate
(*KeyValue)(nil), // 13: api.KeyValue
}
var file_workspace_template_proto_depIdxs = []int32{
10, // 0: api.WorkspaceTemplate.workflowTemplate:type_name -> api.WorkflowTemplate
11, // 1: api.WorkspaceTemplate.labels:type_name -> api.KeyValue
12, // 0: api.WorkspaceTemplate.workflowTemplate:type_name -> api.WorkflowTemplate
13, // 1: api.WorkspaceTemplate.labels:type_name -> api.KeyValue
0, // 2: api.GenerateWorkspaceTemplateWorkflowTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate
0, // 3: api.CreateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate
0, // 4: api.UpdateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate
@@ -953,15 +1079,17 @@ var file_workspace_template_proto_depIdxs = []int32{
4, // 11: api.WorkspaceTemplateService.GetWorkspaceTemplate:input_type -> api.GetWorkspaceTemplateRequest
6, // 12: api.WorkspaceTemplateService.ListWorkspaceTemplates:input_type -> api.ListWorkspaceTemplatesRequest
8, // 13: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:input_type -> api.ListWorkspaceTemplateVersionsRequest
10, // 14: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:output_type -> api.WorkflowTemplate
0, // 15: api.WorkspaceTemplateService.CreateWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 16: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 17: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 18: api.WorkspaceTemplateService.GetWorkspaceTemplate:output_type -> api.WorkspaceTemplate
7, // 19: api.WorkspaceTemplateService.ListWorkspaceTemplates:output_type -> api.ListWorkspaceTemplatesResponse
9, // 20: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:output_type -> api.ListWorkspaceTemplateVersionsResponse
14, // [14:21] is the sub-list for method output_type
7, // [7:14] is the sub-list for method input_type
10, // 14: api.WorkspaceTemplateService.ListWorkspaceTemplatesField:input_type -> api.ListWorkspaceTemplatesFieldRequest
12, // 15: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:output_type -> api.WorkflowTemplate
0, // 16: api.WorkspaceTemplateService.CreateWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 17: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 18: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:output_type -> api.WorkspaceTemplate
0, // 19: api.WorkspaceTemplateService.GetWorkspaceTemplate:output_type -> api.WorkspaceTemplate
7, // 20: api.WorkspaceTemplateService.ListWorkspaceTemplates:output_type -> api.ListWorkspaceTemplatesResponse
9, // 21: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:output_type -> api.ListWorkspaceTemplateVersionsResponse
11, // 22: api.WorkspaceTemplateService.ListWorkspaceTemplatesField:output_type -> api.ListWorkspaceTemplatesFieldResponse
15, // [15:23] is the sub-list for method output_type
7, // [7:15] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
@@ -1095,6 +1223,30 @@ func file_workspace_template_proto_init() {
return nil
}
}
file_workspace_template_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWorkspaceTemplatesFieldRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workspace_template_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWorkspaceTemplatesFieldResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1102,7 +1254,7 @@ func file_workspace_template_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_workspace_template_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -579,6 +579,78 @@ func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx
}
func request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := client.ListWorkspaceTemplatesField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := server.ListWorkspaceTemplatesField(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkspaceTemplateServiceHandlerServer registers the http handlers for service WorkspaceTemplateService to "mux".
// UnaryRPC :call WorkspaceTemplateServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -746,6 +818,29 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
})
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -927,6 +1022,26 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
})
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -944,6 +1059,8 @@ var (
pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "versions"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta", "namespace", "field", "workspace_templates", "fieldName"}, ""))
)
var (
@@ -960,4 +1077,6 @@ var (
forward_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0 = runtime.ForwardResponseMessage
)

View File

@@ -29,6 +29,7 @@ type WorkspaceTemplateServiceClient interface {
GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error)
ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error)
ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error)
ListWorkspaceTemplatesField(ctx context.Context, in *ListWorkspaceTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesFieldResponse, error)
}
type workspaceTemplateServiceClient struct {
@@ -102,6 +103,15 @@ func (c *workspaceTemplateServiceClient) ListWorkspaceTemplateVersions(ctx conte
return out, nil
}
func (c *workspaceTemplateServiceClient) ListWorkspaceTemplatesField(ctx context.Context, in *ListWorkspaceTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesFieldResponse, error) {
out := new(ListWorkspaceTemplatesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceTemplateServiceServer is the server API for WorkspaceTemplateService service.
// All implementations must embed UnimplementedWorkspaceTemplateServiceServer
// for forward compatibility
@@ -118,6 +128,7 @@ type WorkspaceTemplateServiceServer interface {
GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error)
ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error)
ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error)
ListWorkspaceTemplatesField(context.Context, *ListWorkspaceTemplatesFieldRequest) (*ListWorkspaceTemplatesFieldResponse, error)
mustEmbedUnimplementedWorkspaceTemplateServiceServer()
}
@@ -146,6 +157,9 @@ func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplates(contex
func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplateVersions not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplatesField(context.Context, *ListWorkspaceTemplatesFieldRequest) (*ListWorkspaceTemplatesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplatesField not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) mustEmbedUnimplementedWorkspaceTemplateServiceServer() {
}
@@ -286,6 +300,24 @@ func _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler(srv interfa
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_ListWorkspaceTemplatesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspaceTemplatesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplatesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplatesField(ctx, req.(*ListWorkspaceTemplatesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkspaceTemplateService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkspaceTemplateService",
HandlerType: (*WorkspaceTemplateServiceServer)(nil),
@@ -318,6 +350,10 @@ var _WorkspaceTemplateService_serviceDesc = grpc.ServiceDesc{
MethodName: "ListWorkspaceTemplateVersions",
Handler: _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler,
},
{
MethodName: "ListWorkspaceTemplatesField",
Handler: _WorkspaceTemplateService_ListWorkspaceTemplatesField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workspace_template.proto",

View File

@@ -18,4 +18,18 @@ message Parameter {
message ParameterOption {
string name = 1;
string value = 2;
}
message LogStreamResponse {
repeated LogEntry logEntries = 1;
}
message LogEntry {
string timestamp = 1;
string content = 2;
}
message MachineType {
string name = 1;
string value = 2;
}

View File

@@ -12,6 +12,20 @@ service ConfigService {
get: "/apis/v1beta1/config"
};
}
rpc GetNamespaceConfig (GetNamespaceConfigRequest) returns (GetNamespaceConfigResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/config"
};
}
}
message GetNamespaceConfigRequest {
string namespace = 1;
}
message GetNamespaceConfigResponse {
string bucket = 1;
}
message GetConfigResponse {

View File

@@ -50,7 +50,7 @@ service WorkflowService {
};
}
rpc GetWorkflowExecutionLogs (GetWorkflowExecutionLogsRequest) returns (stream LogEntry) {
rpc GetWorkflowExecutionLogs (GetWorkflowExecutionLogsRequest) returns (stream LogStreamResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/pods/{podName}/containers/{containerName}/logs"
};
@@ -120,6 +120,12 @@ service WorkflowService {
body: "*"
};
}
rpc ListWorkflowExecutionsField (ListWorkflowExecutionsFieldRequest) returns (ListWorkflowExecutionsFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workflow_executions/{fieldName}"
};
}
}
message CreateWorkflowExecutionBody {
@@ -205,11 +211,6 @@ message ListWorkflowExecutionsResponse {
int32 totalAvailableCount = 6;
}
message LogEntry {
string timestamp = 1;
string content = 2;
}
message WorkflowExecutionMetadata {
string url = 1;
}
@@ -315,4 +316,13 @@ message UpdateWorkflowExecutionsMetricsRequest {
message WorkflowExecutionsMetricsResponse {
repeated Metric metrics = 4;
}
message ListWorkflowExecutionsFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkflowExecutionsFieldResponse {
repeated string values = 1;
}

View File

@@ -65,6 +65,12 @@ service WorkflowTemplateService {
put: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/archive"
};
}
rpc ListWorkflowTemplatesField (ListWorkflowTemplatesFieldRequest) returns (ListWorkflowTemplatesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workflow_templates/{fieldName}"
};
}
}
message GenerateWorkflowTemplateRequest {
@@ -166,4 +172,14 @@ message GetWorkflowTemplateLabelsRequest {
string namespace = 1;
string name = 2;
int64 version = 3;
}
message ListWorkflowTemplatesFieldRequest {
string namespace = 1;
string fieldName = 2;
bool isSystem = 3;
}
message ListWorkflowTemplatesFieldResponse {
repeated string values = 1;
}

View File

@@ -59,6 +59,7 @@ service WorkspaceService {
rpc ResumeWorkspace (ResumeWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/resume"
body: "body"
};
}
@@ -73,6 +74,23 @@ service WorkspaceService {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/retry"
};
}
rpc GetWorkspaceContainerLogs (GetWorkspaceContainerLogsRequest) returns (stream LogStreamResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces/{uid}/containers/{containerName}/logs"
};
}
rpc ListWorkspacesField (ListWorkspacesFieldRequest) returns (ListWorkspacesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workspaces/{fieldName}"
};
}
}
message WorkspaceComponent {
string name = 1;
string url = 2;
}
message Workspace {
@@ -86,6 +104,8 @@ message Workspace {
repeated KeyValue labels = 8;
string url = 9;
repeated Parameter templateParameters = 10;
repeated WorkspaceComponent workspaceComponents = 11;
MachineType machineType = 12;
}
message WorkspaceStatus {
@@ -157,6 +177,7 @@ message PauseWorkspaceRequest {
message ResumeWorkspaceRequest {
string namespace = 1;
string uid = 2;
UpdateWorkspaceBody body = 3;
}
message DeleteWorkspaceRequest {
@@ -193,4 +214,20 @@ message GetWorkspaceStatisticsForNamespaceRequest {
message GetWorkspaceStatisticsForNamespaceResponse {
WorkspaceStatisticReport stats = 1;
}
message GetWorkspaceContainerLogsRequest {
string namespace = 1;
string uid = 2;
string containerName = 3;
int64 sinceTime = 4;
}
message ListWorkspacesFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkspacesFieldResponse {
repeated string values = 1;
}

View File

@@ -57,6 +57,12 @@ service WorkspaceTemplateService {
get: "/apis/v1beta1/{namespace}/workspace_templates/{uid}/versions"
};
}
rpc ListWorkspaceTemplatesField (ListWorkspaceTemplatesFieldRequest) returns (ListWorkspaceTemplatesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workspace_templates/{fieldName}"
};
}
}
message WorkspaceTemplate {
@@ -127,4 +133,11 @@ message ListWorkspaceTemplateVersionsResponse {
repeated WorkspaceTemplate workspaceTemplates = 2;
}
message ListWorkspaceTemplatesFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkspaceTemplatesFieldResponse {
repeated string values = 1;
}

View File

@@ -86,7 +86,7 @@ templates:
optional: true
`
const pytorchMnistWorkflowTemplateName = "PyTorch Training"
const pytorchWorkflowTemplateName = "PyTorch Training"
func initialize20200605090509() {
if _, ok := initializedMigrations[20200605090509]; !ok {
@@ -120,7 +120,7 @@ func Up20200605090509(tx *sql.Tx) error {
}
workflowTemplate := &v1.WorkflowTemplate{
Name: pytorchMnistWorkflowTemplateName,
Name: pytorchWorkflowTemplateName,
Manifest: pytorchMnistWorkflowTemplate,
}
@@ -150,7 +150,7 @@ func Down20200605090509(tx *sql.Tx) error {
return err
}
uid, err := uid2.GenerateUID(pytorchMnistWorkflowTemplateName, 30)
uid, err := uid2.GenerateUID(pytorchWorkflowTemplateName, 30)
if err != nil {
return err
}

View File

@@ -25,6 +25,6 @@ func Up20201115133046(tx *sql.Tx) error {
func Down20201115133046(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20201113094916"),
filepath.Join("workspaces", "cvat", "20201113094916.yaml"),
cvatTemplateName)
}

View File

@@ -17,7 +17,7 @@ func initialize20201221194344() {
func Up20201221194344(tx *sql.Tx) error {
return updateWorkflowTemplateManifest(
filepath.Join("workflows", "pytorch-mnist-training", "20201221194344.yaml"),
pytorchMnistWorkflowTemplateName,
pytorchWorkflowTemplateName,
map[string]string{
"created-by": "system",
},
@@ -29,7 +29,7 @@ func Down20201221194344(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkflowTemplateManifest(
filepath.Join("workflows", "pytorch-mnist-training", "20200605090509.yaml"),
pytorchMnistWorkflowTemplateName,
pytorchWorkflowTemplateName,
map[string]string{
"created-by": "system",
},

View File

@@ -21,7 +21,6 @@ func Up20201223062947(tx *sql.Tx) error {
tensorflowWorkflowTemplateName,
map[string]string{
"created-by": "system",
"used-by": "cvat",
},
)
}

View File

@@ -0,0 +1,30 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210107094725() {
if _, ok := initializedMigrations[20210107094725]; !ok {
goose.AddMigration(Up20210107094725, Down20210107094725)
initializedMigrations[20210107094725] = true
}
}
//Up20210107094725 updates CVAT to latest image
func Up20210107094725(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210107094725.yaml"),
cvatTemplateName)
}
//Down20210107094725 reverts to previous CVAT image
func Down20210107094725(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20201211161117.yaml"),
cvatTemplateName)
}

View File

@@ -0,0 +1,129 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210118175809() {
if _, ok := initializedMigrations[20210118175809]; !ok {
goose.AddMigration(Up20210118175809, Down20210118175809)
initializedMigrations[20210118175809] = true
}
}
// Up20210118175809 updates workflows so that the nodePoolSelector label is based on k8s config
func Up20210118175809(tx *sql.Tx) error {
// This code is executed when the migration is applied.
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "hyperparameter-tuning", "20210118175809.yaml"),
hyperparameterTuningTemplateName,
map[string]string{
"framework": "tensorflow",
"tuner": "TPE",
"created-by": "system",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "maskrcnn-training", "20210118175809.yaml"),
maskRCNNWorkflowTemplateName,
map[string]string{
"created-by": "system",
"used-by": "cvat",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "pytorch-mnist-training", "20210118175809.yaml"),
pytorchWorkflowTemplateName,
map[string]string{
"created-by": "system",
"framework": "pytorch",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "tensorflow-mnist-training", "20210118175809.yaml"),
tensorflowWorkflowTemplateName,
map[string]string{
"created-by": "system",
"framework": "tensorflow",
},
); err != nil {
return err
}
return updateWorkflowTemplateManifest(
filepath.Join("workflows", "tf-object-detection-training", "20210118175809.yaml"),
tensorflowObjectDetectionWorkflowTemplateName,
map[string]string{
"created-by": "system",
"used-by": "cvat",
},
)
}
// Down20210118175809 reverts the migration
func Down20210118175809(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "tf-object-detection-training", "20201223202929.yaml"),
tensorflowObjectDetectionWorkflowTemplateName,
map[string]string{
"created-by": "system",
"used-by": "cvat",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "tensorflow-mnist-training", "20201223062947.yaml"),
tensorflowWorkflowTemplateName,
map[string]string{
"created-by": "system",
"framework": "tensorflow",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "pytorch-mnist-training", "20201221194344.yaml"),
pytorchWorkflowTemplateName,
map[string]string{
"created-by": "system",
},
); err != nil {
return err
}
if err := updateWorkflowTemplateManifest(
filepath.Join("workflows", "maskrcnn-training", "20201221195937.yaml"),
maskRCNNWorkflowTemplateName,
map[string]string{
"created-by": "system",
"used-by": "cvat",
},
); err != nil {
return err
}
return updateWorkflowTemplateManifest(
filepath.Join("workflows", "hyperparameter-tuning", "20201225172926.yaml"),
hyperparameterTuningTemplateName,
map[string]string{
"framework": "tensorflow",
"tuner": "TPE",
"created-by": "system",
},
)
}

View File

@@ -0,0 +1,30 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210129134326() {
if _, ok := initializedMigrations[20210129134326]; !ok {
goose.AddMigration(Up20210129134326, Down20210129134326)
initializedMigrations[20210129134326] = true
}
}
//Up20210129134326 updates CVAT to latest image
func Up20210129134326(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210129134326.yaml"),
cvatTemplateName)
}
//Down20210129134326 reverts to previous CVAT image
func Down20210129134326(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210107094725.yaml"),
cvatTemplateName)
}

View File

@@ -0,0 +1,30 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210129142057() {
if _, ok := initializedMigrations[20210129142057]; !ok {
goose.AddMigration(Up20210129142057, Down20210129142057)
initializedMigrations[20210129142057] = true
}
}
// Up20210129142057 updates the jupyterlab workspace template
func Up20210129142057(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20210129142057.yaml"),
jupyterLabTemplateName)
}
// Down20210129142057 rolls back the jupyterab workspace template update
func Down20210129142057(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20201229205644.yaml"),
jupyterLabTemplateName)
}

View File

@@ -0,0 +1,33 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210129152427() {
if _, ok := initializedMigrations[20210129152427]; !ok {
goose.AddMigration(Up20210129152427, Down20210129152427)
initializedMigrations[20210129152427] = true
}
}
// Up20210129152427 migration will add lifecycle hooks to VSCode template.
// These hooks will attempt to export the conda, pip, and vscode packages that are installed,
// to a text file.
// On workspace resume / start, the code then tries to install these packages.
func Up20210129152427(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "vscode", "20210129152427.yaml"),
vscodeWorkspaceTemplateName)
}
// Down20210129152427 removes the lifecycle hooks from VSCode workspace template.
func Down20210129152427(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "vscode", "20201028145443.yaml"),
vscodeWorkspaceTemplateName)
}

View File

@@ -0,0 +1,54 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210224180017() {
if _, ok := initializedMigrations[20210224180017]; !ok {
goose.AddMigration(Up20210224180017, Down20210224180017)
initializedMigrations[20210224180017] = true
}
}
// Up20210224180017 Updates workspace templates with the latest filesyncer image
func Up20210224180017(tx *sql.Tx) error {
// This code is executed when the migration is applied.
if err := updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210224180017.yaml"),
cvatTemplateName); err != nil {
return err
}
if err := updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20210224180017.yaml"),
jupyterLabTemplateName); err != nil {
return err
}
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "vscode", "20210224180017.yaml"),
vscodeWorkspaceTemplateName)
}
// Down20210224180017 Rolls back the filesyncer image updates
func Down20210224180017(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
if err := updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "vscode", "20210224180017.yaml"),
vscodeWorkspaceTemplateName); err != nil {
return err
}
if err := updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20210224180017.yaml"),
jupyterLabTemplateName); err != nil {
return err
}
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210224180017.yaml"),
cvatTemplateName)
}

View File

@@ -85,6 +85,12 @@ func Initialize() {
initialize20201223202929()
initialize20201225172926()
initialize20201229205644()
initialize20210107094725()
initialize20210118175809()
initialize20210129134326()
initialize20210129142057()
initialize20210129152427()
initialize20210224180017()
if err := client.DB.Close(); err != nil {
log.Printf("[error] closing db %v", err)
@@ -191,6 +197,7 @@ func ReplaceRuntimeVariablesInManifest(client *v1.Client, namespace string, mani
replaceMap := map[string]string{
"{{.ArtifactRepositoryType}}": artifactRepositoryType,
"{{.NodePoolLabel}}": *sysConfig.NodePoolLabel(),
"{{.DefaultNodePoolOption}}": nodePoolOptions[0].Value,
}

View File

@@ -100,8 +100,6 @@ templates:
- name: output
path: /mnt/output
optional: true
archive:
none: {}
container:
image: onepanel/dl:0.17.0
args:

View File

@@ -0,0 +1,194 @@
# source: https://github.com/onepanelio/templates/blob/master/workflows/nni-hyperparameter-tuning/mnist/
# Workflow Template example for hyperparameter tuning
# Documentation: https://docs.onepanel.ai/docs/reference/workflows/hyperparameter-tuning
#
# Only change the fields marked with [CHANGE]
entrypoint: main
arguments:
parameters:
# [CHANGE] Path to your training/model architecture code repository
# Change this value and revision value to your code repository and branch respectively
- name: source
value: https://github.com/onepanelio/templates
# [CHANGE] Revision is the branch or tag that you want to use
# You can change this to any tag or branch name in your repository
- name: revision
value: v0.18.0
# [CHANGE] Default configuration for the NNI tuner
# See https://docs.onepanel.ai/docs/reference/workflows/hyperparameter-tuning#understanding-the-configurations
- name: config
displayName: Configuration
required: true
hint: NNI configuration
type: textarea.textarea
value: |-
authorName: Onepanel, Inc.
experimentName: MNIST TF v2.x
trialConcurrency: 1
maxExecDuration: 1h
maxTrialNum: 10
trainingServicePlatform: local
searchSpacePath: search_space.json
useAnnotation: false
tuner:
# gpuIndices: '0' # uncomment and update to the GPU indices to assign this tuner
builtinTunerName: TPE # choices: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTuner
classArgs:
optimize_mode: maximize # choices: maximize, minimize
trial:
command: python main.py --output /mnt/output
codeDir: .
# gpuNum: 1 # uncomment and update to number of GPUs
# [CHANGE] Search space configuration
# Change according to your hyperparameters and ranges
- name: search-space
displayName: Search space configuration
required: true
type: textarea.textarea
value: |-
{
"dropout_rate": { "_type": "uniform", "_value": [0.5, 0.9] },
"conv_size": { "_type": "choice", "_value": [2, 3, 5, 7] },
"hidden_size": { "_type": "choice", "_value": [124, 512, 1024] },
"batch_size": { "_type": "choice", "_value": [16, 32] },
"learning_rate": { "_type": "choice", "_value": [0.0001, 0.001, 0.01, 0.1] },
"epochs": { "_type": "choice", "_value": [10] }
}
# Node pool dropdown (Node group in EKS)
# You can add more of these if you have additional tasks that can run on different node pools
- displayName: Node pool
hint: Name of node pool or group to run this workflow task
type: select.nodepool
name: sys-node-pool
value: {{.DefaultNodePoolOption}}
required: true
templates:
- name: main
dag:
tasks:
- name: hyperparameter-tuning
template: hyperparameter-tuning
- name: metrics-writer
template: metrics-writer
dependencies: [hyperparameter-tuning]
arguments:
# Use sys-metrics artifact output from hyperparameter-tuning Task
# This writes the best metrics to the Workflow
artifacts:
- name: sys-metrics
from: "{{tasks.hyperparameter-tuning.outputs.artifacts.sys-metrics}}"
- name: hyperparameter-tuning
inputs:
artifacts:
- name: src
# Clone the above repository into '/mnt/data/src'
# See https://docs.onepanel.ai/docs/reference/workflows/artifacts#git for private repositories
git:
repo: '{{workflow.parameters.source}}'
revision: '{{workflow.parameters.revision}}'
path: /mnt/data/src
# [CHANGE] Path where config.yaml will be generated or already exists
# Update the path below so that config.yaml is written to the same directory as your main.py file
# Note that your source code is cloned to /mnt/data/src
- name: config
path: /mnt/data/src/workflows/hyperparameter-tuning/mnist/config.yaml
raw:
data: '{{workflow.parameters.config}}'
# [CHANGE] Path where search_space.json will be generated or already exists
# Update the path below so that search_space.json is written to the same directory as your main.py file
# Note that your source code is cloned to /mnt/data/src
- name: search-space
path: /mnt/data/src/workflows/hyperparameter-tuning/mnist/search_space.json
raw:
data: '{{workflow.parameters.search-space}}'
outputs:
artifacts:
- name: output
path: /mnt/output
optional: true
container:
image: onepanel/dl:0.17.0
command:
- sh
- -c
args:
# [CHANGE] Update the config path below to point to config.yaml path as described above
# Note that you can `pip install` additional tools here if necessary
- |
python -u /opt/onepanel/nni/start.py \
--config /mnt/data/src/workflows/hyperparameter-tuning/mnist/config.yaml
workingDir: /mnt
volumeMounts:
- name: hyperparamtuning-data
mountPath: /mnt/data
- name: hyperparamtuning-output
mountPath: /mnt/output
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
sidecars:
- name: nni-web-ui
image: onepanel/nni-web-ui:0.17.0
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
ports:
- containerPort: 9000
name: nni
- name: tensorboard
image: onepanel/dl:0.17.0
command:
- sh
- '-c'
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
args:
# Read logs from /mnt/output/tensorboard - /mnt/output is auto-mounted from volumeMounts
- tensorboard --logdir /mnt/output/tensorboard
ports:
- containerPort: 6006
name: tensorboard
# Use the metrics-writer tasks to write best metrics to Workflow
- name: metrics-writer
inputs:
artifacts:
- name: sys-metrics
path: /tmp/sys-metrics.json
- git:
repo: https://github.com/onepanelio/templates.git
revision: v0.18.0
name: src
path: /mnt/src
container:
image: onepanel/python-sdk:v0.16.0
command:
- python
- -u
args:
- /mnt/src/tasks/metrics-writer/main.py
- --from_file=/tmp/sys-metrics.json
# [CHANGE] Volumes that will mount to /mnt/data (annotated data) and /mnt/output (models, checkpoints, logs)
# Update this depending on your annotation data, model, checkpoint, logs, etc. sizes
# Example values: 250Mi, 500Gi, 1Ti
volumeClaimTemplates:
- metadata:
name: hyperparamtuning-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi
- metadata:
name: hyperparamtuning-output
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi

View File

@@ -0,0 +1,208 @@
# source: https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training/
arguments:
parameters:
- name: cvat-annotation-path
value: 'artifacts/{{workflow.namespace}}/annotations/'
hint: Path to annotated data (COCO format) in default object storage. In CVAT, this parameter will be pre-populated.
displayName: Dataset path
visibility: internal
- name: val-split
value: 10
displayName: Validation split size
type: input.number
visibility: public
hint: Enter validation set size in percentage of full dataset. (0 - 100)
- name: num-augmentation-cycles
value: 1
displayName: Number of augmentation cycles
type: input.number
visibility: public
hint: Number of augmentation cycles, zero means no data augmentation
- name: preprocessing-parameters
value: |-
RandomBrightnessContrast:
p: 0.2
GaussianBlur:
p: 0.3
GaussNoise:
p: 0.4
HorizontalFlip:
p: 0.5
VerticalFlip:
p: 0.3
displayName: Preprocessing parameters
visibility: public
type: textarea.textarea
hint: 'See <a href="https://albumentations.ai/docs/api_reference/augmentations/transforms/" target="_blank">documentation</a> for more information on parameters.'
- name: cvat-num-classes
displayName: Number of classes
hint: Number of classes. In CVAT, this parameter will be pre-populated.
value: '10'
visibility: internal
- name: hyperparameters
displayName: Hyperparameters
visibility: public
type: textarea.textarea
value: |-
stage_1_epochs: 1 # Epochs for network heads
stage_2_epochs: 1 # Epochs for finetune layers
stage_3_epochs: 1 # Epochs for all layers
num_steps: 1000 # Num steps per epoch
hint: 'See <a href="https://docs.onepanel.ai/docs/reference/workflows/training#maskrcnn-hyperparameters" target="_blank">documentation</a> for more information on parameters.'
- name: dump-format
value: cvat_coco
displayName: CVAT dump format
visibility: private
- name: cvat-finetune-checkpoint
value: ''
hint: Path to the last fine-tune checkpoint for this model in default object storage. Leave empty if this is the first time you're training this model.
displayName: Checkpoint path
visibility: public
- displayName: Node pool
hint: Name of node pool or group to run this workflow task
type: select.nodepool
visibility: public
name: sys-node-pool
value: {{.DefaultNodePoolOption}}
required: true
entrypoint: main
templates:
- dag:
tasks:
- name: preprocessing
template: preprocessing
- name: train-model
template: tensorflow
dependencies: [preprocessing]
arguments:
artifacts:
- name: data
from: "{{tasks.preprocessing.outputs.artifacts.processed-data}}"
name: main
- container:
args:
- |
pip install pycocotools scikit-image==0.16.2 && \
cd /mnt/src/train/workflows/maskrcnn-training && \
python -u main.py train --dataset=/mnt/data/datasets/train_set/ \
--model=workflow_maskrcnn \
--extras="{{workflow.parameters.hyperparameters}}" \
--ref_model_path="{{workflow.parameters.cvat-finetune-checkpoint}}" \
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
--val_dataset=/mnt/data/datasets/eval_set/ \
--use_validation=True
command:
- sh
- -c
image: onepanel/dl:0.17.0
volumeMounts:
- mountPath: /mnt/data
name: processed-data
- mountPath: /mnt/output
name: output
workingDir: /mnt/src
sidecars:
- name: tensorboard
image: onepanel/dl:0.17.0
command: [ sh, -c ]
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
args: [ "tensorboard --logdir /mnt/output/tensorboard" ]
ports:
- containerPort: 6006
name: tensorboard
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
- name: models
path: /mnt/data/models/
optional: true
s3:
key: '{{workflow.parameters.cvat-finetune-checkpoint}}'
- git:
repo: https://github.com/onepanelio/templates.git
revision: v0.18.0
name: src
path: /mnt/src/train
name: tensorflow
outputs:
artifacts:
- name: model
optional: true
path: /mnt/output
- container:
args:
- |
pip install pycocotools && \
cd /mnt/src/preprocessing/workflows/albumentations-preprocessing && \
python -u main.py \
--data_aug_params="{{workflow.parameters.preprocessing-parameters}}" \
--val_split={{workflow.parameters.val-split}} \
--aug_steps={{workflow.parameters.num-augmentation-cycles}}
command:
- sh
- -c
image: onepanel/dl:0.17.0
volumeMounts:
- mountPath: /mnt/data
name: data
- mountPath: /mnt/output
name: processed-data
workingDir: /mnt/src
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
s3:
key: '{{workflow.parameters.cvat-annotation-path}}'
- git:
repo: https://github.com/onepanelio/templates.git
revision: v0.18.0
name: src
path: /mnt/src/preprocessing
name: preprocessing
outputs:
artifacts:
- name: processed-data
optional: true
path: /mnt/output
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
name: processed-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
name: output
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi

View File

@@ -24,8 +24,6 @@ templates:
- name: output
path: /mnt/output
optional: true
archive:
none: {}
script:
image: onepanel/dl:0.17.0
command:

View File

@@ -0,0 +1,207 @@
# source: https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/
arguments:
parameters:
- name: epochs
value: '10'
- displayName: Node pool
hint: Name of node pool or group to run this workflow task
type: select.nodepool
name: sys-node-pool
value: {{.DefaultNodePoolOption}}
visibility: public
required: true
entrypoint: main
templates:
- name: main
dag:
tasks:
- name: train-model
template: train-model
- name: train-model
# Indicates that we want to push files in /mnt/output to object storage
outputs:
artifacts:
- name: output
path: /mnt/output
optional: true
script:
image: onepanel/dl:0.17.0
command:
- python
- '-u'
source: |
import json
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.optim.lr_scheduler import StepLR
from torch.utils.tensorboard import SummaryWriter
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 32, 3, 1)
self.conv2 = nn.Conv2d(32, 64, 3, 1)
self.dropout1 = nn.Dropout(0.25)
self.dropout2 = nn.Dropout(0.5)
self.fc1 = nn.Linear(9216, 128)
self.fc2 = nn.Linear(128, 10)
def forward(self, x):
x = self.conv1(x)
x = F.relu(x)
x = self.conv2(x)
x = F.relu(x)
x = F.max_pool2d(x, 2)
x = self.dropout1(x)
x = torch.flatten(x, 1)
x = self.fc1(x)
x = F.relu(x)
x = self.dropout2(x)
x = self.fc2(x)
output = F.log_softmax(x, dim=1)
return output
def train(model, device, train_loader, optimizer, epoch, batch_size, writer):
model.train()
for batch_idx, (data, target) in enumerate(train_loader):
data, target = data.to(device), target.to(device)
optimizer.zero_grad()
output = model(data)
loss = F.nll_loss(output, target)
loss.backward()
optimizer.step()
if batch_idx % 10 == 0:
print('Train Epoch: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}'.format(
epoch, batch_idx * len(data), len(train_loader.dataset),
100. * batch_idx / len(train_loader), loss.item()))
writer.add_scalar('training loss', loss.item(), epoch)
def test(model, device, test_loader, epoch, writer):
model.eval()
test_loss = 0
correct = 0
with torch.no_grad():
for data, target in test_loader:
data, target = data.to(device), target.to(device)
output = model(data)
test_loss += F.nll_loss(output, target, reduction='sum').item() # sum up batch loss
pred = output.argmax(dim=1, keepdim=True) # get the index of the max log-probability
correct += pred.eq(target.view_as(pred)).sum().item()
loss = test_loss / len(test_loader.dataset)
accuracy = correct / len(test_loader.dataset)
print('\nTest set: Average loss: {}, Accuracy: {}\n'.format(
loss, accuracy))
# Store metrics for this task
metrics = [
{'name': 'accuracy', 'value': accuracy},
{'name': 'loss', 'value': loss}
]
with open('/tmp/sys-metrics.json', 'w') as f:
json.dump(metrics, f)
def main(params):
writer = SummaryWriter(log_dir='/mnt/output/tensorboard')
use_cuda = torch.cuda.is_available()
torch.manual_seed(params['seed'])
device = torch.device('cuda' if use_cuda else 'cpu')
train_kwargs = {'batch_size': params['batch_size']}
test_kwargs = {'batch_size': params['test_batch_size']}
if use_cuda:
cuda_kwargs = {'num_workers': 1,
'pin_memory': True,
'shuffle': True}
train_kwargs.update(cuda_kwargs)
test_kwargs.update(cuda_kwargs)
transform=transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))
])
dataset1 = datasets.MNIST('/mnt/data', train=True, download=True,
transform=transform)
dataset2 = datasets.MNIST('/mnt/data', train=False,
transform=transform)
train_loader = torch.utils.data.DataLoader(dataset1, **train_kwargs)
test_loader = torch.utils.data.DataLoader(dataset2, **test_kwargs)
model = Net().to(device)
optimizer = optim.Adadelta(model.parameters(), lr=params['lr'])
scheduler = StepLR(optimizer, step_size=1, gamma=params['gamma'])
for epoch in range(1, params['epochs'] + 1):
train(model, device, train_loader, optimizer, epoch, params['batch_size'], writer)
test(model, device, test_loader, epoch, writer)
scheduler.step()
# Save model
torch.save(model.state_dict(), '/mnt/output/model.pt')
writer.close()
if __name__ == '__main__':
params = {
'seed': 1,
'batch_size': 64,
'test_batch_size': 1000,
'epochs': {{workflow.parameters.epochs}},
'lr': 0.001,
'gamma': 0.7,
}
main(params)
volumeMounts:
# TensorBoard sidecar will automatically mount these volumes
# The `data` volume is mounted for saving datasets
# The `output` volume is mounted to save model output and share TensorBoard logs
- name: data
mountPath: /mnt/data
- name: output
mountPath: /mnt/output
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
sidecars:
- name: tensorboard
image: onepanel/dl:0.17.0
command:
- sh
- '-c'
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
args:
# Read logs from /mnt/output - this directory is auto-mounted from volumeMounts
- tensorboard --logdir /mnt/output/tensorboard
ports:
- containerPort: 6006
name: tensorboard
volumeClaimTemplates:
# Provision volumes for storing data and output
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi
- metadata:
name: output
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi

View File

@@ -24,8 +24,6 @@ templates:
- name: output
path: /mnt/output
optional: true
archive:
none: {}
script:
image: onepanel/dl:0.17.0
command:

View File

@@ -0,0 +1,118 @@
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/
arguments:
parameters:
- name: epochs
value: '10'
- displayName: Node pool
hint: Name of node pool or group to run this workflow task
type: select.nodepool
name: sys-node-pool
value: {{.DefaultNodePoolOption}}
visibility: public
required: true
entrypoint: main
templates:
- name: main
dag:
tasks:
- name: train-model
template: train-model
- name: train-model
# Indicates that we want to push files in /mnt/output to object storage
outputs:
artifacts:
- name: output
path: /mnt/output
optional: true
script:
image: onepanel/dl:0.17.0
command:
- python
- '-u'
source: |
import json
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
x_train = x_train[..., tf.newaxis]
x_test = x_test[..., tf.newaxis]
model = tf.keras.Sequential([
tf.keras.layers.Conv2D(filters=32, kernel_size=5, activation='relu'),
tf.keras.layers.MaxPool2D(pool_size=2),
tf.keras.layers.Conv2D(filters=64, kernel_size=5, activation='relu'),
tf.keras.layers.MaxPool2D(pool_size=2),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(units=124, activation='relu'),
tf.keras.layers.Dropout(rate=0.75),
tf.keras.layers.Dense(units=10, activation='softmax')
])
model.compile(optimizer=tf.keras.optimizers.Adam(lr=0.001),
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
# Write TensorBoard logs to /mnt/output
log_dir = '/mnt/output/tensorboard/'
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
model.fit(x=x_train,
y=y_train,
epochs={{workflow.parameters.epochs}},
validation_data=(x_test, y_test),
callbacks=[tensorboard_callback])
# Store metrics for this task
loss, accuracy = model.evaluate(x_test, y_test)
metrics = [
{'name': 'accuracy', 'value': accuracy},
{'name': 'loss', 'value': loss}
]
with open('/tmp/sys-metrics.json', 'w') as f:
json.dump(metrics, f)
# Save model
model.save('/mnt/output/model.h5')
volumeMounts:
# TensorBoard sidecar will automatically mount these volumes
# The `data` volume is mounted to support Keras datasets
# The `output` volume is mounted to save model output and share TensorBoard logs
- name: data
mountPath: /home/root/.keras/datasets
- name: output
mountPath: /mnt/output
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
sidecars:
- name: tensorboard
image: onepanel/dl:0.17.0
command:
- sh
- '-c'
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
args:
# Read logs from /mnt/output - this directory is auto-mounted from volumeMounts
- tensorboard --logdir /mnt/output/tensorboard
ports:
- containerPort: 6006
name: tensorboard
volumeClaimTemplates:
# Provision volumes for storing data and output
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi
- metadata:
name: output
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi

View File

@@ -101,7 +101,7 @@ templates:
cd /mnt/src/tf/research/ && \
/mnt/src/protoc/bin/protoc object_detection/protos/*.proto --python_out=. && \
cd /mnt/src/train/workflows/tf-object-detection-training && \
python train.py \
python main.py \
--extras="{{workflow.parameters.hyperparameters}}" \
--model="{{workflow.parameters.cvat-model}}" \
--num_classes="{{workflow.parameters.cvat-num-classes}}" \

View File

@@ -0,0 +1,260 @@
# source: https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/
arguments:
parameters:
- name: cvat-annotation-path
value: 'artifacts/{{workflow.namespace}}/annotations/'
hint: Path to annotated data (COCO format) in default object storage. In CVAT, this parameter will be pre-populated.
displayName: Dataset path
visibility: internal
- name: val-split
value: 10
displayName: Validation split size
type: input.number
visibility: public
hint: Enter validation set size in percentage of full dataset. (0 - 100)
- name: num-augmentation-cycles
value: 1
displayName: Number of augmentation cycles
type: input.number
visibility: public
hint: Number of augmentation cycles, zero means no data augmentation
- name: preprocessing-parameters
value: |-
RandomBrightnessContrast:
p: 0.2
GaussianBlur:
p: 0.3
GaussNoise:
p: 0.4
HorizontalFlip:
p: 0.5
VerticalFlip:
p: 0.3
displayName: Preprocessing parameters
visibility: public
type: textarea.textarea
hint: 'See <a href="https://albumentations.ai/docs/api_reference/augmentations/transforms/" target="_blank">documentation</a> for more information on parameters.'
- name: cvat-model
value: frcnn-res50-coco
displayName: Model
hint: TF Detection API's model to use for training.
type: select.select
visibility: public
options:
- name: 'Faster RCNN-ResNet 101-COCO'
value: frcnn-res101-coco
- name: 'Faster RCNN-ResNet 101-Low Proposal-COCO'
value: frcnn-res101-low
- name: 'Faster RCNN-ResNet 50-COCO'
value: frcnn-res50-coco
- name: 'Faster RCNN-NAS-COCO'
value: frcnn-nas-coco
- name: 'SSD MobileNet V1-COCO'
value: ssd-mobilenet-v1-coco2
- name: 'SSD MobileNet V2-COCO'
value: ssd-mobilenet-v2-coco
- name: 'SSDLite MobileNet-COCO'
value: ssdlite-mobilenet-coco
- name: cvat-num-classes
value: '10'
hint: Number of classes. In CVAT, this parameter will be pre-populated.
displayName: Number of classes
visibility: internal
- name: hyperparameters
value: |-
num_steps: 10000
displayName: Hyperparameters
visibility: public
type: textarea.textarea
hint: 'See <a href="https://docs.onepanel.ai/docs/reference/workflows/training#tfod-hyperparameters" target="_blank">documentation</a> for more information on parameters.'
- name: dump-format
value: cvat_coco
displayName: CVAT dump format
visibility: private
- name: cvat-finetune-checkpoint
value: ''
hint: Path to the last fine-tune checkpoint for this model in default object storage. Leave empty if this is the first time you're training this model.
displayName: Checkpoint path
visibility: public
- name: tf-image
value: tensorflow/tensorflow:1.13.1-py3
type: select.select
displayName: Select TensorFlow image
visibility: public
hint: Select the GPU image if you are running on a GPU node pool
options:
- name: 'TensorFlow 1.13.1 CPU Image'
value: 'tensorflow/tensorflow:1.13.1-py3'
- name: 'TensorFlow 1.13.1 GPU Image'
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
- displayName: Node pool
hint: Name of node pool or group to run this workflow task
type: select.nodepool
name: sys-node-pool
value: {{.DefaultNodePoolOption}}
visibility: public
required: true
entrypoint: main
templates:
- dag:
tasks:
- name: preprocessing
template: preprocessing
- name: train-model
template: tensorflow
dependencies: [preprocessing]
arguments:
artifacts:
- name: data
from: "{{tasks.preprocessing.outputs.artifacts.processed-data}}"
name: main
- container:
args:
- |
apt-get update && \
apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \
pip install --upgrade pip && \
pip install pillow lxml Cython contextlib2 matplotlib numpy scipy pycocotools pyyaml test-generator && \
cd /mnt/src/tf/research && \
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \
mkdir -p /mnt/src/protoc && \
wget -P /mnt/src/protoc https://github.com/protocolbuffers/protobuf/releases/download/v3.10.1/protoc-3.10.1-linux-x86_64.zip && \
cd /mnt/src/protoc/ && \
unzip protoc-3.10.1-linux-x86_64.zip && \
cd /mnt/src/tf/research/ && \
/mnt/src/protoc/bin/protoc object_detection/protos/*.proto --python_out=. && \
cd /mnt/src/train/workflows/tf-object-detection-training && \
python main.py \
--extras="{{workflow.parameters.hyperparameters}}" \
--model="{{workflow.parameters.cvat-model}}" \
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
--sys_finetune_checkpoint="{{workflow.parameters.cvat-finetune-checkpoint}}" \
--from_preprocessing=True
command:
- sh
- -c
image: '{{workflow.parameters.tf-image}}'
volumeMounts:
- mountPath: /mnt/data
name: processed-data
- mountPath: /mnt/output
name: output
workingDir: /mnt/src
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
- name: models
path: /mnt/data/models/
optional: true
s3:
key: '{{workflow.parameters.cvat-finetune-checkpoint}}'
- git:
repo: https://github.com/tensorflow/models.git
revision: v1.13.0
name: src
path: /mnt/src/tf
- git:
repo: https://github.com/onepanelio/templates.git
revision: v0.18.0
name: tsrc
path: /mnt/src/train
name: tensorflow
outputs:
artifacts:
- name: model
optional: true
path: /mnt/output
sidecars:
- name: tensorboard
image: '{{workflow.parameters.tf-image}}'
command:
- sh
- '-c'
env:
- name: ONEPANEL_INTERACTIVE_SIDECAR
value: 'true'
args:
# Read logs from /mnt/output - this directory is auto-mounted from volumeMounts
- tensorboard --logdir /mnt/output/checkpoints/
ports:
- containerPort: 6006
name: tensorboard
- container:
args:
- |
pip install --upgrade pip &&\
pip install opencv-python albumentations tqdm pyyaml pycocotools && \
cd /mnt/src/preprocessing/workflows/albumentations-preprocessing && \
python -u main.py \
--data_aug_params="{{workflow.parameters.preprocessing-parameters}}" \
--format="tfrecord" \
--val_split={{workflow.parameters.val-split}} \
--aug_steps={{workflow.parameters.num-augmentation-cycles}}
command:
- sh
- -c
image: '{{workflow.parameters.tf-image}}'
volumeMounts:
- mountPath: /mnt/data
name: data
- mountPath: /mnt/output
name: processed-data
workingDir: /mnt/src
nodeSelector:
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
s3:
key: '{{workflow.parameters.cvat-annotation-path}}'
- git:
repo: https://github.com/onepanelio/templates.git
revision: v0.18.0
name: src
path: /mnt/src/preprocessing
name: preprocessing
outputs:
artifacts:
- name: processed-data
optional: true
path: /mnt/output
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
name: processed-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
name: output
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi

View File

@@ -0,0 +1,163 @@
# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location (relative to current namespace) to sync raw input, models and checkpoints from default object storage to '/share'.
containers:
- name: cvat-db
image: postgres:10-alpine
env:
- name: POSTGRES_USER
value: root
- name: POSTGRES_DB
value: cvat
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
- name: PGDATA
value: /var/lib/psql/data
ports:
- containerPort: 5432
name: tcp
volumeMounts:
- name: db
mountPath: /var/lib/psql
- name: cvat-redis
image: redis:4.0-alpine
ports:
- containerPort: 6379
name: tcp
- name: cvat
image: onepanel/cvat:0.17.0_cvat.1.0.0
env:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: ""
- name: ALLOWED_HOSTS
value: '*'
- name: CVAT_REDIS_HOST
value: localhost
- name: CVAT_POSTGRES_HOST
value: localhost
- name: CVAT_SHARE_URL
value: /cvat/data
- name: CVAT_SHARE_DIR
value: /share
- name: CVAT_DATA_DIR
value: /cvat/data
- name: CVAT_MEDIA_DATA_DIR
value: /cvat/data/data
- name: CVAT_KEYS_DIR
value: /cvat/data/keys
- name: CVAT_MODELS_DIR
value: /cvat/data/models
- name: CVAT_LOGS_DIR
value: /cvat/logs
- name: ONEPANEL_SYNC_DIRECTORY
value: '{{workspace.parameters.sync-directory}}'
- name: NVIDIA_VISIBLE_DEVICES
value: all
- name: NVIDIA_DRIVER_CAPABILITIES
value: compute,utility
- name: NVIDIA_REQUIRE_CUDA
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: cvat-data
mountPath: /cvat
- name: share
mountPath: /share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.17.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:0.17.0
imagePullPolicy: Always
args:
- download
- -server-prefix=/sys/filesyncer
env:
- name: FS_PATH
value: /mnt/share
- name: FS_PREFIX
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
volumeMounts:
- name: share
mountPath: /mnt/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: cvat-ui
port: 80
protocol: TCP
targetPort: 80
- name: cvat
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8888
protocol: TCP
targetPort: 8888
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8888
- match:
- uri:
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
- queryParams:
id:
regex: \d+.*
route:
- destination:
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
volumeClaimTemplates:
- metadata:
name: db
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 20Gi
# DAG Workflow to be executed once a Workspace action completes (optional)
# Uncomment the lines below if you want to send Slack notifications
#postExecutionWorkflow:
# entrypoint: main
# templates:
# - name: main
# dag:
# tasks:
# - name: slack-notify
# template: slack-notify
# - name: slack-notify
# container:
# image: technosophos/slack-notify
# args:
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
# command:
# - sh
# - -c

View File

@@ -0,0 +1,134 @@
containers:
- name: cvat-db
image: postgres:10-alpine
env:
- name: POSTGRES_USER
value: root
- name: POSTGRES_DB
value: cvat
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
- name: PGDATA
value: /var/lib/psql/data
ports:
- containerPort: 5432
name: tcp
volumeMounts:
- name: db
mountPath: /var/lib/psql
- name: cvat-redis
image: redis:4.0-alpine
ports:
- containerPort: 6379
name: tcp
- name: cvat
image: onepanel/cvat:v0.18.0_cvat.1.0.0
env:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: ""
- name: ALLOWED_HOSTS
value: '*'
- name: CVAT_REDIS_HOST
value: localhost
- name: CVAT_POSTGRES_HOST
value: localhost
- name: CVAT_SHARE_URL
value: /cvat/data
- name: CVAT_SHARE_DIR
value: /share
- name: CVAT_DATA_DIR
value: /cvat/data
- name: CVAT_MEDIA_DATA_DIR
value: /cvat/data/data
- name: CVAT_KEYS_DIR
value: /cvat/data/keys
- name: CVAT_MODELS_DIR
value: /cvat/data/models
- name: CVAT_LOGS_DIR
value: /cvat/logs
- name: CVAT_ANNOTATIONS_OBJECT_STORAGE_PREFIX
value: 'artifacts/$(ONEPANEL_RESOURCE_NAMESPACE)/annotations/'
- name: CVAT_ONEPANEL_WORKFLOWS_LABEL
value: 'key=used-by,value=cvat'
- name: NVIDIA_VISIBLE_DEVICES
value: all
- name: NVIDIA_DRIVER_CAPABILITIES
value: compute,utility
- name: NVIDIA_REQUIRE_CUDA
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: cvat-data
mountPath: /cvat
- name: share
mountPath: /share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:v0.18.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
- name: sys-filesyncer
image: onepanel/filesyncer:v0.18.0
imagePullPolicy: Always
args:
- server
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: share
mountPath: /share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: cvat-ui
port: 80
protocol: TCP
targetPort: 80
- name: cvat
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8888
protocol: TCP
targetPort: 8888
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8888
- match:
- uri:
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
- queryParams:
id:
regex: \d+.*
route:
- destination:
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
volumeClaimTemplates:
- metadata:
name: db
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 20Gi

View File

@@ -0,0 +1,134 @@
containers:
- name: cvat-db
image: postgres:10-alpine
env:
- name: POSTGRES_USER
value: root
- name: POSTGRES_DB
value: cvat
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
- name: PGDATA
value: /var/lib/psql/data
ports:
- containerPort: 5432
name: tcp
volumeMounts:
- name: db
mountPath: /var/lib/psql
- name: cvat-redis
image: redis:4.0-alpine
ports:
- containerPort: 6379
name: tcp
- name: cvat
image: onepanel/cvat:v0.19.0_cvat.1.0.0
env:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: ""
- name: ALLOWED_HOSTS
value: '*'
- name: CVAT_REDIS_HOST
value: localhost
- name: CVAT_POSTGRES_HOST
value: localhost
- name: CVAT_SHARE_URL
value: /cvat/data
- name: CVAT_SHARE_DIR
value: /share
- name: CVAT_DATA_DIR
value: /cvat/data
- name: CVAT_MEDIA_DATA_DIR
value: /cvat/data/data
- name: CVAT_KEYS_DIR
value: /cvat/data/keys
- name: CVAT_MODELS_DIR
value: /cvat/data/models
- name: CVAT_LOGS_DIR
value: /cvat/logs
- name: CVAT_ANNOTATIONS_OBJECT_STORAGE_PREFIX
value: 'artifacts/$(ONEPANEL_RESOURCE_NAMESPACE)/annotations/'
- name: CVAT_ONEPANEL_WORKFLOWS_LABEL
value: 'key=used-by,value=cvat'
- name: NVIDIA_VISIBLE_DEVICES
value: all
- name: NVIDIA_DRIVER_CAPABILITIES
value: compute,utility
- name: NVIDIA_REQUIRE_CUDA
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: cvat-data
mountPath: /cvat
- name: share
mountPath: /share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:v0.19.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
- name: sys-filesyncer
image: onepanel/filesyncer:v0.19.0
imagePullPolicy: Always
args:
- server
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: share
mountPath: /share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: cvat-ui
port: 80
protocol: TCP
targetPort: 80
- name: cvat
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8888
protocol: TCP
targetPort: 8888
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8888
- match:
- uri:
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
- queryParams:
id:
regex: \d+.*
route:
- destination:
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
volumeClaimTemplates:
- metadata:
name: db
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 20Gi

View File

@@ -0,0 +1,101 @@
containers:
- name: jupyterlab
image: onepanel/dl:0.17.0
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * 'self'\"}}' --notebook-dir='/data' --allow-root"]
workingDir: /data
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ 'self'\"}}'"
- name: TENSORBOARD_PROXY_URL
value: '//$(ONEPANEL_RESOURCE_UID)--$(ONEPANEL_RESOURCE_NAMESPACE).$(ONEPANEL_DOMAIN)/tensorboard'
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
- containerPort: 8080
name: nni
volumeMounts:
- name: data
mountPath: /data
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- >
condayml="/data/.environment.yml";
jupytertxt="/data/.jupexported.txt";
if [ -f "$condayml" ]; then conda env update -f $condayml; fi;
if [ -f "$jupytertxt" ]; then cat $jupytertxt | xargs -n 1 jupyter labextension install --no-build && jupyter lab build --minimize=False; fi;
preStop:
exec:
command:
- /bin/sh
- -c
- >
conda env export > /data/.environment.yml -n base;
jupyter labextension list 1>/dev/null 2> /data/.jup.txt;
cat /data/.jup.txt | sed -n '2,$p' | awk 'sub(/v/,"@", $2){print $1$2}' > /data/.jupexported.txt;
- name: sys-filesyncer
image: onepanel/filesyncer:v0.18.0
imagePullPolicy: Always
args:
- server
- -host=localhost:8889
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: data
mountPath: /data
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
- name: nni
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8889
protocol: TCP
targetPort: 8889
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8889
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: /nni
route:
- destination:
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80

View File

@@ -0,0 +1,101 @@
containers:
- name: jupyterlab
image: onepanel/dl:0.17.0
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * 'self'\"}}' --notebook-dir='/data' --allow-root"]
workingDir: /data
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ 'self'\"}}'"
- name: TENSORBOARD_PROXY_URL
value: '//$(ONEPANEL_RESOURCE_UID)--$(ONEPANEL_RESOURCE_NAMESPACE).$(ONEPANEL_DOMAIN)/tensorboard'
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
- containerPort: 8080
name: nni
volumeMounts:
- name: data
mountPath: /data
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- >
condayml="/data/.environment.yml";
jupytertxt="/data/.jupexported.txt";
if [ -f "$condayml" ]; then conda env update -f $condayml; fi;
if [ -f "$jupytertxt" ]; then cat $jupytertxt | xargs -n 1 jupyter labextension install --no-build && jupyter lab build --minimize=False; fi;
preStop:
exec:
command:
- /bin/sh
- -c
- >
conda env export > /data/.environment.yml -n base;
jupyter labextension list 1>/dev/null 2> /data/.jup.txt;
cat /data/.jup.txt | sed -n '2,$p' | awk 'sub(/v/,"@", $2){print $1$2}' > /data/.jupexported.txt;
- name: sys-filesyncer
image: onepanel/filesyncer:v0.19.0
imagePullPolicy: Always
args:
- server
- -host=localhost:8889
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: data
mountPath: /data
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
- name: nni
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8889
protocol: TCP
targetPort: 8889
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8889
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: /nni
route:
- destination:
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80

View File

@@ -0,0 +1,68 @@
containers:
- name: vscode
image: onepanel/vscode:1.0.0
command: ["/bin/bash", "-c", "pip install onepanel-sdk && /usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 --auth none ."]
env:
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8080
name: vscode
volumeMounts:
- name: data
mountPath: /data
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- >
condayml="/data/.environment.yml";
vscodetxt="/data/.vscode-extensions.txt";
if [ -f "$condayml" ]; then conda env update -f $condayml; fi;
if [ -f "$vscodetxt" ]; then cat $vscodetxt | xargs -n 1 code-server --install-extension; fi;
preStop:
exec:
command:
- /bin/sh
- -c
- >
conda env export > /data/.environment.yml -n base;
code-server --list-extensions | tail -n +2 > /data/.vscode-extensions.txt;
- name: sys-filesyncer
image: onepanel/filesyncer:v0.18.0
imagePullPolicy: Always
args:
- server
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: data
mountPath: /data
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: vscode
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8888
protocol: TCP
targetPort: 8888
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8888
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 8080

View File

@@ -0,0 +1,68 @@
containers:
- name: vscode
image: onepanel/vscode:1.0.0
command: ["/bin/bash", "-c", "pip install onepanel-sdk && /usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 --auth none ."]
env:
- name: ONEPANEL_MAIN_CONTAINER
value: 'true'
ports:
- containerPort: 8080
name: vscode
volumeMounts:
- name: data
mountPath: /data
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- >
condayml="/data/.environment.yml";
vscodetxt="/data/.vscode-extensions.txt";
if [ -f "$condayml" ]; then conda env update -f $condayml; fi;
if [ -f "$vscodetxt" ]; then cat $vscodetxt | xargs -n 1 code-server --install-extension; fi;
preStop:
exec:
command:
- /bin/sh
- -c
- >
conda env export > /data/.environment.yml -n base;
code-server --list-extensions | tail -n +2 > /data/.vscode-extensions.txt;
- name: sys-filesyncer
image: onepanel/filesyncer:v0.19.0
imagePullPolicy: Always
args:
- server
- -server-prefix=/sys/filesyncer
volumeMounts:
- name: data
mountPath: /data
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
ports:
- name: vscode
port: 8080
protocol: TCP
targetPort: 8080
- name: fs
port: 8888
protocol: TCP
targetPort: 8888
routes:
- match:
- uri:
prefix: /sys/filesyncer
route:
- destination:
port:
number: 8888
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 8080

27
go.mod
View File

@@ -7,18 +7,17 @@ require (
github.com/Azure/go-autorest v14.0.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.8.2 // indirect
github.com/Masterminds/squirrel v1.1.0
github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6
github.com/argoproj/pkg v0.0.0-20200318225345-d3be5f29b1a8
github.com/argoproj/argo v0.0.0-20210112203504-f97bef5d0036
github.com/argoproj/pkg v0.2.0
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535
github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 // indirect
github.com/evanphx/json-patch v4.5.0+incompatible // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/gorilla/handlers v1.4.2
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.14.4
github.com/grpc-ecosystem/grpc-gateway v1.14.6
github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
@@ -28,11 +27,10 @@ require (
github.com/minio/minio-go/v6 v6.0.45
github.com/pkg/errors v0.9.1
github.com/pressly/goose v2.6.0+incompatible
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.5 // indirect
github.com/stretchr/testify v1.4.0
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.6.1
github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc
golang.org/x/net v0.0.0-20200822124328-c89045814202
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
google.golang.org/api v0.30.0
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154
@@ -41,8 +39,15 @@ require (
gopkg.in/yaml.v2 v2.2.8
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
istio.io/api v0.0.0-20200107183329-ed4b507c54e1
k8s.io/api v0.16.4
k8s.io/apimachinery v0.16.7-beta.0
k8s.io/client-go v0.16.4
k8s.io/api v0.18.2
k8s.io/apimachinery v0.18.2
k8s.io/client-go v0.18.2
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e // indirect
sigs.k8s.io/yaml v1.2.0
)
replace (
k8s.io/api => k8s.io/api v0.17.8
k8s.io/apimachinery => k8s.io/apimachinery v0.17.8
k8s.io/client-go => k8s.io/client-go v0.17.8
)

600
go.sum

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/features.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 KiB

47
main.go
View File

@@ -56,6 +56,30 @@ func main() {
log.Fatalf("Failed to connect to Kubernetes cluster: %v", err)
}
client.ClearSystemConfigCache()
sysConfig, err := client.GetSystemConfig()
if err != nil {
log.Fatalf("Failed to get system config: %v", err)
}
dbDriverName, databaseDataSourceName := sysConfig.DatabaseConnection()
// sqlx.MustConnect will panic when it can't connect to DB. In that case, this whole application will crash.
// This is okay, as the pod will restart and try connecting to DB again.
// dbDriverName may be nil, but sqlx will then panic.
db := sqlx.MustConnect(dbDriverName, databaseDataSourceName)
goose.SetTableName("goose_db_version")
if err := goose.Run("up", db.DB, filepath.Join("db", "sql")); err != nil {
log.Fatalf("Failed to run database sql migrations: %v", err)
db.Close()
}
goose.SetTableName("goose_db_go_version")
migrations.Initialize()
if err := goose.Run("up", db.DB, filepath.Join("db", "go")); err != nil {
log.Fatalf("Failed to run database go migrations: %v", err)
db.Close()
}
go watchConfigmapChanges("onepanel", stopCh, func(configMap *corev1.ConfigMap) error {
log.Printf("Configmap changed")
stopCh <- struct{}{}
@@ -65,28 +89,13 @@ func main() {
for {
client.ClearSystemConfigCache()
sysConfig, err := client.GetSystemConfig()
sysConfig, err = client.GetSystemConfig()
if err != nil {
log.Fatalf("Failed to get system config: %v", err)
}
dbDriverName, databaseDataSourceName := sysConfig.DatabaseConnection()
// sqlx.MustConnect will panic when it can't connect to DB. In that case, this whole application will crash.
// This is okay, as the pod will restart and try connecting to DB again.
// dbDriverName may be nil, but sqlx will then panic.
db := sqlx.MustConnect(dbDriverName, databaseDataSourceName)
goose.SetTableName("goose_db_version")
if err := goose.Run("up", db.DB, filepath.Join("db", "sql")); err != nil {
log.Fatalf("Failed to run database sql migrations: %v", err)
db.Close()
}
goose.SetTableName("goose_db_go_version")
migrations.Initialize()
if err := goose.Run("up", db.DB, filepath.Join("db", "go")); err != nil {
log.Fatalf("Failed to run database go migrations: %v", err)
db.Close()
}
dbDriverName, databaseDataSourceName = sysConfig.DatabaseConnection()
db = sqlx.MustConnect(dbDriverName, databaseDataSourceName)
s := startRPCServer(v1.NewDB(db), kubeConfig, sysConfig, stopCh)
@@ -94,7 +103,7 @@ func main() {
s.Stop()
if err := db.Close(); err != nil {
log.Printf("[error] closing db connection")
log.Printf("[error] closing db connection %v", err.Error())
}
}
}()

View File

@@ -62,6 +62,7 @@ func (c *Client) GetDefaultConfig() (config *ConfigMap, err error) {
return
}
// GetNamespaceConfig returns the NamespaceConfig given a namespace
func (c *Client) GetNamespaceConfig(namespace string) (config *NamespaceConfig, err error) {
configMap, err := c.getConfigMap(namespace, "onepanel")
if err != nil {

View File

@@ -131,6 +131,28 @@ func (s SystemConfig) NodePoolOptionsAsParameters() (result []*ParameterOption,
return
}
// NodePoolOptionsMap returns a map where each key is a node pool value and the value is a NodePoolOption
func (s SystemConfig) NodePoolOptionsMap() (result map[string]*NodePoolOption, err error) {
data := s.GetValue("applicationNodePoolOptions")
if data == nil {
return nil, fmt.Errorf("no nodePoolOptions in config")
}
options := make([]*NodePoolOption, 0)
if err = k8yaml.Unmarshal([]byte(*data), &options); err != nil {
return
}
result = make(map[string]*NodePoolOption)
for i := range options {
val := options[i]
result[val.Value] = val
}
return
}
// NodePoolOptionByValue returns the nodePoolOption based on a given value
func (s SystemConfig) NodePoolOptionByValue(value string) (option *NodePoolOption, err error) {
options, err := s.NodePoolOptions()
@@ -350,6 +372,7 @@ func (g *ArtifactRepositoryGCSProvider) FormatKey(namespace, workflowName, podNa
return keyFormat
}
// NamespaceConfig represents configuration for the namespace
type NamespaceConfig struct {
ArtifactRepository ArtifactRepositoryProvider
}

View File

@@ -354,7 +354,7 @@ func (c *Client) buildCronWorkflowDefinition(namespace string, workflowTemplateI
for _, param := range opts.Parameters {
newParams = append(newParams, wfv1.Parameter{
Name: param.Name,
Value: param.Value,
Value: wfv1.AnyStringPtr(*param.Value),
})
passedParams[param.Name] = true
}

View File

@@ -4,6 +4,7 @@ import (
"encoding/base64"
"encoding/json"
goerrors "errors"
"strings"
"github.com/onepanelio/core/pkg/util"
log "github.com/sirupsen/logrus"
@@ -225,7 +226,7 @@ func (c *Client) AddSecretKeyValue(namespace string, secret *Secret) (inserted b
}
}
if secretDataKeyExists {
errorMsg := "Key: " + key + " already exists in secret."
errorMsg := "Key '" + key + "' already exists"
return false, util.NewUserError(codes.AlreadyExists, errorMsg)
}
}
@@ -283,9 +284,15 @@ func (c *Client) AddSecretKeyValue(namespace string, secret *Secret) (inserted b
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
"Secret": secret,
"Secret": secret.Name,
"Error": err.Error(),
}).Error("Error adding key and value to Secret.")
if strings.Contains(err.Error(), "Request entity too large:") ||
strings.Contains(err.Error(), "Too long: must have at most") {
return false, util.NewUserError(codes.InvalidArgument, "Value is too long")
}
return false, util.NewUserError(codes.Unknown, "Error adding key and value to Secret.")
}
return true, nil
@@ -311,9 +318,10 @@ func (c *Client) UpdateSecretKeyValue(namespace string, secret *Secret) (updated
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
"Secret": secret,
"Secret": secret.Name,
"Error": err.Error(),
}).Error("Unable to find secret.")
return false, util.NewUserError(codes.NotFound, "Unable to find secret.")
}
secretDataKeyExists := false
@@ -344,9 +352,15 @@ func (c *Client) UpdateSecretKeyValue(namespace string, secret *Secret) (updated
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
"Secret": secret,
"Secret": secret.Name,
"Error": err.Error(),
}).Error("Unable to update secret key value.")
if strings.Contains(err.Error(), "Request entity too large:") ||
strings.Contains(err.Error(), "Too long: must have at most") {
return false, util.NewUserError(codes.InvalidArgument, "Value is too long")
}
return false, util.NewUserError(codes.Unknown, "Unable to update secret key value.")
}
return true, nil

View File

@@ -4,6 +4,7 @@ import (
"database/sql/driver"
"encoding/json"
"errors"
"strings"
"time"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
@@ -61,6 +62,38 @@ type LogEntry struct {
Content string
}
// IsEmpty returns true if the content for the log entry is just an empty string
func (l *LogEntry) IsEmpty() bool {
return l.Content == ""
}
// LogEntryFromLine creates a LogEntry given a line of text
// it tries to parse out a timestamp and content
func LogEntryFromLine(line *string) *LogEntry {
if line == nil {
return nil
}
if *line == "" {
return &LogEntry{Content: ""}
}
parts := strings.Split(*line, " ")
if len(parts) == 0 {
return nil
}
timestamp, err := time.Parse(time.RFC3339, parts[0])
if err != nil {
return &LogEntry{Content: *line}
}
return &LogEntry{
Timestamp: timestamp,
Content: strings.Join(parts[1:], " "),
}
}
type Metric struct {
Name string
Value float64

View File

@@ -1,6 +1,10 @@
package collection
// Returns symbol <count> times, with <separator> between each one.
import (
"reflect"
)
// RepeatSymbol returns symbol <count> times, with <separator> between each one.
// if symbol = ?, separator = , and count = 5
// this returns: "?,?,?,?,?"
func RepeatSymbol(count int, symbol, separator string) string {
@@ -15,3 +19,39 @@ func RepeatSymbol(count int, symbol, separator string) string {
return result
}
// RemoveBlanks goes through the data, assumed to be an array or map of some kind,
// and removes any data that is a nil or zero value. Maps with no keys are also removed.
//
// Note that this will not check the data again. So if you have the following
// parent: {
// child: {}
// }
//
// The result will be
// parent: {}
//
// it will not go through it again and remove parent.
func RemoveBlanks(data interface{}) {
if mapping, ok := data.(map[string]interface{}); ok {
keysToDelete := make([]string, 0)
for key, v := range mapping {
rv := reflect.ValueOf(v)
if v == nil || rv.IsZero() {
keysToDelete = append(keysToDelete, key)
} else if vMap, vMapOk := v.(map[string]interface{}); vMapOk && len(vMap) == 0 {
keysToDelete = append(keysToDelete, key)
} else {
RemoveBlanks(v)
}
}
for _, keyToDelete := range keysToDelete {
delete(mapping, keyToDelete)
}
} else if list, ok := data.([]interface{}); ok {
for _, listItem := range list {
RemoveBlanks(listItem)
}
}
}

View File

@@ -145,6 +145,24 @@ func HasKeyValue(node *yaml.Node, key string, values ...string) (bool, error) {
return false, nil
}
// GetKeyValue gets the value of the key from the node (assumed to be a mapping node)
func GetKeyValue(node *yaml.Node, key string) (*yaml.Node, error) {
if node.Kind != yaml.MappingNode {
return nil, fmt.Errorf("not a mapping node")
}
for i := 0; i < len(node.Content)-1; i += 2 {
keyNode := node.Content[i]
valueNode := node.Content[i+1]
if keyNode.Value == key {
return valueNode, nil
}
}
return nil, fmt.Errorf("not found")
}
// Iterate runs through all of the content nodes in the indicated root node
func Iterate(root *yaml.Node, callable func(parent, value *yaml.Node)) {
for _, child := range root.Content {

View File

@@ -8,6 +8,8 @@ import (
"errors"
"fmt"
sq "github.com/Masterminds/squirrel"
"github.com/argoproj/argo/persist/sqldb"
"github.com/argoproj/argo/workflow/hydrator"
"github.com/google/uuid"
"github.com/onepanelio/core/pkg/util/gcs"
"github.com/onepanelio/core/pkg/util/label"
@@ -23,6 +25,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/watch"
"net/http"
"regexp"
yaml2 "sigs.k8s.io/yaml"
"strconv"
"strings"
@@ -113,6 +116,24 @@ func applyWorkflowExecutionFilter(sb sq.SelectBuilder, request *request.Request)
return sb, nil
}
// template, name are reserved labels.
// we query the columns on the appropriate tables instead
finalLabels := make([]*Label, 0)
for _, label := range filter.Labels {
if label.Key == "template" {
sb = sb.Where(sq.And{
sq.Expr("wt.name ILIKE ?", "%"+label.Value+"%"),
})
} else if label.Key == "name" {
sb = sb.Where(sq.And{
sq.Expr("we.name ILIKE ?", "%"+label.Value+"%"),
})
} else {
finalLabels = append(finalLabels, label)
}
}
filter.Labels = finalLabels
sb, err := ApplyLabelSelectQuery("we.labels", sb, &filter)
if err != nil {
return sb, err
@@ -287,7 +308,7 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts
if opts.PodGCStrategy == nil {
if wf.Spec.PodGC == nil {
//TODO - Load this data from onepanel config-map or secret
podGCStrategy := env.GetEnv("ARGO_POD_GC_STRATEGY", "OnPodCompletion")
podGCStrategy := env.Get("ARGO_POD_GC_STRATEGY", "OnPodCompletion")
strategy := PodGCStrategy(podGCStrategy)
wf.Spec.PodGC = &wfv1.PodGC{
Strategy: strategy,
@@ -382,6 +403,12 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts
injectArtifactRepositoryConfig(&artifact, namespaceConfig)
template.Inputs.Artifacts[j] = artifact
}
if template.Metadata.Labels == nil {
template.Metadata.Labels = make(map[string]string)
}
template.Metadata.Labels["onepanel.io/entity-type"] = "Workflow"
template.Metadata.Labels["onepanel.io/entity-uid"] = opts.WorkflowTemplateUID
}
}
@@ -423,7 +450,6 @@ func (c *Client) createWorkflow(namespace string, workflowTemplateID uint64, wor
if opts == nil {
opts = &WorkflowExecutionOptions{}
}
if opts.Name != "" {
wf.ObjectMeta.Name = opts.Name
}
@@ -442,7 +468,7 @@ func (c *Client) createWorkflow(namespace string, workflowTemplateID uint64, wor
for _, param := range opts.Parameters {
newParams = append(newParams, wfv1.Parameter{
Name: param.Name,
Value: param.Value,
Value: wfv1.AnyStringPtr(*param.Value),
})
passedParams[param.Name] = true
}
@@ -460,6 +486,49 @@ func (c *Client) createWorkflow(namespace string, workflowTemplateID uint64, wor
wf.ObjectMeta.Labels = opts.Labels
}
newParameters := make([]wfv1.Parameter, 0)
// Only used for workspaces
workspaceUID := ""
for i := range wf.Spec.Arguments.Parameters {
param := wf.Spec.Arguments.Parameters[i]
if param.Name == "sys-name" {
uid, err := GenerateWorkspaceUID(param.Value.String())
if err != nil {
return nil, err
}
workspaceUID = uid
}
}
for i := range wf.Spec.Arguments.Parameters {
param := wf.Spec.Arguments.Parameters[i]
if param.Value != nil {
re, reErr := regexp.Compile(`{{\s*workflow.namespace\s*}}|{{\s*workspace.namespace\s*}}`)
if reErr != nil {
return nil, reErr
}
value := re.ReplaceAllString(param.Value.String(), namespace)
if workspaceUID != "" {
reWorkspaceUID, reErr := regexp.Compile(`{{\s*workspace.uid\s*}}`)
if reErr != nil {
return nil, reErr
}
value = reWorkspaceUID.ReplaceAllString(value, workspaceUID)
}
param.Value = wfv1.AnyStringPtr(value)
}
newParameters = append(newParameters, param)
}
wf.Spec.Arguments.Parameters = newParameters
if err = injectFilesyncerSidecar(wf); err != nil {
return nil, err
}
if err = injectWorkflowExecutionStatusCaller(wf, wfv1.NodeRunning); err != nil {
return nil, err
}
@@ -620,7 +689,10 @@ func (c *Client) injectAccessForSidecars(namespace string, wf *wfv1.Workflow) ([
virtualServiceNameUUID := "vs-" + uuid.New().String()
hosts := []string{serviceName}
wf.Spec.Templates[tIdx].Outputs.Parameters = append(wf.Spec.Templates[tIdx].Outputs.Parameters,
wfv1.Parameter{Name: "sys-sidecar-url--" + s.Name, Value: &serviceName},
wfv1.Parameter{
Name: "sys-sidecar-url--" + s.Name,
Value: wfv1.AnyStringPtr(serviceName),
},
)
virtualService := map[string]interface{}{
"apiVersion": "networking.istio.io/v1alpha3",
@@ -774,11 +846,12 @@ func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (e
}
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(c.ArgoprojV1alpha1().WorkflowTemplates(namespace))
clusterWftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(c.ArgoprojV1alpha1().ClusterWorkflowTemplates())
for _, wf := range workflows {
if err = c.injectAutomatedFields(namespace, &wf, &WorkflowExecutionOptions{}); err != nil {
return err
}
_, err = validate.ValidateWorkflow(wftmplGetter, &wf, validate.ValidateOpts{})
_, err = validate.ValidateWorkflow(wftmplGetter, clusterWftmplGetter, &wf, validate.ValidateOpts{})
if err != nil {
return
}
@@ -820,6 +893,7 @@ func (c *Client) CreateWorkflowExecution(namespace string, workflow *WorkflowExe
return nil, err
}
opts.GenerateName = nameUID + "-"
opts.WorkflowTemplateUID = workflowTemplate.UID
opts.Labels[workflowTemplateUIDLabelKey] = workflowTemplate.UID
opts.Labels[workflowTemplateVersionLabelKey] = fmt.Sprint(workflowTemplate.Version)
@@ -1231,7 +1305,7 @@ func (c *Client) WatchWorkflowExecution(namespace, uid string) (<-chan *Workflow
return workflowWatcher, nil
}
func (c *Client) GetWorkflowExecutionLogs(namespace, uid, podName, containerName string) (<-chan *LogEntry, error) {
func (c *Client) GetWorkflowExecutionLogs(namespace, uid, podName, containerName string) (<-chan []*LogEntry, error) {
wf, err := c.ArgoprojV1alpha1().Workflows(namespace).Get(uid, metav1.GetOptions{})
if err != nil {
log.WithFields(log.Fields{
@@ -1337,43 +1411,58 @@ func (c *Client) GetWorkflowExecutionLogs(namespace, uid, podName, containerName
return nil, util.NewUserError(codes.NotFound, "Log not found.")
}
logWatcher := make(chan *LogEntry)
logWatcher := make(chan []*LogEntry)
go func() {
buffer := make([]byte, 4096)
reader := bufio.NewReader(stream)
newLine := true
lastChunkSent := -1
lastLine := ""
for {
bytesRead, err := reader.Read(buffer)
if err != nil && err.Error() != "EOF" {
break
}
content := string(buffer[:bytesRead])
content := lastLine + string(buffer[:bytesRead])
lastLine = ""
if newLine {
parts := strings.Split(content, " ")
if len(parts) == 0 {
logWatcher <- &LogEntry{Content: content}
} else {
timestamp, err := time.Parse(time.RFC3339, parts[0])
if err != nil {
logWatcher <- &LogEntry{Content: content}
} else {
logWatcher <- &LogEntry{
Timestamp: timestamp,
Content: strings.Join(parts[1:], " "),
}
}
chunk := make([]*LogEntry, 0)
lines := strings.Split(content, "\n")
for lineIndex, line := range lines {
if lineIndex == len(lines)-1 {
lastLine = line
continue
}
} else {
logWatcher <- &LogEntry{Content: content}
newLogEntry := LogEntryFromLine(&line)
if newLogEntry == nil {
continue
}
chunk = append(chunk, newLogEntry)
}
if lastChunkSent == 0 && lastLine != "" {
newLogEntry := LogEntryFromLine(&lastLine)
if newLogEntry != nil {
chunk = append(chunk, newLogEntry)
lastLine = ""
}
}
if len(chunk) > 0 {
logWatcher <- chunk
}
lastChunkSent = len(chunk)
if err != nil && err.Error() == "EOF" {
break
}
}
newLine = strings.Contains(content, "\n")
newLogEntry := LogEntryFromLine(&lastLine)
if newLogEntry != nil {
logWatcher <- []*LogEntry{newLogEntry}
}
close(logWatcher)
@@ -1493,7 +1582,9 @@ func (c *Client) RetryWorkflowExecution(namespace, uid string) (workflow *Workfl
return
}
wf, err = argoutil.RetryWorkflow(c, c.ArgoprojV1alpha1().Workflows(namespace), wf)
hy := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo)
wf, err = argoutil.RetryWorkflow(c, hy, c.ArgoprojV1alpha1().Workflows(namespace), uid, true, "")
workflow = typeWorkflow(wf)
@@ -1511,7 +1602,7 @@ func (c *Client) ResubmitWorkflowExecution(namespace, uid string) (workflow *Wor
return
}
wf, err = argoutil.SubmitWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), c, namespace, wf, &argoutil.SubmitOpts{})
wf, err = argoutil.SubmitWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), c, namespace, wf, &wfv1.SubmitOpts{})
if err != nil {
return
}
@@ -1522,7 +1613,8 @@ func (c *Client) ResubmitWorkflowExecution(namespace, uid string) (workflow *Wor
}
func (c *Client) ResumeWorkflowExecution(namespace, uid string) (workflow *WorkflowExecution, err error) {
err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), uid, "")
hy := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo)
err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), hy, uid, "")
if err != nil {
return
}
@@ -1556,7 +1648,8 @@ func (c *Client) TerminateWorkflowExecution(namespace, uid string) (err error) {
return err
}
err = argoutil.StopWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), uid, "", "")
hy := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo)
err = argoutil.StopWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), hy, uid, "", "")
return
}
@@ -1629,7 +1722,9 @@ func (c *Client) ListFiles(namespace, key string) (files []*File, err error) {
files = make([]*File, 0)
if len(key) > 0 {
if key == "/" {
key = ""
} else if len(key) > 0 {
if string(key[len(key)-1]) != "/" {
key += "/"
}
@@ -1718,7 +1813,7 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error
return manifest, nil
}
specMap, ok := spec.(map[string]interface{})
specMap, ok := spec.(map[interface{}]interface{})
if !ok {
return manifest, nil
}
@@ -1728,7 +1823,7 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error
return manifest, nil
}
argumentsMap, ok := arguments.(map[string]interface{})
argumentsMap, ok := arguments.(map[interface{}]interface{})
if !ok {
return manifest, nil
}
@@ -1747,7 +1842,7 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error
parametersToKeep := make([]interface{}, 0)
for _, parameter := range parametersList {
paramMap, ok := parameter.(map[string]interface{})
paramMap, ok := parameter.(map[interface{}]interface{})
if !ok {
continue
}
@@ -1759,7 +1854,7 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error
parametersToKeep = append(parametersToKeep, parameter)
keysToDelete := make([]string, 0)
keysToDelete := make([]interface{}, 0)
for key := range paramMap {
if key != "name" && key != "value" {
keysToDelete = append(keysToDelete, key)
@@ -2007,6 +2102,38 @@ func getCURLNodeTemplate(name, curlMethod, curlPath, curlBody string, inputs wfv
return
}
func injectFilesyncerSidecar(wf *wfv1.Workflow) error {
filesyncer := wfv1.UserContainer{
Container: corev1.Container{
Name: "sys-filesyncer",
Image: "onepanel/filesyncer:v0.19.0",
Args: []string{"server", "-server-prefix=/sys/filesyncer", "-backend=local-storage"},
Env: []corev1.EnvVar{
{
Name: "ONEPANEL_INTERACTIVE_SIDECAR",
Value: "true",
},
},
Ports: []corev1.ContainerPort{
{
ContainerPort: 8888,
},
},
},
}
for i := range wf.Spec.Templates {
template := &wf.Spec.Templates[i]
if (template.Container != nil && len(template.Container.VolumeMounts) != 0) ||
(template.Script != nil && len(template.Script.VolumeMounts) != 0) {
template.Sidecars = append(template.Sidecars, filesyncer)
}
}
return nil
}
func injectExitHandlerWorkflowExecutionStatistic(wf *wfv1.Workflow, workflowTemplateId *uint64) error {
curlPath := "/apis/v1beta1/{{workflow.namespace}}/workflow_executions/{{workflow.name}}/statistics"
statistics := map[string]interface{}{
@@ -2267,3 +2394,33 @@ func (c *Client) UpdateWorkflowExecutionMetrics(namespace, uid string, metrics M
return
}
// ListWorkflowExecutionsField loads all of the distinct field values for workflow executions
func (c *Client) ListWorkflowExecutionsField(namespace, field string) (value []string, err error) {
columnName := ""
switch field {
case "name":
columnName = "we.name"
break
case "templateName":
columnName = "wt.name"
break
default:
return nil, fmt.Errorf("unsupported field '%v'", field)
}
sb := sb.Select(columnName).
Distinct().
From("workflow_executions we").
Join("workflow_template_versions wtv ON we.workflow_template_version_id = wtv.id").
Join("workflow_templates wt ON wtv.workflow_template_id = wt.id").
Where(sq.And{sq.Eq{
"we.namespace": namespace,
"wt.is_system": false,
}}).OrderBy(columnName)
err = c.DB.Selectx(&value, sb)
return
}

View File

@@ -31,14 +31,15 @@ type WorkflowExecution struct {
// WorkflowExecutionOptions are options you have for an executing workflow
type WorkflowExecutionOptions struct {
Name string
GenerateName string
Entrypoint string
Parameters []Parameter
ServiceAccount string
Labels map[string]string
ListOptions *ListOptions
PodGCStrategy *PodGCStrategy
Name string
GenerateName string
Entrypoint string
Parameters []Parameter
ServiceAccount string
Labels map[string]string
ListOptions *ListOptions
PodGCStrategy *PodGCStrategy
WorkflowTemplateUID string
}
// WorkflowExecutionStatistic is a record keeping track of what happened to a workflow execution

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/onepanelio/core/pkg/util/env"
"github.com/onepanelio/core/pkg/util/extensions"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request"
@@ -352,7 +353,8 @@ func (c *Client) getWorkflowTemplateVersionDB(namespace, name, version string) (
workflowTemplateVersion = &WorkflowTemplateVersion{}
whereMap := sq.Eq{
"wt.name": name,
"wt.name": name,
"wt.is_archived": false,
}
if version == "latest" {
@@ -472,6 +474,20 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
}
for _, version := range dbVersions {
if version.ParametersBytes != nil {
_, err := version.LoadParametersFromBytes()
if err != nil {
return nil, err
}
updatedParameters, err := c.replaceSysNodePoolOptions(version.Parameters)
if err != nil {
return nil, err
}
version.Parameters = updatedParameters
}
newItem := WorkflowTemplate{
ID: version.WorkflowTemplate.ID,
CreatedAt: version.CreatedAt.UTC(),
@@ -482,6 +498,7 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
IsLatest: version.IsLatest,
IsArchived: version.WorkflowTemplate.IsArchived,
Labels: version.Labels,
Parameters: version.Parameters,
}
workflowTemplateVersions = append(workflowTemplateVersions, &newItem)
@@ -1152,7 +1169,7 @@ func (c *Client) GenerateWorkflowTemplateManifest(manifest string) (string, erro
if err != nil {
return "", err
}
legalNodePoolValues := make([]string, 0)
legalNodePoolValues := []string{env.Get("ONEPANEL_TEMPLATE_NODEPOOL_DEFAULT_VALUE", "default")}
for _, opt := range nodePoolOptions {
legalNodePoolValues = append(legalNodePoolValues, opt.Value)
}
@@ -1211,3 +1228,24 @@ func (c *Client) GenerateWorkflowTemplateManifest(manifest string) (string, erro
return string(finalManifest), err
}
// ListWorkflowTemplatesField loads all of the distinct field values for workflow templates
func (c *Client) ListWorkflowTemplatesField(namespace, field string, isSystem bool) (value []string, err error) {
if field != "name" {
return nil, fmt.Errorf("unsupported field '%v'", field)
}
columnName := fmt.Sprintf("wt.%v", field)
sb := sb.Select(columnName).
Distinct().
From("workflow_templates wt").
Where(sq.Eq{
"wt.namespace": namespace,
"wt.is_system": isSystem,
}).OrderBy(columnName)
err = c.DB.Selectx(&value, sb)
return
}

View File

@@ -1,6 +1,7 @@
package v1
import (
"encoding/json"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
"time"
@@ -38,6 +39,26 @@ func WorkflowTemplateVersionsToIDs(resources []*WorkflowTemplateVersion) (ids []
return
}
// LoadParametersFromBytes loads Parameters from the WorkflowTemplateVersion's ParameterBytes field.
func (wtv *WorkflowTemplateVersion) LoadParametersFromBytes() ([]Parameter, error) {
loadedParameters := make([]Parameter, 0)
err := json.Unmarshal(wtv.ParametersBytes, &loadedParameters)
if err != nil {
return wtv.Parameters, err
}
// It might be nil because the value "null" is stored in db if there are no parameters.
// for consistency, we return an empty array.
if loadedParameters == nil {
loadedParameters = make([]Parameter, 0)
}
wtv.Parameters = loadedParameters
return wtv.Parameters, err
}
// getWorkflowTemplateVersionColumns returns all of the columns for workflow template versions modified by alias, destination.
// see formatColumnSelect
func getWorkflowTemplateVersionColumns(aliasAndDestination ...string) []string {

View File

@@ -1,10 +1,14 @@
package v1
import (
"bufio"
"database/sql"
"encoding/json"
"errors"
"fmt"
"io"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
sq "github.com/Masterminds/squirrel"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/asaskevich/govalidator"
@@ -52,6 +56,24 @@ func applyWorkspaceFilter(sb sq.SelectBuilder, request *request.Request) (sq.Sel
})
}
// template, name are reserved labels.
// we query the columns on the appropriate tables instead
finalLabels := make([]*Label, 0)
for _, label := range filter.Labels {
if label.Key == "template" {
sb = sb.Where(sq.And{
sq.Expr("wt.name ILIKE ?", "%"+label.Value+"%"),
})
} else if label.Key == "name" {
sb = sb.Where(sq.And{
sq.Expr("w.name ILIKE ?", "%"+label.Value+"%"),
})
} else {
finalLabels = append(finalLabels, label)
}
}
filter.Labels = finalLabels
sb, err := ApplyLabelSelectQuery("w.labels", sb, &filter)
if err != nil {
return sb, err
@@ -220,7 +242,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace
for i, p := range argoTemplate.Spec.Arguments.Parameters {
value := runtimeParametersMap[p.Name]
if value != nil {
argoTemplate.Spec.Arguments.Parameters[i].Value = value
argoTemplate.Spec.Arguments.Parameters[i].Value = wfv1.AnyStringPtr(*value)
}
}
@@ -311,11 +333,6 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace
}
mainContainerIndex := -1
if len(containers) == 2 {
// It's 1 because we prepend the node capture container and we want the other container to be main
mainContainerIndex = 1
}
for i := range containers {
container := containers[i]
@@ -428,7 +445,7 @@ func (c *Client) startWorkspace(namespace string, parameters []byte, workspace *
for i, p := range argoTemplate.Spec.Arguments.Parameters {
value := runtimeParametersMap[p.Name]
if value != nil {
argoTemplate.Spec.Arguments.Parameters[i].Value = value
argoTemplate.Spec.Arguments.Parameters[i].Value = wfv1.AnyStringPtr(*value)
}
}
@@ -719,6 +736,12 @@ func (c *Client) ListWorkspaces(namespace string, request *request.Request) (wor
return nil, err
}
for _, workspace := range workspaces {
if err = json.Unmarshal(workspace.ParametersBytes, &workspace.Parameters); err != nil {
return nil, err
}
}
return
}
@@ -826,18 +849,22 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction
return
}
// UpdateWorkspace marks a workspace as "updating"
func (c *Client) UpdateWorkspace(namespace, uid string, parameters []Parameter) (err error) {
return c.updateWorkspace(namespace, uid, "update", "apply", &WorkspaceStatus{Phase: WorkspaceUpdating}, parameters...)
}
// PauseWorkspace pauses a workspace
func (c *Client) PauseWorkspace(namespace, uid string) (err error) {
return c.updateWorkspace(namespace, uid, "pause", "delete", &WorkspaceStatus{Phase: WorkspacePausing})
}
func (c *Client) ResumeWorkspace(namespace, uid string) (err error) {
return c.updateWorkspace(namespace, uid, "create", "apply", &WorkspaceStatus{Phase: WorkspaceLaunching})
// ResumeWorkspace resumes a workspace
func (c *Client) ResumeWorkspace(namespace, uid string, parameters []Parameter) (err error) {
return c.updateWorkspace(namespace, uid, "create", "apply", &WorkspaceStatus{Phase: WorkspaceLaunching}, parameters...)
}
// DeleteWorkspace deletes a workspace
func (c *Client) DeleteWorkspace(namespace, uid string) (err error) {
return c.updateWorkspace(namespace, uid, "delete", "delete", &WorkspaceStatus{Phase: WorkspaceTerminating})
}
@@ -878,3 +905,117 @@ func (c *Client) GetWorkspaceStatisticsForNamespace(namespace string) (report *W
return
}
// GetWorkspaceContainerLogs returns logs for a given container name in a Workspace
func (c *Client) GetWorkspaceContainerLogs(namespace, uid, containerName string, sinceTime time.Time) (<-chan []*LogEntry, error) {
var stream io.ReadCloser
k8sSinceTime := metav1.NewTime(sinceTime)
stream, err := c.CoreV1().Pods(namespace).GetLogs(uid+"-0", &corev1.PodLogOptions{
Container: containerName,
Follow: true,
Timestamps: true,
SinceTime: &k8sSinceTime,
}).Stream()
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
"UID": uid,
"ContainerName": containerName,
"Error": err.Error(),
}).Error("Error with logs.")
return nil, util.NewUserError(codes.NotFound, "Log not found.")
}
logWatcher := make(chan []*LogEntry)
go func() {
buffer := make([]byte, 4096)
reader := bufio.NewReader(stream)
lastChunkSent := -1
lastLine := ""
for {
bytesRead, err := reader.Read(buffer)
if err != nil && err.Error() != "EOF" {
break
}
content := lastLine + string(buffer[:bytesRead])
lastLine = ""
chunk := make([]*LogEntry, 0)
lines := strings.Split(content, "\n")
for lineIndex, line := range lines {
if lineIndex == len(lines)-1 {
lastLine = line
continue
}
newLogEntry := LogEntryFromLine(&line)
if newLogEntry == nil {
continue
}
chunk = append(chunk, newLogEntry)
}
if lastChunkSent == 0 && lastLine != "" {
newLogEntry := LogEntryFromLine(&lastLine)
if newLogEntry != nil {
chunk = append(chunk, newLogEntry)
lastLine = ""
}
}
if len(chunk) > 0 {
logWatcher <- chunk
}
lastChunkSent = len(chunk)
if err != nil && err.Error() == "EOF" {
break
}
}
newLogEntry := LogEntryFromLine(&lastLine)
if newLogEntry != nil {
logWatcher <- []*LogEntry{newLogEntry}
}
close(logWatcher)
}()
return logWatcher, err
}
// ListWorkspacesField loads all of the distinct field values for workspaces
func (c *Client) ListWorkspacesField(namespace, field string) (value []string, err error) {
columnName := ""
switch field {
case "name":
columnName = "w.name"
break
case "templateName":
columnName = "wt.name"
break
default:
return nil, fmt.Errorf("unsupported field '%v'", field)
}
sb := sb.Select(columnName).
Distinct().
From("workspaces w").
Join("workspace_templates wt ON w.workspace_template_id = wt.id").
Where(sq.And{
sq.Eq{
"w.namespace": namespace,
}, sq.NotEq{
"w.phase": WorkspaceTerminated,
}}).OrderBy(columnName)
err = c.DB.Selectx(&value, sb)
return
}

View File

@@ -422,14 +422,17 @@ func createStatefulSetManifest(spec *WorkspaceSpec) (statefulSetManifest string,
template := corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"app": "{{workflow.parameters.sys-uid}}",
"app": "{{workflow.parameters.sys-uid}}",
"onepanel.io/entity-type": "Workspace",
"onepanel.io/entity-uid": "{{workflow.parameters.sys-uid}}",
},
},
Spec: corev1.PodSpec{
NodeSelector: map[string]string{
"{{workflow.parameters.sys-node-pool-label}}": "{{workflow.parameters.sys-node-pool}}",
},
Containers: spec.Containers,
ImagePullSecrets: spec.ImagePullSecrets,
Containers: spec.Containers,
Volumes: []corev1.Volume{
{
Name: "sys-dshm",
@@ -521,8 +524,11 @@ func unmarshalWorkflowTemplate(spec *WorkspaceSpec, serviceManifest, virtualServ
continue
}
volumeClaimItems = append(volumeClaimItems, wfv1.Item{Type: wfv1.String, StrVal: v.Name})
item, err := wfv1.ParseItem(fmt.Sprintf(`"%v"`, v.Name))
if err != nil {
return "", err
}
volumeClaimItems = append(volumeClaimItems, item)
volumeClaimsMapped[v.Name] = true
}
}
@@ -579,7 +585,7 @@ metadata:
Parameters: []wfv1.Parameter{
{
Name: "update-revision",
Value: ptr.String("{{tasks.create-stateful-set.outputs.parameters.update-revision}}"),
Value: wfv1.AnyStringPtr("{{tasks.create-stateful-set.outputs.parameters.update-revision}}"),
},
},
},
@@ -610,7 +616,7 @@ metadata:
Parameters: []wfv1.Parameter{
{
Name: "sys-pvc-name",
Value: ptr.String("{{item}}"),
Value: wfv1.AnyStringPtr("{{item}}"),
},
},
},
@@ -625,7 +631,7 @@ metadata:
Parameters: []wfv1.Parameter{
{
Name: "sys-workspace-phase",
Value: ptr.String(string(WorkspaceRunning)),
Value: wfv1.AnyStringPtr(WorkspaceRunning),
},
},
},
@@ -639,7 +645,7 @@ metadata:
Parameters: []wfv1.Parameter{
{
Name: "sys-workspace-phase",
Value: ptr.String(string(WorkspacePaused)),
Value: wfv1.AnyStringPtr(WorkspacePaused),
},
},
},
@@ -653,7 +659,7 @@ metadata:
Parameters: []wfv1.Parameter{
{
Name: "sys-workspace-phase",
Value: ptr.String(string(WorkspaceTerminated)),
Value: wfv1.AnyStringPtr(WorkspaceTerminated),
},
},
},
@@ -783,10 +789,11 @@ metadata:
}
workflowTemplateSpec := map[string]interface{}{
"arguments": spec.Arguments,
"entrypoint": "workspace",
"onExit": "handleExit",
"templates": templates,
"arguments": spec.Arguments,
"entrypoint": "workspace",
"onExit": "handleExit",
"templates": templates,
"imagePullSecrets": spec.ImagePullSecrets,
}
workflowTemplateSpecManifestBytes, err := yaml.Marshal(workflowTemplateSpec)
@@ -986,7 +993,7 @@ func (c *Client) generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate *Wo
return workflowTemplate, nil
}
// CreateWorkspaceTemplateWorkflowTemplate generates and returns a workflowTemplate for a given workspaceTemplate manifest
// GenerateWorkspaceTemplateWorkflowTemplate generates and returns a workflowTemplate for a given workspaceTemplate manifest
func (c *Client) GenerateWorkspaceTemplateWorkflowTemplate(workspaceTemplate *WorkspaceTemplate) (workflowTemplate *WorkflowTemplate, err error) {
workflowTemplate, err = c.generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate)
if err != nil {
@@ -1342,3 +1349,23 @@ func (c *Client) ArchiveWorkspaceTemplate(namespace string, uid string) (archive
return true, nil
}
// ListWorkspaceTemplatesField loads all of the distinct field values for workspace templates
func (c *Client) ListWorkspaceTemplatesField(namespace, field string) (value []string, err error) {
if field != "name" {
return nil, fmt.Errorf("unsupported field '%v'", field)
}
columnName := fmt.Sprintf("wt.%v", field)
sb := sb.Select(columnName).
Distinct().
From("workspace_templates wt").
Where(sq.Eq{
"wt.namespace": namespace,
}).OrderBy(columnName)
err = c.DB.Selectx(&value, sb)
return
}

View File

@@ -3,13 +3,24 @@ package v1
import (
"fmt"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util/extensions"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
yaml3 "gopkg.in/yaml.v3"
"sigs.k8s.io/yaml"
"strings"
"time"
)
// WorkspaceService represents services available to external access in a Workspace
type WorkspaceService struct {
Name string
Path string
}
// WorkspaceTemplate represents the data associated with a WorkspaceTemplate
// this is a mix of DB and "in-memory" fields
type WorkspaceTemplate struct {
ID uint64
WorkspaceTemplateVersionID uint64 `db:"workspace_template_version_id"`
@@ -80,6 +91,58 @@ func (wt *WorkspaceTemplate) InjectRuntimeParameters(config SystemConfig) error
return nil
}
// GetServices returns an array of WorkspaceServices
func (wt *WorkspaceTemplate) GetServices() ([]*WorkspaceService, error) {
result := make([]*WorkspaceService, 0)
root := &yaml3.Node{}
if err := yaml3.Unmarshal([]byte(wt.Manifest), root); err != nil {
return nil, err
}
containers, err := extensions.GetNode(root, extensions.CreateYamlIndex("containers"))
if err != nil {
if strings.Contains(err.Error(), "not found") {
return result, nil
}
return nil, err
}
for _, container := range containers.Content {
hasKeyValue, err := extensions.HasKeyValue(container, "name", "sys-filesyncer")
if err != nil {
return nil, err
}
if hasKeyValue {
argsValue, err := extensions.GetKeyValue(container, "args")
if err != nil {
continue
}
path := ""
for _, arg := range argsValue.Content {
if strings.Contains(arg.Value, "server-prefix") {
parts := strings.Split(arg.Value, "=")
if len(parts) > 1 {
path = parts[1]
}
}
}
fmt.Printf("%v", argsValue)
result = append(result, &WorkspaceService{
Name: "sys-filesyncer",
Path: path,
})
}
}
return result, nil
}
// WorkspaceTemplatesToVersionIDs plucks the WorkspaceTemplateVersionID from each template and returns it in an array
// No duplicates are included.
func WorkspaceTemplatesToVersionIDs(resources []*WorkspaceTemplate) (ids []uint64) {

View File

@@ -57,6 +57,7 @@ type Workspace struct {
type WorkspaceSpec struct {
Arguments *Arguments `json:"arguments" protobuf:"bytes,1,opt,name=arguments"`
Containers []corev1.Container `json:"containers" protobuf:"bytes,3,opt,name=containers"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
Ports []corev1.ServicePort `json:"ports" protobuf:"bytes,4,opt,name=ports"`
Routes []*networking.HTTPRoute `json:"routes" protobuf:"bytes,5,opt,name=routes"`
VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates" protobuf:"bytes,6,opt,name=volumeClaimTemplates"`
@@ -83,7 +84,7 @@ func (w *Workspace) GetParameterValue(name string) *string {
// GenerateUID generates a uid from the input name and sets it on the workspace
func (w *Workspace) GenerateUID(name string) error {
result, err := uid2.GenerateUID(name, 30)
result, err := GenerateWorkspaceUID(name)
if err != nil {
return err
}
@@ -93,6 +94,11 @@ func (w *Workspace) GenerateUID(name string) error {
return nil
}
// GenerateWorkspaceUID creates a uid from a workspace name. The limit is 30 characters
func GenerateWorkspaceUID(name string) (string, error) {
return uid2.GenerateUID(name, 30)
}
// getWorkspaceColumns returns all of the columns for workspace modified by alias, destination.
// see formatColumnSelect
func getWorkspaceColumns(aliasAndDestination ...string) []string {
@@ -131,7 +137,7 @@ func getWorkspaceColumnsMap(camelCase bool) map[string]string {
"labels": "labels",
"name": "name",
"uid": "uid",
"namespace": "namespace",
"namespace": "namespace",
"phase": "phase",
"parameters": "parameters",
}

View File

@@ -2,8 +2,10 @@ package server
import (
"context"
"fmt"
"github.com/golang/protobuf/ptypes/empty"
api "github.com/onepanelio/core/api/gen"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/server/auth"
)
@@ -17,6 +19,23 @@ func NewConfigServer() *ConfigServer {
return &ConfigServer{}
}
func getArtifactRepositoryBucket(client *v1.Client, namespace string) (string, error) {
if namespace == "" {
return "", nil
}
namespaceConfig, err := client.GetNamespaceConfig(namespace)
if err != nil {
return "", err
}
if namespaceConfig.ArtifactRepository.S3 != nil {
return namespaceConfig.ArtifactRepository.S3.Bucket, nil
}
return "", fmt.Errorf("unknown artifact repository")
}
// GetConfig returns the system configuration options
func (c *ConfigServer) GetConfig(ctx context.Context, req *empty.Empty) (*api.GetConfigResponse, error) {
client := getClient(ctx)
@@ -54,3 +73,21 @@ func (c *ConfigServer) GetConfig(ctx context.Context, req *empty.Empty) (*api.Ge
NodePool: nodePool,
}, err
}
// GetNamespaceConfig returns the namespace configuration
func (c *ConfigServer) GetNamespaceConfig(ctx context.Context, req *api.GetNamespaceConfigRequest) (*api.GetNamespaceConfigResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, "", "get", "", "namespaces", "")
if err != nil || !allowed {
return nil, err
}
bucket, err := getArtifactRepositoryBucket(client, req.Namespace)
if err != nil {
return nil, err
}
return &api.GetNamespaceConfigResponse{
Bucket: bucket,
}, err
}

View File

@@ -6,6 +6,7 @@ import (
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/server/auth"
"github.com/onepanelio/core/server/converter"
"strings"
)
func getGroupAndResourceByIdentifier(identifier string) (group, resource string) {
@@ -43,7 +44,9 @@ func mapKeyValuesToMap(keyValues []*api.KeyValue) map[string]string {
result := make(map[string]string)
for _, keyValue := range keyValues {
result[keyValue.Key] = keyValue.Value
trimmedKey := strings.TrimSpace(keyValue.Key)
trimmedValue := strings.TrimSpace(keyValue.Value)
result[trimmedKey] = trimmedValue
}
return result

View File

@@ -2,9 +2,11 @@ package server
import (
"context"
"encoding/json"
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/collection"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/onepanelio/core/pkg/util/router"
@@ -35,15 +37,68 @@ func NewWorkflowServer() *WorkflowServer {
return &WorkflowServer{}
}
// removedUnusedManifestFields removes any fields not necessary in a Workflow Manfiest.
// this is used to cut down the size for more efficient data transmission
func removedUnusedManifestFields(manifest string) (string, error) {
if manifest == "" {
return "", nil
}
result := make(map[string]map[string]interface{})
if err := json.Unmarshal([]byte(manifest), &result); err != nil {
return "", err
}
for key := range result {
collection.RemoveBlanks(result[key])
}
delete(result["metadata"], "managedFields")
delete(result["status"], "resourcesDuration")
templatesRaw, ok := result["spec"]["templates"]
if ok {
templatesArray := templatesRaw.([]interface{})
for _, template := range templatesArray {
templateMap := template.(map[string]interface{})
delete(templateMap, "metadata")
}
}
nodeStatusRaw, ok := result["status"]["nodes"]
if ok {
nodeStatusArray := nodeStatusRaw.(map[string]interface{})
for _, nodeStatus := range nodeStatusArray {
nodeStatusMap := nodeStatus.(map[string]interface{})
delete(nodeStatusMap, "resourcesDuration")
}
}
finalManifestBytes, err := json.Marshal(result)
if err != nil {
return "", err
}
return string(finalManifestBytes), nil
}
// apiWorkflowExecution converts a package workflow execution to the api version
// router is optional
func apiWorkflowExecution(wf *v1.WorkflowExecution, router router.Web) (workflow *api.WorkflowExecution) {
manifest, err := removedUnusedManifestFields(wf.Manifest)
if err != nil {
log.Printf("error trimming manifest %v", err)
return nil
}
workflow = &api.WorkflowExecution{
CreatedAt: wf.CreatedAt.Format(time.RFC3339),
Uid: wf.UID,
Name: wf.Name,
Phase: string(wf.Phase),
Manifest: wf.Manifest,
Manifest: manifest,
Labels: converter.MappingToKeyValue(wf.Labels),
Metrics: converter.MetricsToAPI(wf.Metrics),
}
@@ -242,16 +297,26 @@ func (s *WorkflowServer) GetWorkflowExecutionLogs(req *api.GetWorkflowExecutionL
return err
}
le := &v1.LogEntry{}
le := make([]*v1.LogEntry, 0)
for {
le = <-watcher
if le == nil {
break
}
if err := stream.Send(&api.LogEntry{
Timestamp: le.Timestamp.String(),
Content: le.Content,
apiLogEntries := make([]*api.LogEntry, len(le))
for i, item := range le {
apiLogEntries[i] = &api.LogEntry{
Content: item.Content,
}
if item.Timestamp.After(time.Time{}) {
apiLogEntries[i].Timestamp = item.Timestamp.Format(time.RFC3339)
}
}
if err := stream.Send(&api.LogStreamResponse{
LogEntries: apiLogEntries,
}); err != nil {
return err
}
@@ -514,3 +579,21 @@ func (s *WorkflowServer) UpdateWorkflowExecutionMetrics(ctx context.Context, req
return resp, nil
}
// ListWorkflowExecutionsField returns a list of all the distinct values of a field from WorkflowExecutions
func (s *WorkflowServer) ListWorkflowExecutionsField(ctx context.Context, req *api.ListWorkflowExecutionsFieldRequest) (*api.ListWorkflowExecutionsFieldResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
if err != nil || !allowed {
return nil, err
}
values, err := client.ListWorkflowExecutionsField(req.Namespace, req.FieldName)
if err != nil {
return nil, err
}
return &api.ListWorkflowExecutionsFieldResponse{
Values: values,
}, nil
}

View File

@@ -272,3 +272,21 @@ func (s *WorkflowTemplateServer) ArchiveWorkflowTemplate(ctx context.Context, re
},
}, nil
}
// ListWorkflowTemplatesField returns a list of all the distinct values of a field from WorkflowTemplates
func (s *WorkflowTemplateServer) ListWorkflowTemplatesField(ctx context.Context, req *api.ListWorkflowTemplatesFieldRequest) (*api.ListWorkflowTemplatesFieldResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
if err != nil || !allowed {
return nil, err
}
values, err := client.ListWorkflowTemplatesField(req.Namespace, req.FieldName, req.IsSystem)
if err != nil {
return nil, err
}
return &api.ListWorkflowTemplatesFieldResponse{
Values: values,
}, nil
}

View File

@@ -32,6 +32,10 @@ func NewWorkspaceServer() *WorkspaceServer {
}
func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace {
if wt == nil {
return nil
}
protocol := config.APIProtocol()
domain := config.Domain()
@@ -53,14 +57,47 @@ func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace {
return nil
}
services, err := wt.WorkspaceTemplate.GetServices()
if err != nil {
return nil
}
apiServices := make([]*api.WorkspaceComponent, 0)
for _, service := range services {
apiServices = append(apiServices, &api.WorkspaceComponent{
Name: service.Name,
Url: wt.GetURL(*protocol, *domain) + service.Path,
})
}
res := &api.Workspace{
Uid: wt.UID,
Name: wt.Name,
CreatedAt: wt.CreatedAt.UTC().Format(time.RFC3339),
Url: wt.GetURL(*protocol, *domain),
Uid: wt.UID,
Name: wt.Name,
CreatedAt: wt.CreatedAt.UTC().Format(time.RFC3339),
Url: wt.GetURL(*protocol, *domain),
WorkspaceComponents: apiServices,
}
res.Parameters = converter.ParametersToAPI(wt.Parameters)
nodePoolMap, err := config.NodePoolOptionsMap()
if err != nil {
log.WithFields(log.Fields{
"Method": "apiWorkspace",
"Error": "Unable to get Node Pool Options Map",
}).Error(err.Error())
return nil
}
for _, parameter := range res.Parameters {
if parameter.Name == "sys-node-pool" {
mapVal := nodePoolMap[parameter.Value]
res.MachineType = &api.MachineType{
Name: mapVal.Name,
Value: mapVal.Value,
}
}
}
res.Status = &api.WorkspaceStatus{
Phase: string(wt.Status.Phase),
}
@@ -88,6 +125,7 @@ func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace {
return res
}
// CreateWorkspace create a workspace
func (s *WorkspaceServer) CreateWorkspace(ctx context.Context, req *api.CreateWorkspaceRequest) (*api.Workspace, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "onepanel.io", "workspaces", "")
@@ -137,6 +175,7 @@ func (s *WorkspaceServer) CreateWorkspace(ctx context.Context, req *api.CreateWo
return apiWorkspace, nil
}
// GetWorkspace returns Workspace information
func (s *WorkspaceServer) GetWorkspace(ctx context.Context, req *api.GetWorkspaceRequest) (*api.Workspace, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "onepanel.io", "workspaces", req.Uid)
@@ -148,6 +187,9 @@ func (s *WorkspaceServer) GetWorkspace(ctx context.Context, req *api.GetWorkspac
if err != nil {
return nil, err
}
if workspace == nil {
return nil, util.NewUserError(codes.NotFound, "Not found")
}
sysConfig, err := client.GetSystemConfig()
if err != nil {
@@ -173,6 +215,7 @@ func (s *WorkspaceServer) GetWorkspace(ctx context.Context, req *api.GetWorkspac
return apiWorkspace, nil
}
// UpdateWorkspaceStatus updates a given workspaces status such as running, paused, etc.
func (s *WorkspaceServer) UpdateWorkspaceStatus(ctx context.Context, req *api.UpdateWorkspaceStatusRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "onepanel.io", "workspaces", req.Uid)
@@ -189,6 +232,7 @@ func (s *WorkspaceServer) UpdateWorkspaceStatus(ctx context.Context, req *api.Up
return &empty.Empty{}, err
}
// UpdateWorkspace updates a workspace's status
func (s *WorkspaceServer) UpdateWorkspace(ctx context.Context, req *api.UpdateWorkspaceRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "onepanel.io", "workspaces", req.Uid)
@@ -212,6 +256,7 @@ func (s *WorkspaceServer) UpdateWorkspace(ctx context.Context, req *api.UpdateWo
return &empty.Empty{}, err
}
// ListWorkspaces lists the current workspaces for a given namespace
func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorkspaceRequest) (*api.ListWorkspaceResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
@@ -272,6 +317,7 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks
}, nil
}
// PauseWorkspace requests to pause a given workspace
func (s *WorkspaceServer) PauseWorkspace(ctx context.Context, req *api.PauseWorkspaceRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "onepanel.io", "workspaces", req.Uid)
@@ -284,6 +330,7 @@ func (s *WorkspaceServer) PauseWorkspace(ctx context.Context, req *api.PauseWork
return &empty.Empty{}, err
}
// ResumeWorkspace attempts to resume a workspace
func (s *WorkspaceServer) ResumeWorkspace(ctx context.Context, req *api.ResumeWorkspaceRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "onepanel.io", "workspaces", req.Uid)
@@ -291,11 +338,19 @@ func (s *WorkspaceServer) ResumeWorkspace(ctx context.Context, req *api.ResumeWo
return &empty.Empty{}, err
}
err = client.ResumeWorkspace(req.Namespace, req.Uid)
var parameters []v1.Parameter
for _, param := range req.Body.Parameters {
parameters = append(parameters, v1.Parameter{
Name: param.Name,
Value: ptr.String(param.Value),
})
}
err = client.ResumeWorkspace(req.Namespace, req.Uid, parameters)
return &empty.Empty{}, err
}
// DeleteWorkspace requests to delete a workspace
func (s *WorkspaceServer) DeleteWorkspace(ctx context.Context, req *api.DeleteWorkspaceRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "delete", "onepanel.io", "workspaces", req.Uid)
@@ -351,7 +406,7 @@ func (s *WorkspaceServer) RetryLastWorkspaceAction(ctx context.Context, req *api
return nil, err
}
case v1.WorkspaceFailedToResume:
if err := client.ResumeWorkspace(req.Namespace, workspace.UID); err != nil {
if err := client.ResumeWorkspace(req.Namespace, workspace.UID, workspace.Parameters); err != nil {
return nil, err
}
case v1.WorkspaceFailedToTerminate:
@@ -387,3 +442,63 @@ func (s *WorkspaceServer) GetWorkspaceStatisticsForNamespace(ctx context.Context
Stats: converter.WorkspaceStatisticsReportToAPI(report),
}, nil
}
// GetWorkspaceContainerLogs returns logs for a given container name in a Workspace
func (s *WorkspaceServer) GetWorkspaceContainerLogs(req *api.GetWorkspaceContainerLogsRequest, stream api.WorkspaceService_GetWorkspaceContainerLogsServer) error {
client := getClient(stream.Context())
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "onepanel.io", "workspaces", req.Uid)
if err != nil || !allowed {
return err
}
sinceTime := time.Unix(req.SinceTime, 0)
watcher, err := client.GetWorkspaceContainerLogs(req.Namespace, req.Uid, req.ContainerName, sinceTime)
if err != nil {
return err
}
le := make([]*v1.LogEntry, 0)
for {
le = <-watcher
if le == nil {
break
}
apiLogEntries := make([]*api.LogEntry, len(le))
for i, item := range le {
apiLogEntries[i] = &api.LogEntry{
Content: item.Content,
}
if item.Timestamp.After(time.Time{}) {
apiLogEntries[i].Timestamp = item.Timestamp.Format(time.RFC3339)
}
}
if err := stream.Send(&api.LogStreamResponse{
LogEntries: apiLogEntries,
}); err != nil {
return err
}
}
return nil
}
// ListWorkspacesField returns a list of all the distinct values of a field from Workspaces
func (s *WorkspaceServer) ListWorkspacesField(ctx context.Context, req *api.ListWorkspacesFieldRequest) (*api.ListWorkspacesFieldResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
if err != nil || !allowed {
return nil, err
}
values, err := client.ListWorkspacesField(req.Namespace, req.FieldName)
if err != nil {
return nil, err
}
return &api.ListWorkspacesFieldResponse{
Values: values,
}, nil
}

View File

@@ -230,3 +230,21 @@ func (s *WorkspaceTemplateServer) ArchiveWorkspaceTemplate(ctx context.Context,
IsArchived: archived,
}, nil
}
// ListWorkspaceTemplatesField returns a list of all the distinct values of a field from WorkspaceTemplates
func (s *WorkspaceTemplateServer) ListWorkspaceTemplatesField(ctx context.Context, req *api.ListWorkspaceTemplatesFieldRequest) (*api.ListWorkspaceTemplatesFieldResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", "workflowtemplates", "")
if err != nil || !allowed {
return nil, err
}
values, err := client.ListWorkspaceTemplatesField(req.Namespace, req.FieldName)
if err != nil {
return nil, err
}
return &api.ListWorkspaceTemplatesFieldResponse{
Values: values,
}, nil
}