Compare commits

...

332 Commits

Author SHA1 Message Date
Andrey Melnikov
90f01f8036 Merge pull request #711 from rushtehrani/fix/send-status
fix: Only inject one sys-send-status task
2020-11-09 11:12:27 -08:00
Andrey Melnikov
850b184788 Merge pull request #715 from Vafilor/feat/add.auth.back
fix: add backwards compatibility for auth token requests
2020-11-09 10:34:31 -08:00
rushtehrani
875097fed7 only inject one sys-send-status task 2020-11-06 17:35:55 -08:00
Andrey Melnikov
9c400e82e6 Merge pull request #709 from Vafilor/fix/migration
fix: issue where new migration ran before all others, causing issues
2020-11-06 15:14:11 -08:00
Andrey Melnikov
f9bf162b94 fix: issue where new migration ran before all others, causing issues 2020-11-06 15:10:34 -08:00
Rush Tehrani
91b9fb37c2 Update description in README.md 2020-11-06 12:45:15 -08:00
Andrey Melnikov
717a4bc2e8 fix: temporary fix while cvat is not updated to use new auth 2020-11-06 12:11:40 -08:00
Andrey Melnikov
74bc140107 Merge pull request #705 from Vafilor/fix/rename.auth
fix: rename LogIn request to GetAccessToken
2020-11-03 13:45:06 -08:00
Andrey Melnikov
a405e8bf46 feat: update api to use accessTokenAuth 2020-11-03 13:37:30 -08:00
Andrey Melnikov
93bdc7cd70 fix: rename LogIn to GetAccessToken 2020-11-03 10:29:02 -08:00
Rush Tehrani
ff0526db9a Merge pull request #703 from aleksandrmelnikov/fix/fixing.namespace.typo
fix: Fixing typo in CVAT migration yaml.
2020-11-02 14:41:45 -08:00
Andrey Melnikov
8b35c1709c Merge pull request #702 from Vafilor/fix/workspaces.terminated.labels
fix: issue where terminated workspace labels were being selected
2020-11-02 11:26:35 -08:00
Aleksandr Melnikov
98c086ad1e Fixing typo. 2020-11-02 11:20:18 -08:00
Rush Tehrani
e07aebcc3c Merge pull request #700 from aleksandrmelnikov/feat/core.681-update.mnt.vol.locations.in.cvat
feat: Adding migration to reduce the number of volumes in CVAT workspace template
2020-11-02 11:13:10 -08:00
Rush Tehrani
6c1f522921 Merge pull request #699 from rushtehrani/fix/tensorboard
fix: Set TENSORBOARD_PROXY_URL so TensorBoard can easily be used in JupyterLab
2020-11-02 11:12:31 -08:00
Andrey Melnikov
31840afab1 fix: issue where terminated workspace labels were being selected. 2020-11-02 11:09:55 -08:00
Aleksandr Melnikov
cf607513aa Adding down migration for new migration.
- Refactoring yaml files per feedback.
2020-11-02 10:53:45 -08:00
Aleksandr Melnikov
0e35ed2d52 Adding migration for cvat template.
- Main changes are a reduction of volumes needed.
2020-11-02 10:51:54 -08:00
Andrey Melnikov
5e82311efb Merge pull request #698 from Vafilor/fix/concurrent.map
fix: concurrency issues with token
2020-11-02 10:36:19 -08:00
rushtehrani
0bb5ad7f2c fix migrations 2020-11-01 22:39:03 -08:00
rushtehrani
a598b3f620 set TENSORBOARD_PROXY_URL so it can be used in JupyterLab 2020-10-31 17:00:38 -07:00
Rush Tehrani
a184c294da Merge pull request #697 from Vafilor/fix/revert.system.flag
fix: removed is_system flag
2020-10-31 14:41:46 -07:00
Andrey Melnikov
b129a1da7d fix: moved token to be inside client instead of sysconfig as it is not a system config value, but it is applicable to the current client.
This fixes some concurrency issues since you could have multiple requests handled at the same time that try to read and modify the system values.
2020-10-30 23:48:51 -07:00
Andrey Melnikov
7854aa15ca fix: removed is_system flag 2020-10-30 23:45:39 -07:00
Andrey Melnikov
7814502404 Merge pull request #693 from Vafilor/feat/onepanelio.core.688.login
feat: support for login endpoint
2020-10-30 12:04:13 -07:00
Andrey Melnikov
5d6fae152d feat: added system flag to workflow template creation 2020-10-29 12:30:55 -07:00
Andrey Melnikov
e41d5c38af feat: added log in endpoint which is essentially an alias for auth token, but is more descriptive 2020-10-29 12:14:53 -07:00
Rush Tehrani
0cdb8ffac8 Merge pull request #689 from Vafilor/fix/upgrade.migrations
feat: update latest migrations to use file format
2020-10-28 15:16:27 -07:00
Andrey Melnikov
a274daa811 update: updated migrations to use new file format and renamed them so they run after the latest migration updates. 2020-10-28 15:08:31 -07:00
Rush Tehrani
79d4c44817 Merge pull request #646 from aleksandrmelnikov/feat/core.623-persist.packages.between.ws.switch.pause
feat: Add lifecycle hooks to VSCode and Jupyterlab Workspaces to provide persistence of conda, pip, and extensions.
2020-10-28 12:55:20 -07:00
Aleksandr Melnikov
6591d19dae Adding --minimize=False to build command.
- This is a trade-off to reduce workspace start-up time, but increase
browser load times for Jupyterlab.
2020-10-28 12:51:10 -07:00
Aleksandr Melnikov
4ea8ca8635 Tweaking when jupyter lab build runs.
- We want it to run only if the installation succeeds.
2020-10-27 11:34:48 -07:00
Aleksandr Melnikov
cbc07693bc We need to actually build the extensions after installing them.
- This ensures all the extensions installed with "--no-build" will
be compiled in one go, instead of individually.
2020-10-27 11:23:03 -07:00
Rush Tehrani
c77711b887 Merge pull request #684 from Vafilor/feat/onepanelio.core.492.filter.labels
feat: add support to list labels for resources
2020-10-27 10:31:10 -07:00
Andrey Melnikov
bcbccbe68d fix: issue where null json labels were selected, causing a crash. 2020-10-27 10:15:16 -07:00
Aleksandr Melnikov
a4b9e9d444 Renaming container as specified. 2020-10-26 15:45:25 -07:00
Aleksandr Melnikov
7c0b5a06f8 Removing whitespace. 2020-10-26 15:42:34 -07:00
Andrey Melnikov
a756684ae5 feat: API support for selecting labels 2020-10-26 15:38:03 -07:00
Aleksandr Melnikov
d4f676210e Removing unused yaml. 2020-10-26 15:35:30 -07:00
Aleksandr Melnikov
83f6ef3e27 Removing migrationsRan code.
- This is SQL and will never evaluate to true. These templates are
go migrations, not sql based.
See https://github.com/onepanelio/core/pull/646/#discussion_r504214052
for context.
2020-10-26 13:44:13 -07:00
Aleksandr Melnikov
ee29c12eb2 Merge branch 'master' into feat/core.623-persist.packages.between.ws.switch.pause 2020-10-26 13:33:48 -07:00
Aleksandr Melnikov
6758e260c9 Adding "--no-build" to code that re-installs jupyterlab extensions.
- Otherwise, the extension installation process also kicks off a
production minimization of code, which takes minutes.
- This leads to Jupyterlab Workspace taking ~10 minutes to resume, even
if no new extensions had been installed.
2020-10-26 13:29:37 -07:00
Andrey Melnikov
5de512136a fix: added migration to fix existing null labels 2020-10-23 12:24:34 -07:00
Andrey Melnikov
94c5850eda fix: issue where nil values for JSON Labels sometimes returned "null" and not "{}" 2020-10-23 12:11:18 -07:00
Andrey Melnikov
50145cccdf feat: added more logging for getBearerToken errors 2020-10-23 11:40:29 -07:00
Rush Tehrani
83acc5a5ce Merge pull request #683 from rushtehrani/docs/readme-1
docs: Update support badge
2020-10-23 10:59:07 -07:00
Rush Tehrani
19378c62f3 Update README.md 2020-10-23 10:51:51 -07:00
Rush Tehrani
0d4f5fbb37 Merge pull request #678 from rushtehrani/docs/readme
docs: Update README
2020-10-20 14:11:01 -07:00
rushtehrani
43a4d60b5b add onepanel.gif 2020-10-20 13:43:57 -07:00
rushtehrani
6c85a81709 docs: Update README 2020-10-20 13:40:34 -07:00
Aleksandr Melnikov
e9d8a6ebe0 Merge pull request #677 from Vafilor/fix/artifact.repository.generic
fix: non-generic filesyncer for latest cvat migration
2020-10-20 11:17:54 -07:00
Andrey Melnikov
c8c0b6ffd4 fix: non-generic filesyncer for latest cvat migration 2020-10-20 11:03:03 -07:00
Andrey Melnikov
38780c2e08 Merge pull request #675 from Vafilor/feat/cvat.upgrade
feat: upgrade cvat to v14
2020-10-19 10:52:51 -07:00
Andrey Melnikov
e1f8ee846c feat: update-cvat 2020-10-19 10:48:10 -07:00
Andrey Melnikov
2cc4cbd6f8 cleanup: simplified updating workspace template into a separate function 2020-10-16 17:33:35 -07:00
Andrey Melnikov
276aaf6e7a feat: placeholder for updating cvat template. 2020-10-16 17:20:27 -07:00
Rush Tehrani
6e1a08fdc3 Merge pull request #673 from Vafilor/feat/gcs.compatible.files
fix: issue where files were not being listed when using gcs
2020-10-16 16:47:18 -07:00
Andrey Melnikov
7129fdf55f fix: issue where s3 with gcs wasn't working because of incompatible listing of files. 2020-10-16 16:41:49 -07:00
Rush Tehrani
00e3247fcd Merge pull request #672 from rushtehrani/fix/sys-uid-env-var
fix: Use sys-uid instead of sys-name for ONEPANEL_RESOURCE_UID
2020-10-16 12:58:23 -07:00
rushtehrani
c26019b4d5 use sys-uid instead of sys-name for ONEPANEL_RESOURCE_UID 2020-10-16 12:55:12 -07:00
Andrey Melnikov
acadc0c0a7 Merge pull request #670 from Vafilor/feat/tag.channel
fix: change notify slack channel to be org instead of dev
2020-10-16 09:57:46 -07:00
Rush Tehrani
1b97099d11 Merge pull request #669 from Vafilor/fix/db.connections
fix: use system-wide db connection for auth
2020-10-16 09:55:41 -07:00
Andrey Melnikov
c5365975ac fix: change notify slack channel to be org instead of dev 2020-10-16 09:53:45 -07:00
Andrey Melnikov
b7d37586a8 fix: add method to get client with a provided db 2020-10-16 09:45:51 -07:00
Andrey Melnikov
2bd3c3dde0 fix: use system-wide connection when checking authentication 2020-10-16 09:45:29 -07:00
Rush Tehrani
957313423c Merge pull request #668 from Vafilor/fix/db.connections
fix: close db connection when not in use.
2020-10-16 09:21:32 -07:00
Andrey Melnikov
c883f69fc9 fix: close db connection when not in use. 2020-10-15 21:48:25 -07:00
Andrey Melnikov
6c5b6c877e Merge pull request #660 from Vafilor/feat/revert.jwt
feat: revert jwt changes as it creates issues with workflow authentication logic
2020-10-14 12:15:27 -07:00
Andrey Melnikov
67e684a715 revert: remove util/tokens/jwt as it is no longer used. 2020-10-14 11:54:23 -07:00
Andrey Melnikov
20c4950b69 feat: revert jwt token from auth 2020-10-14 11:53:05 -07:00
Andrey Melnikov
5e5c3cca67 Merge pull request #657 from rushtehrani/fix/workspace-resource
fix: Update label function to return group and resource
2020-10-13 16:15:28 -07:00
Andrey Melnikov
575a33c272 Merge pull request #658 from Vafilor/feat/onepanel.io.653-additional-fixes
fix: issue with concurrent map access
2020-10-13 16:09:22 -07:00
rushtehrani
8e9b95aa12 update label function to return group and resource 2020-10-13 16:06:08 -07:00
Andrey Melnikov
38f1aafaec fix: issue with concurrent map access 2020-10-13 16:02:40 -07:00
rushtehrani
30ebda4918 use workspaces instead of statefulset for resource 2020-10-13 15:47:20 -07:00
Andrey Melnikov
ce972f2988 Merge pull request #656 from Vafilor/feat/onepanel.io.653-additional-fixes
fix: bad token issue
2020-10-13 15:27:45 -07:00
Andrey Melnikov
ede4c67c8f fix: bad token issue 2020-10-13 15:17:56 -07:00
Aleksandr Melnikov
cc05c4994c Fixing whitespace, so we have valid YAML. 2020-10-13 13:13:23 -07:00
Rush Tehrani
68ddec78c8 Merge pull request #655 from Vafilor/feat/onepanelio.core.653-auth.changes
feat: update incoming token to be a JWT token that takes in username
2020-10-13 12:45:14 -07:00
Andrey Melnikov
c42997a643 fix: error to be API friendly 2020-10-13 12:21:32 -07:00
Andrey Melnikov
5bd2feaa86 update: added username to returned auth token 2020-10-12 17:01:26 -07:00
Andrey Melnikov
de4302d226 chore: formatting updates for error strings 2020-10-12 16:17:16 -07:00
Andrey Melnikov
7150f24631 feat: update incoming token to be a JWT token that takes in username 2020-10-12 16:07:12 -07:00
Rush Tehrani
0e1e48dfc8 Merge pull request #647 from rushtehrani/master
fix: Use correct group for workspaces resource
2020-10-08 20:03:51 -07:00
rushtehrani
dd0f1f7705 use correct group for workspaces resource 2020-10-08 19:52:48 -07:00
Aleksandr Melnikov
ac589bfb62 Added migration for VSCode workspace template
- Added lifecycle hooks to template
- This enables persistence of conda, pip, and vscode extensions.
2020-10-08 15:59:02 -07:00
Aleksandr Melnikov
1d35adbeaa Added migration for Jupyterlab workspace template
- Added lifecycle hooks to template
- This enables persistence of conda, pip, and jupyter labextensions.
2020-10-08 15:49:47 -07:00
Aleksandr Melnikov
2b52f46ba6 Adding design document related to ticket and general implementation. 2020-10-08 15:13:23 -07:00
Aleksandr Melnikov
03f8f47664 Merge pull request #642 from Vafilor/fix/jupyterlab.migrations
feat: added convenience method to update workspace template manifest
2020-10-06 10:47:18 -07:00
Andrey Melnikov
c85496d216 update: added method specifically to update the manifest of a workspace template and modified recent migration to use it.
This fixes an issue where the jupyterlab migration wiped out the old description.
2020-10-06 10:28:03 -07:00
Rush Tehrani
5f6415548d Merge pull request #640 from aleksandrmelnikov/fix/core.637-dedicated.nodes.via.hostport
fix: Fixing issues with using hostPort. Removed prior logic that still relied on running nodes.
2020-10-05 15:40:26 -07:00
Aleksandr Melnikov
c641c17a8c Updating code that generates an extra container for a workspace.
- Renamed function to make it clearer what it's doing with the extra container
- Added documentation for the function
- Removed listing nodes code, since we only care if the workspace has
a nodeSelector set.
2020-10-05 14:17:00 -07:00
Aleksandr Melnikov
83a2543b13 Updating function name to reflect what it's doing. 2020-10-05 14:04:32 -07:00
Aleksandr Melnikov
e8dae0f2e9 Since we're no longer relying on running nodes, we don't need logic
relating to them.
- We can just check if a nodeSelector is set on the template.
2020-10-05 13:59:14 -07:00
Rush Tehrani
b85bf4d688 Merge pull request #638 from aleksandrmelnikov/fix/core.637-dedicated.nodes.via.hostport
fix: Replace resource requests and limits with hostPort, as a means of grabbing dedicated nodes.
2020-10-05 12:17:45 -07:00
Aleksandr Melnikov
7fe0ab2654 Tweaking names so it's more clear why they are there. 2020-10-05 11:51:04 -07:00
Aleksandr Melnikov
dfa6eb2fe6 Removing function that's no longer used. 2020-10-05 11:46:19 -07:00
Aleksandr Melnikov
cc2c51ace5 Removing resource requests and limits.
- Using hostPort on the node as a way to require dedicated nodes
for workspaces and workflows.
2020-10-05 11:46:01 -07:00
Andrey Melnikov
897462ede7 Merge pull request #636 from aleksandrmelnikov/fix/if.no.running.node.don't.try.to.set.resources
fix: Do not try to calculate resource requests and limits if the node is not running.
2020-10-02 16:25:04 -07:00
Aleksandr Melnikov
4e3c24fd89 Merge pull request #630 from Vafilor/fix/workspace.start.resource.requirements
fix: added resource requirements to start workspace
2020-10-02 16:17:15 -07:00
Aleksandr Melnikov
276e105f20 Adding documentation for function call.
- Refactoring the parameter names so they are actually usefully named.
2020-10-02 15:53:29 -07:00
Aleksandr Melnikov
656026ac84 Refactored workflow_execution resource calculation to use the new
function, to put the logic into the same place.
2020-10-02 13:08:48 -07:00
Aleksandr Melnikov
95bea11e43 Refactored the resource calculation piece into it's own function.
Added code logic to check the cpu and memory generated by the node.
- If they are empty, then skip trying to add an extra container
for workspace.
2020-10-02 13:08:29 -07:00
Andrey Melnikov
c6f65510d8 Merge pull request #635 from Vafilor/fix/remove.dependabot.from.release.notes
fix: remove dependabot[bot] from release notes
2020-10-01 22:55:31 -07:00
Andrey Melnikov
d6e279dde5 fix: remove dependabot[bot] from release notes 2020-10-01 22:52:08 -07:00
Andrey Melnikov
e99b0e943d Merge pull request #632 from onepanelio/fix/tags
fix: build docker image on tag push
2020-10-01 22:44:58 -07:00
Andrey Melnikov
22a7c31f1d fix: testing tag push 2020-10-01 22:31:26 -07:00
Andrey Melnikov
b6c0f24170 fix: added resource requirements to start workspace 2020-10-01 21:21:57 -07:00
Andrey Melnikov
9c04ee066d Merge pull request #629 from Vafilor/fix/migrations
fix: issue where more than one namespace caused migration issues
2020-10-01 13:41:35 -07:00
Andrey Melnikov
29c3e808e1 fix: issue where more than one namespace caused migration issues.
The `version` of a WorkspaceTemplate is set in an iteration, so we need to move the declaration inside the loop so the version is always reset to 0.
2020-10-01 13:29:50 -07:00
Andrey Melnikov
3ded40a477 Merge pull request #628 from Vafilor/feat/update.cvat
feat: update cvat workspace template
2020-10-01 10:23:49 -07:00
Andrey Melnikov
559d52b033 chore: docs for migration 2020-10-01 10:09:11 -07:00
Andrey Melnikov
0ea527ec0a feat: update cvat 2020-10-01 10:05:46 -07:00
Andrey Melnikov
1a67e07d20 Merge pull request #626 from Vafilor/fix/unit.tests
fix: unit tests
2020-09-30 13:01:36 -07:00
Andrey Melnikov
49b9bc4f93 fix: unit tests 2020-09-30 12:54:35 -07:00
Andrey Melnikov
4def4aa529 Merge pull request #625 from Vafilor/chore/wording.updates
chore: update name and description for vscode template so it fits in ui
2020-09-30 12:34:14 -07:00
Andrey Melnikov
5d114e1d27 chore: update name and description for vscode template 2020-09-30 12:29:58 -07:00
Andrey Melnikov
1ed3b3e740 Merge pull request #624 from Vafilor/feat/onepanelio.299-templates.filtering
feat: added workspace templates filtering to API
2020-09-30 12:13:16 -07:00
Andrey Melnikov
571de0b40e chore: Uid -> UID per code conventions 2020-09-30 12:10:44 -07:00
Andrey Melnikov
463a8eea60 feat: added workspace templates filtering 2020-09-30 11:58:42 -07:00
Andrey Melnikov
5105ad373a Merge pull request #621 from aleksandrmelnikov/feat/core.609-add.vscode.template
feat: Adding migration for VSCode to be added as a workspace template.
2020-09-30 11:57:51 -07:00
Andrey Melnikov
afa675dc28 Merge branch 'master' into feat/core.609-add.vscode.template 2020-09-30 11:54:21 -07:00
Andrey Melnikov
335301396e Merge pull request #622 from aleksandrmelnikov/feat/update.jupyterlab
feat: Adding migration to update jupyterlab workspace to include `onepanel-sdk`
2020-09-30 11:52:45 -07:00
Aleksandr Melnikov
995b1171e6 Per feedback, returning err instead of logging. 2020-09-30 11:50:51 -07:00
Aleksandr Melnikov
d497058f20 Removing code that will prevent down migration from running,
per feedback.
2020-09-30 11:49:54 -07:00
Aleksandr Melnikov
63bcd60d84 Adding migration to update jupyterlab workspace to include onepanel-sdk. 2020-09-29 15:51:57 -07:00
Aleksandr Melnikov
ecf0a82a62 Adding migration for VSCode to be added as a workspace template. 2020-09-29 15:19:53 -07:00
Andrey Melnikov
f31c998349 Merge pull request #619 from Vafilor/feat/onepanelio.597-pr.updates
feat: pull request template updates
2020-09-29 12:35:09 -07:00
Andrey Melnikov
b6e5626a19 update: split checklist into optional and required parts 2020-09-29 12:21:54 -07:00
Andrey Melnikov
77ca0939e4 update: added checklist to PR to help remind people to include unit tests, documentation, and the license of the project. 2020-09-29 12:20:58 -07:00
Andrey Melnikov
83a4238153 Merge pull request #617 from Vafilor/feat/workspace.listing
feat: workspace list filtering, sorting and statistics
2020-09-29 11:20:46 -07:00
Andrey Melnikov
77716ba56b chore: updated method docs 2020-09-29 11:17:50 -07:00
Andrey Melnikov
541747d232 fix: issue where workspace templates were not accessing correct task for generating the template 2020-09-29 11:04:12 -07:00
Andrey Melnikov
0956afdabe update: workspace listing endpoint to include a statistics report endpoint and allow filtering by phase. 2020-09-28 15:57:31 -07:00
Andrey Melnikov
8b4a70d958 feat: added support for sorting and filtering workspaces.
* Also added a LabelFilter interface
2020-09-28 12:09:16 -07:00
Rush Tehrani
91b97d9243 Merge pull request #611 from aleksandrmelnikov/feat/core.607-revert.to.resource.limits.requests
feat: Undo pod anti-affinity for scheduling nodes, use resource requests instead.
2020-09-25 14:02:02 -07:00
Aleksandr Melnikov
be62f41e20 Error should be the last type when returning multiple items. 2020-09-25 13:53:22 -07:00
Aleksandr Melnikov
5fa34f7870 Reducing code duplication with a function. 2020-09-25 12:32:56 -07:00
Aleksandr Melnikov
65f49113a8 Adding code to set the proper resource request (and limits, in case of gpu) when
a workspace is updated.
2020-09-25 12:12:13 -07:00
Andrey Melnikov
8a874ec3f2 Merge pull request #615 from Vafilor/fix/onepanelio.core.613-labels.selector
fix: issue where some workflow templates don't show up
2020-09-25 11:56:11 -07:00
Andrey Melnikov
ada6cfd413 fix: issue where no labels filter still applied a filter for workflow templates. 2020-09-25 11:51:16 -07:00
Aleksandr Melnikov
e7cef240c4 Fixing code that assigns a GPU limit for a workflow.
- This GPU assignment works for cron created workflows as well.
2020-09-25 10:38:21 -07:00
Rush Tehrani
1b7e96cab9 Merge pull request #610 from Vafilor/feat/onepanelio.core.590-workflow.columns
feat: workflow executions include workflow template uid/name
2020-09-25 10:00:58 -07:00
Aleksandr Melnikov
dca6db842c Adding back injectContainerResourceQuotas for workflows.
- This time, the node capacity is grabbed from running nodes instead
of information from configmap (which is grabbed from params.yaml)
- Added support for two different instance-type keys.
Note that GPU support does not work at this time.
- There is no ResourceName "nvidia.com/gpu" in library code, so it throws
a deref nil error.
2020-09-24 17:28:54 -07:00
Andrey Melnikov
f7770618ca update: added parameter to control listing of system workflows 2020-09-24 12:32:35 -07:00
Aleksandr Melnikov
bafd371e11 Moved the code for generating the resources request for a workspace, into
it's own function.
2020-09-24 11:54:17 -07:00
Aleksandr Melnikov
274a1c2e84 Putting back the resource requests extraContainer and supporting logic for workspaces.
- Note that 90% of capacity that can be allocated, is used.
2020-09-24 11:04:47 -07:00
Aleksandr Melnikov
77812419d2 Removing pod anti-affinity injection from workflows.
- Workspaces end up calling workflows. This has to be removed
as part of switching back to resource requests.
2020-09-24 11:03:37 -07:00
Andrey Melnikov
6fa123b122 feat: added explicit nulls sorting for workflow execution columns. Idea is to treat null as an empty/zero value. So in asc, it is first. 2020-09-23 19:13:53 -07:00
Andrey Melnikov
b1d0ab1d59 update: added workflow template name and uid to select of workflow executions 2020-09-23 16:20:38 -07:00
Andrey Melnikov
0d5cd95ccb Merge pull request #602 from onepanelio/fix/onepanelio.core.601-workflowtemplate.bug
fix: workflow template labels persistence
2020-09-22 11:46:29 -07:00
Andrey Melnikov
9d7172c920 fix: issue where workflow template labels did not persist to the version upon creation 2020-09-22 11:38:49 -07:00
Aleksandr Melnikov
d04c17eee1 Merge pull request #600 from onepanelio/feat/onepanelio.core.599-jupyter.lab.description
feat: add description to jupyterlab workspace template
2020-09-22 11:11:26 -07:00
Andrey Melnikov
78269c2b2c fix: double comment 2020-09-22 11:08:59 -07:00
Andrey Melnikov
3e17318512 chore: documentation for migration 2020-09-22 10:54:34 -07:00
Andrey Melnikov
011fcc590e feat: add description to jupyterlab workspace template 2020-09-22 10:48:01 -07:00
Rush Tehrani
c45231c106 Merge pull request #585 from aleksandrmelnikov/feat/core.583-workflows.use.pod.anti.affinity
feat: Updated Workflows, and Cron created Workflows, to ensure they get their own pod by using Pod AntiAffinity. This replaces resource limits and/or requests.
2020-09-21 16:20:13 -07:00
Aleksandr Melnikov
9ec45e4f34 Formatting feedback and fix. 2020-09-21 16:12:53 -07:00
Aleksandr Melnikov
48e2050e97 Adjusting code so that we don't need the nodePoolLabel to figure
out the selected Node.
- The nodePoolLabel can change with the params.yaml and different
k8s versions.
2020-09-18 16:34:07 -07:00
Andrey Melnikov
478b9a1c76 Merge pull request #589 from onepanelio/feat/onepanelio.core.469-namespace.dashboard
feat: workflow filtering and sorting updates
2020-09-18 16:02:53 -07:00
Aleksandr Melnikov
d42f88e04c Adding flag to decide when to add pod affinity.
- This avoids adding it every time the loop finds a nodeSelector that's
not nil in a template
2020-09-18 15:53:00 -07:00
Aleksandr Melnikov
6dd7c0ac70 Adjusting the pod anti-affinity per feedback.
- The pod anti-affinity should be set for a template that has a nodeSelector
value (not nil).
- If the template does not have a nodeSelector, we do nothing.
2020-09-18 15:51:48 -07:00
Aleksandr Melnikov
31076bc70d Adding systemConfig to function.
- Also added error return
2020-09-18 15:50:28 -07:00
Andrey Melnikov
7bbb57ca09 update: SortOrder -> Order since package name is Sort. 2020-09-18 14:25:11 -07:00
Andrey Melnikov
7b404ff0b6 fix: issue where workflow statistics report may have null for last executed. 2020-09-18 12:47:24 -07:00
Aleksandr Melnikov
aaf20b4ab6 Updating code to use the returned wf. 2020-09-17 17:43:40 -07:00
Aleksandr Melnikov
3e87376feb Updating cron_workflow to actually ensure a singular node for
the cron created workflows.
2020-09-17 17:42:49 -07:00
Aleksandr Melnikov
7bc1056bc6 Updating function to return the updated workflow. 2020-09-17 17:42:23 -07:00
Aleksandr Melnikov
880e8ba082 Removing prior code that injected resource requests and limits
to workflows.
2020-09-17 17:08:06 -07:00
Aleksandr Melnikov
ec634b66ca Adding function to ensure a workflow gets a dedicated node for all the
templates it executes.
- Note that workflows executed by cron are also affected.
2020-09-17 17:06:20 -07:00
Rush Tehrani
15fc40a3e9 Merge pull request #582 from aleksandrmelnikov/feat/core.581-pod.anti.affinity.to.schedule
feat: Ensure workspaces get a node to themselves with pod anti-affinity.
2020-09-17 15:02:52 -07:00
Rush Tehrani
96747f1dc0 Merge pull request #584 from rushtehrani/master
docs: Additional quick start videos
2020-09-17 14:58:07 -07:00
Rush Tehrani
b7395a1ffa Add quick start videos 2020-09-17 14:54:16 -07:00
Rush Tehrani
a5f34b4f3b Update README.md 2020-09-17 14:53:39 -07:00
Aleksandr Melnikov
a28b5101fd Renaming import alias per feedback. 2020-09-17 14:53:09 -07:00
Aleksandr Melnikov
688302c58e Adding comments per Codacy feedback. 2020-09-17 10:08:39 -07:00
Aleksandr Melnikov
49e19eb135 Merge branch 'master' into feat/core.581-pod.anti.affinity.to.schedule 2020-09-17 09:21:04 -07:00
Andrey Melnikov
0a676dff6f Merge branch 'feat/onepanelio.core.469-namespace.dashboard' of github.com:onepanelio/core into feat/onepanelio.core.469-namespace.dashboard 2020-09-16 19:38:03 -07:00
Andrey Melnikov
d524c3cb66 update: fixed issue where GetWorkflowExecutionStatisticsForNamespace included workspace workflows (is_system = true). Added support for filtering by phase. 2020-09-16 19:37:10 -07:00
Andrey Melnikov
a9953683a9 feat: added endpoint to get the workflow execution statistics for a namespace 2020-09-16 19:37:10 -07:00
Andrey Melnikov
d4d4884e5b feat: initial pagination updates 2020-09-16 18:26:51 -07:00
Andrey Melnikov
d29290945c update: fixed issue where GetWorkflowExecutionStatisticsForNamespace included workspace workflows (is_system = true). Added support for filtering by phase. 2020-09-16 18:18:25 -07:00
Aleksandr Melnikov
3343f2f74b Changing the affinity label key per feedback. 2020-09-16 17:26:00 -07:00
Aleksandr Melnikov
837291a52a Implementing pod antiAffinity, so that a node will have only one
workspace scheduled on it.
2020-09-16 17:23:50 -07:00
Andrey Melnikov
122593fdbe feat: added endpoint to get the workflow execution statistics for a namespace 2020-09-16 15:19:47 -07:00
Andrey Melnikov
cd40edb16a feat: initial pagination updates 2020-09-16 11:28:32 -07:00
Rush Tehrani
b27ca42e42 Merge pull request #579 from onepanelio/revert-readme
Revert FAQ change
2020-09-15 17:26:13 -07:00
Rush Tehrani
3af4273541 Revert FAQ change 2020-09-15 17:25:57 -07:00
Donald Scott
197fb06f4c Added an FAQ skeleton for everyone's review and updates
Please add, remove, update, FAQs...
2020-09-15 17:11:59 -07:00
Aleksandr Melnikov
0b6a6e0af3 Fixing the search location of the nodeSelector. 2020-09-15 16:57:50 -07:00
Aleksandr Melnikov
ba3c2e22a9 Adding support for amd gpus. 2020-09-15 16:57:35 -07:00
Andrey Melnikov
5955876c49 Merge pull request #576 from onepanelio/fix/unit.tests
fix: unit tests
2020-09-15 14:02:46 -07:00
Andrey Melnikov
767643a51a fix: issue where omitted visibility is now public and not empty for manifest parameters 2020-09-15 13:59:05 -07:00
Andrey Melnikov
5100efdd2d fix: issue where labels table was attempted to be removed even though it no longer exists 2020-09-15 13:58:42 -07:00
Andrey Melnikov
a5e358ea61 Merge pull request #575 from onepanelio/test/github.actions
Test/GitHub.actions
2020-09-15 13:40:47 -07:00
Andrey Melnikov
a3ef3d410a fix: push dev image only on master branch 2020-09-15 13:35:53 -07:00
Andrey Melnikov
c270283c42 fix: build docker image depends on testing 2020-09-15 13:26:07 -07:00
Aleksandr Melnikov
2093b565eb Adding code to pull the capacity that can be allocated for the selected
node.
We then request 90% of this capacity, so the node schedules properly.

Gotcha: Note that this requires the node to be already running.
If there are no nodes running and have to be scaled up, our code
cannot get the capacity information for that node at this time.
2020-09-15 12:54:13 -07:00
Andrey Melnikov
0b4b5c8050 test: on all push 2020-09-15 12:31:00 -07:00
Andrey Melnikov
1781e2774d test: unit test then docker image build 2020-09-15 12:28:47 -07:00
Rush Tehrani
d87e6e49db Merge pull request #574 from rushtehrani/master
docs: Update build status badge
2020-09-14 19:35:08 -07:00
Rush Tehrani
a1c58477bd Update build status badge 2020-09-14 19:22:40 -07:00
Andrey Melnikov
f90b45437a Merge pull request #573 from onepanelio/fix/github.actions.dev
fix: for master push, release a new dev image only
2020-09-14 17:50:55 -07:00
Andrey Melnikov
85fb89862b fix: for master push, release a new dev image only 2020-09-14 17:50:17 -07:00
Andrey Melnikov
c30f48811d Merge pull request #569 from onepanelio/onepanelio/core.365-retry
feat: added retry last action support for workspaces
2020-09-14 15:46:33 -07:00
Andrey Melnikov
0170252659 fix: api version to 0.13.0 2020-09-14 15:41:06 -07:00
Rush Tehrani
498eed6aca Merge pull request #570 from rushtehrani/master
docs: Update README
2020-09-11 17:46:15 -07:00
Rush Tehrani
e01842c922 Update README.md 2020-09-11 16:05:48 -07:00
Andrey Melnikov
8f12351761 clean: removed debugging comment 2020-09-11 13:11:19 -07:00
Rush Tehrani
a22bdcc6f5 Update README.md 2020-09-11 12:24:05 -07:00
Rush Tehrani
766815da1f Update README.md 2020-09-11 12:23:08 -07:00
Aleksandr Melnikov
a84d74d256 Fixing the constant used for injecting the extra container. 2020-09-10 22:50:37 -07:00
Aleksandr Melnikov
6e6b70aeb7 Adding more constants. 2020-09-10 22:50:25 -07:00
Aleksandr Melnikov
a78138c562 Adding nvidia resource example.
- Note that the request and limit are both necessary.
2020-09-10 15:53:28 -07:00
Aleksandr Melnikov
6167d5ef65 Using a constant instead of a hard-coded string. 2020-09-10 15:53:05 -07:00
Aleksandr Melnikov
ce52f9914e Adding constants for WorkspaceTemplate. 2020-09-10 15:52:54 -07:00
Aleksandr Melnikov
ed54cb9a3f Adding proof of concept resource request to Workspace template.
- An extra container is added to a given workspace.
This container has the resource requests assigned to it.

Note that the container sleeps forever in a while-loop, so
that the workspace notes it's ready.
- If the container does not sleep, it goes into a crash loop of restarting.
The container exits successfully, and gets restarted.
2020-09-10 13:48:31 -07:00
Andrey Melnikov
fc7ef5ffac feat: added retry last action support for workspaces and new failure states 2020-09-10 12:30:18 -07:00
Andrey Melnikov
1c16a5e743 Merge pull request #568 from onepanelio/fix/github.actions.v2
Merge pull request #565 from onepanelio/fix/github.actions
2020-09-08 14:19:55 -07:00
Andrey Melnikov
9b25fd4190 Merge pull request #565 from onepanelio/fix/github.actions
fix: changed workflows since master branch is now development
2020-09-08 14:18:13 -07:00
Rush Tehrani
076422e8ac Merge pull request #567 from onepanelio/dev
chore: dev > master
2020-09-08 14:11:08 -07:00
Andrey Melnikov
5464dc71ac Merge pull request #566 from onepanelio/revert-565-fix/github.actions
Revert "fix: changed workflows since master branch is now development"
2020-09-08 14:05:02 -07:00
Andrey Melnikov
3a0af4c727 Revert "fix: changed workflows since master branch is now development" 2020-09-08 14:04:28 -07:00
Andrey Melnikov
f4879a4228 Merge pull request #565 from onepanelio/fix/github.actions
fix: changed workflows since master branch is now development
2020-09-08 14:04:04 -07:00
Andrey Melnikov
4135b86928 update: changed workflows since master branch is now development 2020-09-08 13:58:37 -07:00
rushtehrani
ac51146dbc add more features to README 2020-09-08 11:12:26 -07:00
rushtehrani
575dbc1507 add features 2020-09-08 11:12:08 -07:00
rushtehrani
8810b2c226 update README 2020-09-08 11:11:40 -07:00
rushtehrani
95cc0c3622 update README and build name 2020-09-08 11:10:57 -07:00
rushtehrani
48a68083dc chore: move util/sql to pkg/util/sql 2020-09-08 11:10:05 -07:00
Aleksandr Melnikov
029469e031 Changing the secret "key" value.
- Otherwise, the workflow can't get access to GCS bucket.
2020-09-08 11:10:05 -07:00
Andrey Melnikov
c2d665ac8b feat: upgraded cvat template with new filesyncer changes 2020-09-08 11:10:05 -07:00
Rush Tehrani
0fff409d0f Merge pull request #563 from onepanelio/docs/update-readme
docs: Update README
2020-09-08 11:07:18 -07:00
rushtehrani
abf301093e Update some README sections 2020-09-07 15:02:13 -07:00
rushtehrani
91b79a1d33 Add note about CPU/GPU nodes to README 2020-09-05 19:59:35 -07:00
rushtehrani
c92781b5c8 Add note about CPU/GPU nodes to README 2020-09-04 15:50:21 -07:00
Rush Tehrani
858c299604 Merge pull request #559 from onepanelio/docs/update-readme
docs: Update README
2020-09-04 12:26:55 -07:00
rushtehrani
94a91fc543 fix typo and grammar 2020-09-04 12:21:50 -07:00
Rush Tehrani
18a7c3fa99 Merge pull request #562 from onepanelio/dsdon10-patch-2
docs: Update README.md
2020-09-04 12:01:58 -07:00
Donald Scott
06fe267366 Update README.md 2020-09-04 11:59:53 -07:00
Rush Tehrani
35e4d1fc5b Merge pull request #561 from inohmonton99/docs/update-readme
docs: Update README.md
2020-09-04 11:57:14 -07:00
Rush Tehrani
b54e464c4a Merge branch 'docs/update-readme' into docs/update-readme 2020-09-04 11:57:01 -07:00
Inoh Francis Monton
735baac10d Update README.md 2020-09-05 02:54:38 +08:00
Rush Tehrani
edd1d474b1 Merge pull request #560 from onepanelio/dsdon10-patch-2
docs: Update README.md
2020-09-04 11:53:07 -07:00
Donald Scott
150da5654b Update README.md 2020-09-04 11:51:29 -07:00
Donald Scott
ee67c8713b Update README.md 2020-09-04 11:47:20 -07:00
Rush Tehrani
4a16b4e031 Update README.md 2020-09-04 11:46:14 -07:00
Savan Visalpara
0e3626b25a update text in README 2020-09-04 13:29:25 -05:00
rushtehrani
597a03ffc2 fix README typo 2020-09-04 10:58:02 -07:00
rushtehrani
88595d6b4c add additional sections to README 2020-09-04 10:37:44 -07:00
rushtehrani
f1bbd0e884 update template engine text in README 2020-09-03 16:23:51 -07:00
rushtehrani
4ee679cf9f update README 2020-09-03 15:49:58 -07:00
Rush Tehrani
26b6e045de Merge pull request #557 from onepanelio/docs/update-readme
docs: Update README
2020-09-02 11:56:03 -07:00
rushtehrani
4a3a754585 update README 2020-09-02 11:50:40 -07:00
Rush Tehrani
4543c84170 Merge pull request #556 from onepanelio/docs/update-readme
docs: Update README
2020-09-02 11:45:10 -07:00
rushtehrani
b2a70c46d3 fix md table 2020-09-02 11:35:39 -07:00
rushtehrani
3ede228aa9 fix typos 2020-09-02 11:20:56 -07:00
rushtehrani
4a67aa103f update community section 2020-09-02 11:18:18 -07:00
rushtehrani
4129466236 fix typo 2020-09-01 19:58:29 -07:00
rushtehrani
79b3ed6a49 update contributing section 2020-09-01 19:40:19 -07:00
rushtehrani
853c50dea2 add note about TensorBoard 2020-09-01 16:46:43 -07:00
rushtehrani
f23aa928d8 add more features to README 2020-09-01 16:38:54 -07:00
rushtehrani
a1872b8554 add features 2020-09-01 12:36:55 -07:00
Rush Tehrani
99c42034b7 Merge pull request #520 from onepanelio/chore/move-sql-util
chore: move util/sql to pkg/util/sql
2020-09-01 08:29:51 -07:00
Rush Tehrani
5e5f6bd51b Merge pull request #548 from onepanelio/fix/workflows.fail.using.gcs
fix: Updating code that injects the location of the serviceAccountToken if Google Cloud Storage is used.
2020-09-01 08:29:10 -07:00
rushtehrani
a33c18c479 update README 2020-08-31 17:10:06 -07:00
rushtehrani
e882d4270f update README and build name 2020-08-31 15:48:42 -07:00
Rush Tehrani
86fc90cd6b Merge pull request #550 from onepanelio/feat/migraitons.updates.dev
feat: upgraded cvat template with new filesyncer changes
2020-08-26 19:17:49 -07:00
Andrey Melnikov
4a93177b5c feat: upgraded cvat template with new filesyncer changes 2020-08-26 19:08:48 -07:00
Aleksandr Melnikov
7239e6620b Changing the secret "key" value.
- Otherwise, the workflow can't get access to GCS bucket.
2020-08-26 13:50:47 -07:00
Andrey Melnikov
cbecaf6fa1 Merge pull request #546 from onepanelio/dev
feat: update master with latest release changes 0.12.0
2020-08-25 16:33:45 -07:00
Rush Tehrani
de7f060c81 Merge pull request #537 from onepanelio/feat/core.415-jupyter.lab.workspace
feat: Added migration for new Jupyterlab Workspace, 1.0.1
2020-08-25 16:30:07 -07:00
Rush Tehrani
c723a3270f Remove TensorBoard, it can be run in the notebook 2020-08-25 16:29:38 -07:00
Rush Tehrani
24bb7cb0a5 Merge pull request #545 from onepanelio/feat/cvat.update
fix: cvat to 0.12.0_cvat.1.0.0
2020-08-25 15:56:56 -07:00
Andrey Melnikov
a51d4b662e update: documentation 2020-08-25 15:49:04 -07:00
Andrey Melnikov
6e72b550b1 update: cvat to 0.12.0_cvat.1.0.0 2020-08-25 15:47:41 -07:00
Aleksandr Melnikov
1f95b87699 Using a fixed image. 2020-08-25 15:36:09 -07:00
Rush Tehrani
8258c5f19b Merge pull request #544 from onepanelio/fix/fix.regression
fix: Fixing code that was removed during a merge and caused a regression.
2020-08-25 15:19:10 -07:00
Aleksandr Melnikov
e61341c50a Fixing merge removed code. 2020-08-25 15:13:02 -07:00
Rush Tehrani
8c0a763404 Merge pull request #542 from onepanelio/fix/update.migrations.to.support.more.than.s3
fix: Adding support for different bucket storages in the db migrations
2020-08-25 14:45:20 -07:00
Aleksandr Melnikov
76bc226a2e Merge branch 'dev' into fix/update.migrations.to.support.more.than.s3 2020-08-25 14:25:06 -07:00
Andrey Melnikov
e1dd4b8ed1 Merge pull request #543 from onepanelio/fix/migrations.namespaces
fix: issue where migrations crashed with multiple namespaces
2020-08-25 12:50:00 -07:00
Aleksandr Melnikov
1e3b9ca278 Merge branch 'dev' into feat/core.415-jupyter.lab.workspace 2020-08-25 12:46:42 -07:00
Andrey Melnikov
cde5b54830 fix: issue where workspace templates were changed during update, resulting in crash if more than one namespace attempted updates. 2020-08-25 12:45:11 -07:00
Aleksandr Melnikov
d2adb109e1 Adding comment for function. 2020-08-25 11:32:33 -07:00
Aleksandr Melnikov
6eac7f2c74 Adding support for different bucket storages.
- Updating various migrations
- Adding helper function
2020-08-25 10:55:43 -07:00
Andrey Melnikov
9e4eb59cec Merge pull request #538 from onepanelio/feat/update.migrations
feat: updated migrations for cvat, tf od training, maskrcnn
2020-08-24 11:43:10 -07:00
Andrey Melnikov
0ccd871e54 update: templates 2020-08-24 11:08:20 -07:00
Andrey Melnikov
4bb205257a fix: tf-object detection training template 2020-08-24 10:46:52 -07:00
Andrey Melnikov
bbbf1c0d6a chore: docs for latest migrations 2020-08-24 10:29:26 -07:00
Andrey Melnikov
f9b23a7d2a feat: updated migrations for cvat, tf object detection training, maskrcnn 2020-08-24 10:24:56 -07:00
Rush Tehrani
53c88c8390 Fix postExecutionWorkflow 2020-08-24 10:22:24 -07:00
Aleksandr Melnikov
b7e4281eeb Adding migration for new jupyterlab workspace. 2020-08-21 16:46:19 -07:00
Andrey Melnikov
f533ce01b3 Merge pull request #527 from onepanelio/fix/permissions.messages
feat: permissions issues are now more detailed in API responses
2020-08-21 12:54:03 -07:00
Andrey Melnikov
abba7b5476 Merge pull request #530 from onepanelio/fix/migration.template
fix: issue where migration crashed
2020-08-20 13:21:07 -07:00
Andrey Melnikov
96861e19d3 fix: issue where migration crashed because a workflow template did not yet exist 2020-08-20 12:56:52 -07:00
Aleksandr Melnikov
f797e93821 Merge pull request #528 from onepanelio/fix/tfod-workflow-name
fix: Update TF object detection workflow name
2020-08-19 12:44:50 -07:00
Rush Tehrani
e5586fcf76 fix: Update TF object detection workflow name 2020-08-19 12:38:01 -07:00
Andrey Melnikov
93d1b4a2c0 update: permissions issues are now more detailed 2020-08-19 11:00:40 -07:00
Andrey Melnikov
df1421c6c4 Merge pull request #524 from onepanelio/fix/workspace.core.ip
fix: extra import
2020-08-17 16:25:14 -07:00
Andrey Melnikov
cfbd92b65f fix: extra import 2020-08-17 16:22:23 -07:00
Rush Tehrani
bd5bea5f3a Merge pull request #523 from onepanelio/fix/workspace.core.ip
fix: update core pod host to use name instead of static value
2020-08-17 16:17:49 -07:00
Andrey Melnikov
5d3345ded2 update: removed port since default is 80 2020-08-17 16:17:10 -07:00
Andrey Melnikov
0274785f72 fix: removed port environment variable as it is no longer needed since host is not using an environment variable 2020-08-17 16:14:30 -07:00
Andrey Melnikov
bcec3c13fd fix: update core pod host to use string instead of environment variable which evaluates to a static ip 2020-08-17 16:07:47 -07:00
rushtehrani
62b3e64df5 chore: move util/sql to pkg/util/sql 2020-08-17 10:09:24 -07:00
Andrey Melnikov
7c6708849f Merge pull request #517 from onepanelio/fix/tfod-template
fix: Update TFOD migration
2020-08-17 10:02:32 -07:00
Rush Tehrani
811f86633a Remove num of classes hint as that is in the docs 2020-08-15 17:31:18 -07:00
Rush Tehrani
4ed14f9baf Update TFOD migration 2020-08-15 16:57:51 -07:00
Andrey Melnikov
c0ad80a185 Merge pull request #514 from onepanelio/fix/migrations.issues
fix: migrations to include latest cvat image and descriptions
2020-08-14 16:41:50 -07:00
Andrey Melnikov
9e694f1c34 chore: documentation for migrations 2020-08-14 16:38:02 -07:00
Andrey Melnikov
4e92586024 update: migrations to include latest cvat and add descriptions 2020-08-14 16:30:57 -07:00
Andrey Melnikov
b62271ddba fix: migrations missing labels 2020-08-14 15:52:29 -07:00
Andrey Melnikov
d1a119b6de fix: issue with migration crashing 2020-08-14 15:43:07 -07:00
Andrey Melnikov
0ffa3aee32 Merge pull request #383 from onepanelio/dev
fix: migration issue (into master)
2020-06-29 22:21:52 -07:00
Andrey Melnikov
35982bf85a Merge pull request #381 from onepanelio/dev
feat: v0.11.0
2020-06-29 11:08:18 -07:00
Rush Tehrani
ecadd189a2 Create issue_label_bot.yaml 2020-06-07 12:33:05 -07:00
Rush Tehrani
b68de30418 Merge pull request #321 from onepanelio/dev
chore: dev > master  (v0.10.0)
2020-06-05 13:06:29 -07:00
Rush Tehrani
dedc295441 Update LICENSE 2020-06-04 19:50:39 -07:00
Rush Tehrani
2108691f68 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 18:26:20 -07:00
Rush Tehrani
0262a9ec90 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 16:01:17 -07:00
Rush Tehrani
c6c8e80516 Delete badge.yaml 2020-06-04 15:54:12 -07:00
Rush Tehrani
9381dd0a85 Update badge.yaml 2020-06-04 14:52:37 -07:00
Rush Tehrani
b6f7118a43 Create badge.yaml 2020-06-04 12:56:27 -07:00
Rush Tehrani
f7b941f8a0 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 12:52:45 -07:00
Rush Tehrani
e00a54c24e Create semantic.yml 2020-06-03 16:04:19 -07:00
rushtehrani
8d29cd0c5c remove extra space 2020-06-02 14:32:34 -07:00
rushtehrani
dafaadd80a fix kind 2020-06-02 14:26:10 -07:00
rushtehrani
4f036468b0 add PR template 2020-06-02 14:14:45 -07:00
Rush Tehrani
8df966fcee Create PULL_REQUEST_TEMPLATE.md 2020-06-02 14:10:45 -07:00
Rush Tehrani
cfd9bc6f43 Add badge 2020-05-25 13:38:05 -07:00
Rush Tehrani
3ee8497cac Merge pull request #258 from onepanelio/develop
dev > master
2020-05-25 13:37:08 -07:00
101 changed files with 7740 additions and 1232 deletions

27
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,27 @@
<!-- Thanks for sending a pull request! Here are some tips for you:
1. Please read our contributor guidelines: https://docs.onepanel.ai/docs/getting-started/contributing
2. Prefix the title of this PR with `feat:`, `fix:`, `docs:` or `chore:`, example: `feat: added great feature`
3. If this PR is a feature or enhancement, then create an issue (https://github.com/onepanelio/core/issues) first.
-->
**What this PR does**:
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes onepanelio/core#<issue-number>`
-->
Fixes onepanelio/core#
**Special notes for your reviewer**:
**Checklist**
Please check if applies
- [ ] I have added/updated relevant unit tests
- [ ] I have added/updated relevant documentation
Required
- [ ] I accept to release these changes under the Apache 2.0 License

4
.github/issue_label_bot.yaml vendored Normal file
View File

@@ -0,0 +1,4 @@
label-alias:
bug: 'kind/bug'
feature_request: 'kind/enhancement'
question: 'kind/question'

1
.github/semantic.yml vendored Normal file
View File

@@ -0,0 +1 @@
titleOnly: true

View File

@@ -2,9 +2,30 @@ name: Publish dev docker image
on:
push:
branches:
- dev
- master
jobs:
test-code-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.3
env:
POSTGRES_DB: onepanel
POSTGRES_USER: admin
POSTGRES_PASSWORD: tester
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@master
- name: Run testing code
uses: cedrickring/golang-action@1.5.2
with:
args: go test github.com/onepanelio/core/pkg -db=postgres
build:
needs: test-code-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
@@ -12,5 +33,6 @@ jobs:
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
tags: "dev"
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

View File

@@ -1,39 +1,29 @@
name: Build and publish to Docker Hub
name: Publish docker image on tag push
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Bump version and push tag
id: version_bump
uses: anothrNick/github-tag-action@1.17.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: 'minor'
- name: Alias New tag to VERSION
run: echo "::set-env name=VERSION::${{ steps.version_bump.outputs.new_tag }}"
- uses: olegtarasov/get-tag@v2
id: tagName
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
buildargs: VERSION
tags: ${{ steps.version_bump.outputs.new_tag }}, latest
tags: "${{ env.GIT_TAG_NAME }}"
- name: Set Slack Message
run: echo "::set-env name=SLACK_MESSAGE::Version $VERSION. Docker Tag onepanel/core:$VERSION"
run: echo "::set-env name=SLACK_MESSAGE::Tag $GIT_TAG_NAME. Docker Tag onepanel/core:$GIT_TAG_NAME"
- name: Notify Slack Channels
uses: rtCamp/action-slack-notify@v2.0.0
env:
SLACK_CHANNEL: dev
SLACK_CHANNEL: org
SLACK_ICON: https://avatars1.githubusercontent.com/u/30390575?s=48&v=4
SLACK_TITLE: New Core Version
SLACK_USERNAME: opBot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -1,26 +0,0 @@
name: Run Unit Tests
on:
push:
branches:
- test/docker.database
jobs:
test-code-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.3
env:
POSTGRES_DB: onepanel
POSTGRES_USER: admin
POSTGRES_PASSWORD: tester
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@master
- name: Run testing code
uses: cedrickring/golang-action@1.5.2
with:
args: go test github.com/onepanelio/core/pkg -db=postgres

View File

@@ -1,3 +1,5 @@
Copyright 2020 Onepanel, Inc. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

View File

@@ -33,6 +33,11 @@ docker-build:
docker-push:
docker push onepanel/core:$(COMMIT_HASH)
docker-custom:
docker build -t onepanel-core .
docker tag onepanel-core:latest onepanel/core:$(TAG)
docker push onepanel/core:$(TAG)
docker: docker-build docker-push
run-tests:

View File

@@ -1,13 +1,84 @@
# Onepanel
<img width="240px" src="img/logo.png">
Welcome to Onepanel! This is the main repository for the API. It is also where you can submit bugs and enhancement requests.
![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)
[![release](https://img.shields.io/github/v/release/onepanelio/core?color=01579b)](https://github.com/onepanelio/core/releases)
[![sdk](https://img.shields.io/pypi/v/onepanel-sdk?color=01579b&label=sdk)](https://pypi.org/project/onepanel-sdk/)
[![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-dicussions-01579b)](https://github.com/onepanelio/core/discussions)
[![license](https://img.shields.io/github/license/onepanelio/core?color=01579b)](https://opensource.org/licenses/Apache-2.0)
## Getting started
See our [Quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started.
Production scale vision AI platform with fully integrated components for model building, automated labeling, data processing and model training pipelines.
<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
## Features
- Annotate images and video with automatic annotation of bounding boxes and polygon masks, integrated with training pipelines to iteratively improve models for pre-annotation and inference.
- JupyterLab configured with extensions for debugging, Git/GitHub, notebook diffing and TensorBoard and support for Conda, OpenCV, Tensorflow and PyTorch with GPU and <a href="https://github.com/onepanelio/templates/tree/master/workspaces/jupyterlab">much more</a>.
- 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 that this is a shared demo environment with the following restrictions:
- Data is reset every few hours
- One type of node pool (machine type) with a limit of 5 concurrent nodes
- Certain actions may be restricted
## Quick start
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started with the platform of your choice.
### 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)
## 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 [GitHub discussions](https://github.com/onepanelio/core/discussions).
## Contributing
See our [Contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) to get started.
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/core-ui/) - 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.
## Acknowledgments
Onepanel uses the excellent [Argo](https://github.com/argoproj/argo) project under the hood to orchestrate workflows.
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.
[Argo](https://github.com/argoproj/argo)\
[CVAT](https://github.com/opencv/cvat)\
[JupyterLab](https://github.com/jupyterlab/jupyterlab)
## 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.

View File

@@ -3,7 +3,7 @@
"info": {
"title": "Onepanel",
"description": "Onepanel API",
"version": "0.12.0-rc.0",
"version": "0.15.0",
"contact": {
"name": "Onepanel project",
"url": "https://github.com/onepanelio/core"
@@ -54,6 +54,39 @@
]
}
},
"/apis/v1beta1/auth/get_access_token": {
"post": {
"operationId": "GetAccessToken",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetAccessTokenResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GetAccessTokenRequest"
}
}
],
"tags": [
"AuthService"
],
"security": []
}
},
"/apis/v1beta1/auth/token": {
"post": {
"operationId": "IsValidToken",
@@ -77,7 +110,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TokenWrapper"
"$ref": "#/definitions/IsValidTokenRequest"
}
}
],
@@ -108,6 +141,54 @@
]
}
},
"/apis/v1beta1/labels/{namespace}/{resource}/labels": {
"get": {
"operationId": "GetAvailableLabels",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetLabelsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "resource",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "keyLike",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "skipKeys",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"LabelService"
]
}
},
"/apis/v1beta1/namespaces": {
"get": {
"operationId": "ListNamespaces",
@@ -863,6 +944,31 @@
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "order",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "labels",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "phase",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "includeSystem",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
@@ -906,6 +1012,36 @@
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/statistics": {
"get": {
"operationId": "GetWorkflowExecutionStatisticsForNamespace",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetWorkflowExecutionStatisticsForNamespaceResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{uid}": {
"get": {
"operationId": "GetWorkflowExecution",
@@ -1794,6 +1930,36 @@
]
}
},
"/apis/v1beta1/{namespace}/workspace/statistics": {
"get": {
"operationId": "GetWorkspaceStatisticsForNamespace",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetWorkspaceStatisticsForNamespaceResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkspaceService"
]
}
},
"/apis/v1beta1/{namespace}/workspace_templates": {
"get": {
"operationId": "ListWorkspaceTemplates",
@@ -1831,6 +1997,24 @@
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "order",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "labels",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "uid",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
@@ -2112,6 +2296,24 @@
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "order",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "labels",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "phase",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
@@ -2339,6 +2541,42 @@
]
}
},
"/apis/v1beta1/{namespace}/workspaces/{uid}/retry": {
"put": {
"operationId": "RetryLastWorkspaceAction",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkspaceService"
]
}
},
"/apis/v1beta1/{namespace}/workspaces/{uid}/status": {
"put": {
"operationId": "UpdateWorkspaceStatus",
@@ -2726,6 +2964,31 @@
}
}
},
"GetAccessTokenRequest": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"GetAccessTokenResponse": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"GetConfigResponse": {
"type": "object",
"properties": {
@@ -2765,6 +3028,22 @@
}
}
},
"GetWorkflowExecutionStatisticsForNamespaceResponse": {
"type": "object",
"properties": {
"stats": {
"$ref": "#/definitions/WorkflowExecutionStatisticReport"
}
}
},
"GetWorkspaceStatisticsForNamespaceResponse": {
"type": "object",
"properties": {
"stats": {
"$ref": "#/definitions/WorkspaceStatisticReport"
}
}
},
"IsAuthorized": {
"type": "object",
"properties": {
@@ -2794,11 +3073,28 @@
}
}
},
"IsValidTokenRequest": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"IsValidTokenResponse": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"token": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
@@ -3221,14 +3517,6 @@
}
}
},
"TokenWrapper": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"UpdateSecretKeyValueResponse": {
"type": "object",
"properties": {
@@ -3442,6 +3730,70 @@
}
}
},
"WorkspaceStatisticReport": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32"
},
"lastCreated": {
"type": "string"
},
"launching": {
"type": "integer",
"format": "int32"
},
"running": {
"type": "integer",
"format": "int32"
},
"updating": {
"type": "integer",
"format": "int32"
},
"pausing": {
"type": "integer",
"format": "int32"
},
"paused": {
"type": "integer",
"format": "int32"
},
"terminating": {
"type": "integer",
"format": "int32"
},
"terminated": {
"type": "integer",
"format": "int32"
},
"failedToPause": {
"type": "integer",
"format": "int32"
},
"failedToResume": {
"type": "integer",
"format": "int32"
},
"failedToTerminate": {
"type": "integer",
"format": "int32"
},
"failedToLaunch": {
"type": "integer",
"format": "int32"
},
"failedToUpdate": {
"type": "integer",
"format": "int32"
},
"failed": {
"type": "integer",
"format": "int32"
}
}
},
"WorkspaceStatus": {
"type": "object",
"properties": {

View File

@@ -9,7 +9,7 @@ package api
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/empty"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -31,6 +31,124 @@ const (
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type IsValidTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *IsValidTokenRequest) Reset() {
*x = IsValidTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenRequest) ProtoMessage() {}
func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_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 IsValidTokenRequest.ProtoReflect.Descriptor instead.
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0}
}
func (x *IsValidTokenRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *IsValidTokenRequest) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type IsValidTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
}
func (x *IsValidTokenResponse) Reset() {
*x = IsValidTokenResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenResponse) ProtoMessage() {}
func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_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 IsValidTokenResponse.ProtoReflect.Descriptor instead.
func (*IsValidTokenResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1}
}
func (x *IsValidTokenResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *IsValidTokenResponse) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *IsValidTokenResponse) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
type IsAuthorized struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -46,7 +164,7 @@ type IsAuthorized struct {
func (x *IsAuthorized) Reset() {
*x = IsAuthorized{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[0]
mi := &file_auth_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -59,7 +177,7 @@ func (x *IsAuthorized) String() string {
func (*IsAuthorized) ProtoMessage() {}
func (x *IsAuthorized) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[0]
mi := &file_auth_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -72,7 +190,7 @@ func (x *IsAuthorized) ProtoReflect() protoreflect.Message {
// Deprecated: Use IsAuthorized.ProtoReflect.Descriptor instead.
func (*IsAuthorized) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0}
return file_auth_proto_rawDescGZIP(), []int{2}
}
func (x *IsAuthorized) GetNamespace() string {
@@ -121,7 +239,7 @@ type IsAuthorizedRequest struct {
func (x *IsAuthorizedRequest) Reset() {
*x = IsAuthorizedRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[1]
mi := &file_auth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -134,7 +252,7 @@ func (x *IsAuthorizedRequest) String() string {
func (*IsAuthorizedRequest) ProtoMessage() {}
func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[1]
mi := &file_auth_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -147,7 +265,7 @@ func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use IsAuthorizedRequest.ProtoReflect.Descriptor instead.
func (*IsAuthorizedRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1}
return file_auth_proto_rawDescGZIP(), []int{3}
}
func (x *IsAuthorizedRequest) GetIsAuthorized() *IsAuthorized {
@@ -168,7 +286,7 @@ type IsAuthorizedResponse struct {
func (x *IsAuthorizedResponse) Reset() {
*x = IsAuthorizedResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[2]
mi := &file_auth_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -181,7 +299,7 @@ func (x *IsAuthorizedResponse) String() string {
func (*IsAuthorizedResponse) ProtoMessage() {}
func (x *IsAuthorizedResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[2]
mi := &file_auth_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -194,7 +312,7 @@ func (x *IsAuthorizedResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use IsAuthorizedResponse.ProtoReflect.Descriptor instead.
func (*IsAuthorizedResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{2}
return file_auth_proto_rawDescGZIP(), []int{4}
}
func (x *IsAuthorizedResponse) GetAuthorized() bool {
@@ -204,110 +322,17 @@ func (x *IsAuthorizedResponse) GetAuthorized() bool {
return false
}
type TokenWrapper struct {
type GetAccessTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *TokenWrapper) Reset() {
*x = TokenWrapper{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TokenWrapper) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TokenWrapper) ProtoMessage() {}
func (x *TokenWrapper) ProtoReflect() protoreflect.Message {
mi := &file_auth_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 TokenWrapper.ProtoReflect.Descriptor instead.
func (*TokenWrapper) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{3}
}
func (x *TokenWrapper) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type IsValidTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *IsValidTokenRequest) Reset() {
*x = IsValidTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenRequest) ProtoMessage() {}
func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_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 IsValidTokenRequest.ProtoReflect.Descriptor instead.
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{4}
}
func (x *IsValidTokenRequest) GetToken() *TokenWrapper {
if x != nil {
return x.Token
}
return nil
}
type IsValidTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
}
func (x *IsValidTokenResponse) Reset() {
*x = IsValidTokenResponse{}
func (x *GetAccessTokenRequest) Reset() {
*x = GetAccessTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -315,13 +340,13 @@ func (x *IsValidTokenResponse) Reset() {
}
}
func (x *IsValidTokenResponse) String() string {
func (x *GetAccessTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenResponse) ProtoMessage() {}
func (*GetAccessTokenRequest) ProtoMessage() {}
func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -333,69 +358,161 @@ func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use IsValidTokenResponse.ProtoReflect.Descriptor instead.
func (*IsValidTokenResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use GetAccessTokenRequest.ProtoReflect.Descriptor instead.
func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{5}
}
func (x *IsValidTokenResponse) GetDomain() string {
func (x *GetAccessTokenRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *GetAccessTokenRequest) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type GetAccessTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
}
func (x *GetAccessTokenResponse) Reset() {
*x = GetAccessTokenResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccessTokenResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccessTokenResponse) ProtoMessage() {}
func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[6]
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 GetAccessTokenResponse.ProtoReflect.Descriptor instead.
func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{6}
}
func (x *GetAccessTokenResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *GetAccessTokenResponse) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (x *GetAccessTokenResponse) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
var File_auth_proto protoreflect.FileDescriptor
var file_auth_proto_rawDesc = []byte{
0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 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, 0x96, 0x01, 0x0a,
0x0c, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 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, 0x12, 0x0a, 0x04, 0x76,
0x65, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12,
0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0c,
0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
0x7a, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0c, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x22, 0x3e, 0x0a, 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x22, 0x2e, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x32, 0xea, 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x6c, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x18,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75,
0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x6d, 0x0a, 0x0c, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12,
0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x12, 0x2f, 0x61,
0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68,
0x3a, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67,
0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a,
0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x60, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x49, 0x73, 0x41,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 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, 0x12, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a,
0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d,
0x65, 0x22, 0x4c, 0x0a, 0x13, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x73, 0x41, 0x75,
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
0x64, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22,
0x36, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x63,
0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73,
0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x32, 0xe6, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22,
0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61,
0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x7e, 0x0a, 0x0e,
0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22,
0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61,
0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0x02, 0x62, 0x00, 0x12, 0x6d, 0x0a, 0x0c,
0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x18, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x3a, 0x0c, 0x69,
0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@@ -410,27 +527,29 @@ func file_auth_proto_rawDescGZIP() []byte {
return file_auth_proto_rawDescData
}
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_auth_proto_goTypes = []interface{}{
(*IsAuthorized)(nil), // 0: api.IsAuthorized
(*IsAuthorizedRequest)(nil), // 1: api.IsAuthorizedRequest
(*IsAuthorizedResponse)(nil), // 2: api.IsAuthorizedResponse
(*TokenWrapper)(nil), // 3: api.TokenWrapper
(*IsValidTokenRequest)(nil), // 4: api.IsValidTokenRequest
(*IsValidTokenResponse)(nil), // 5: api.IsValidTokenResponse
(*IsValidTokenRequest)(nil), // 0: api.IsValidTokenRequest
(*IsValidTokenResponse)(nil), // 1: api.IsValidTokenResponse
(*IsAuthorized)(nil), // 2: api.IsAuthorized
(*IsAuthorizedRequest)(nil), // 3: api.IsAuthorizedRequest
(*IsAuthorizedResponse)(nil), // 4: api.IsAuthorizedResponse
(*GetAccessTokenRequest)(nil), // 5: api.GetAccessTokenRequest
(*GetAccessTokenResponse)(nil), // 6: api.GetAccessTokenResponse
}
var file_auth_proto_depIdxs = []int32{
0, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized
3, // 1: api.IsValidTokenRequest.token:type_name -> api.TokenWrapper
4, // 2: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
1, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest
5, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
2, // 5: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse
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
2, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized
0, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
5, // 2: api.AuthService.GetAccessToken:input_type -> api.GetAccessTokenRequest
3, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest
1, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
6, // 5: api.AuthService.GetAccessToken:output_type -> api.GetAccessTokenResponse
4, // 6: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] 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
}
func init() { file_auth_proto_init() }
@@ -440,54 +559,6 @@ func file_auth_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorized); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TokenWrapper); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenRequest); i {
case 0:
return &v.state
@@ -499,7 +570,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenResponse); i {
case 0:
return &v.state
@@ -511,6 +582,66 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorized); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccessTokenRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccessTokenResponse); 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{
@@ -518,7 +649,7 @@ func file_auth_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_auth_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
@@ -545,6 +676,7 @@ const _ = grpc.SupportPackageIsVersion6
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AuthServiceClient interface {
IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error)
GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error)
IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error)
}
@@ -565,6 +697,15 @@ func (c *authServiceClient) IsValidToken(ctx context.Context, in *IsValidTokenRe
return out, nil
}
func (c *authServiceClient) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) {
out := new(GetAccessTokenResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/GetAccessToken", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) {
out := new(IsAuthorizedResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/IsAuthorized", in, out, opts...)
@@ -577,6 +718,7 @@ func (c *authServiceClient) IsAuthorized(ctx context.Context, in *IsAuthorizedRe
// AuthServiceServer is the server API for AuthService service.
type AuthServiceServer interface {
IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error)
GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error)
}
@@ -587,6 +729,9 @@ type UnimplementedAuthServiceServer struct {
func (*UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented")
}
func (*UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccessToken not implemented")
}
func (*UnimplementedAuthServiceServer) IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsAuthorized not implemented")
}
@@ -613,6 +758,24 @@ func _AuthService_IsValidToken_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _AuthService_GetAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccessTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).GetAccessToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/GetAccessToken",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).GetAccessToken(ctx, req.(*GetAccessTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_IsAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsAuthorizedRequest)
if err := dec(in); err != nil {
@@ -639,6 +802,10 @@ var _AuthService_serviceDesc = grpc.ServiceDesc{
MethodName: "IsValidToken",
Handler: _AuthService_IsValidToken_Handler,
},
{
MethodName: "GetAccessToken",
Handler: _AuthService_GetAccessToken_Handler,
},
{
MethodName: "IsAuthorized",
Handler: _AuthService_IsAuthorized_Handler,

View File

@@ -39,7 +39,7 @@ func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.M
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Token); err != nil && err != io.EOF {
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -56,7 +56,7 @@ func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler run
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Token); err != nil && err != io.EOF {
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -65,6 +65,40 @@ func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler run
}
func request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccessTokenRequest
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); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccessTokenRequest
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); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAccessToken(ctx, &protoReq)
return msg, metadata, err
}
func request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsAuthorizedRequest
var metadata runtime.ServerMetadata
@@ -124,6 +158,26 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
})
mux.Handle("POST", pattern_AuthService_GetAccessToken_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.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -205,6 +259,26 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
})
mux.Handle("POST", pattern_AuthService_GetAccessToken_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)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -231,11 +305,15 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
var (
pattern_AuthService_IsValidToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_AuthService_GetAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "get_access_token"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_AuthService_IsAuthorized_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_AuthService_IsValidToken_0 = runtime.ForwardResponseMessage
forward_AuthService_GetAccessToken_0 = runtime.ForwardResponseMessage
forward_AuthService_IsAuthorized_0 = runtime.ForwardResponseMessage
)

View File

@@ -3,24 +3,46 @@ syntax = "proto3";
package api;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "protoc-gen-swagger/options/annotations.proto";
service AuthService {
rpc IsValidToken(IsValidTokenRequest) returns (IsValidTokenResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth/token"
body: "token"
body: "*"
};
}
rpc GetAccessToken(GetAccessTokenRequest) returns (GetAccessTokenResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth/get_access_token"
body: "*"
};
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
security: {
}
};
}
rpc IsAuthorized(IsAuthorizedRequest) returns (IsAuthorizedResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth",
post: "/apis/v1beta1/auth"
body: "isAuthorized"
};
}
}
message IsValidTokenRequest {
string username = 1;
string token = 2;
}
message IsValidTokenResponse {
string domain = 1;
string token = 2;
string username = 3;
}
message IsAuthorized {
string namespace = 1;
string verb = 2;
@@ -37,14 +59,13 @@ message IsAuthorizedResponse {
bool authorized = 1;
}
message TokenWrapper {
string token = 1;
message GetAccessTokenRequest {
string username = 1;
string token = 2;
}
message IsValidTokenRequest {
TokenWrapper token = 1;
}
message IsValidTokenResponse {
message GetAccessTokenResponse {
string domain = 1;
string accessToken = 2;
string username = 3;
}

View File

@@ -337,6 +337,77 @@ func (x *GetLabelsRequest) GetUid() string {
return ""
}
type GetAvailableLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
KeyLike string `protobuf:"bytes,3,opt,name=keyLike,proto3" json:"keyLike,omitempty"`
SkipKeys string `protobuf:"bytes,4,opt,name=skipKeys,proto3" json:"skipKeys,omitempty"`
}
func (x *GetAvailableLabelsRequest) Reset() {
*x = GetAvailableLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAvailableLabelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAvailableLabelsRequest) ProtoMessage() {}
func (x *GetAvailableLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[5]
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 GetAvailableLabelsRequest.ProtoReflect.Descriptor instead.
func (*GetAvailableLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5}
}
func (x *GetAvailableLabelsRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetAvailableLabelsRequest) GetResource() string {
if x != nil {
return x.Resource
}
return ""
}
func (x *GetAvailableLabelsRequest) GetKeyLike() string {
if x != nil {
return x.KeyLike
}
return ""
}
func (x *GetAvailableLabelsRequest) GetSkipKeys() string {
if x != nil {
return x.SkipKeys
}
return ""
}
type GetLabelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -348,7 +419,7 @@ type GetLabelsResponse struct {
func (x *GetLabelsResponse) Reset() {
*x = GetLabelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[5]
mi := &file_label_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -361,7 +432,7 @@ func (x *GetLabelsResponse) String() string {
func (*GetLabelsResponse) ProtoMessage() {}
func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[5]
mi := &file_label_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -374,7 +445,7 @@ func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetLabelsResponse.ProtoReflect.Descriptor instead.
func (*GetLabelsResponse) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5}
return file_label_proto_rawDescGZIP(), []int{6}
}
func (x *GetLabelsResponse) GetLabels() []*KeyValue {
@@ -398,7 +469,7 @@ type DeleteLabelRequest struct {
func (x *DeleteLabelRequest) Reset() {
*x = DeleteLabelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[6]
mi := &file_label_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -411,7 +482,7 @@ func (x *DeleteLabelRequest) String() string {
func (*DeleteLabelRequest) ProtoMessage() {}
func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[6]
mi := &file_label_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -424,7 +495,7 @@ func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteLabelRequest.ProtoReflect.Descriptor instead.
func (*DeleteLabelRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{6}
return file_label_proto_rawDescGZIP(), []int{7}
}
func (x *DeleteLabelRequest) GetNamespace() string {
@@ -490,51 +561,69 @@ var file_label_proto_rawDesc = []byte{
0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b,
0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22,
0x72, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x32, 0x8d, 0x04, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x75, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c,
0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b,
0x65, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65,
0x79, 0x4c, 0x69, 0x6b, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79,
0x73, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x72, 0x0a,
0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x32, 0x98, 0x05, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x75, 0x0a,
0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x33, 0x12, 0x31, 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, 0x7b, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x31, 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, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b,
0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x09, 0x41,
0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41,
0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22,
0x31, 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, 0x7b, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52,
0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 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, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61,
0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 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, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d,
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6b,
0x65, 0x79, 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b,
0x1a, 0x31, 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, 0x7b, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x39, 0x2a, 0x37, 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, 0x7b,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -549,31 +638,34 @@ func file_label_proto_rawDescGZIP() []byte {
return file_label_proto_rawDescData
}
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_label_proto_goTypes = []interface{}{
(*KeyValue)(nil), // 0: api.KeyValue
(*Labels)(nil), // 1: api.Labels
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest
(*GetLabelsResponse)(nil), // 5: api.GetLabelsResponse
(*DeleteLabelRequest)(nil), // 6: api.DeleteLabelRequest
(*KeyValue)(nil), // 0: api.KeyValue
(*Labels)(nil), // 1: api.Labels
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest
(*GetAvailableLabelsRequest)(nil), // 5: api.GetAvailableLabelsRequest
(*GetLabelsResponse)(nil), // 6: api.GetLabelsResponse
(*DeleteLabelRequest)(nil), // 7: api.DeleteLabelRequest
}
var file_label_proto_depIdxs = []int32{
0, // 0: api.Labels.items:type_name -> api.KeyValue
1, // 1: api.AddLabelsRequest.labels:type_name -> api.Labels
1, // 2: api.ReplaceLabelsRequest.labels:type_name -> api.Labels
0, // 3: api.GetLabelsResponse.labels:type_name -> api.KeyValue
4, // 4: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest
2, // 5: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest
3, // 6: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest
6, // 7: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest
5, // 8: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse
5, // 9: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse
5, // 10: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse
5, // 11: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse
8, // [8:12] is the sub-list for method output_type
4, // [4:8] is the sub-list for method input_type
5, // 4: api.LabelService.GetAvailableLabels:input_type -> api.GetAvailableLabelsRequest
4, // 5: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest
2, // 6: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest
3, // 7: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest
7, // 8: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest
6, // 9: api.LabelService.GetAvailableLabels:output_type -> api.GetLabelsResponse
6, // 10: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse
6, // 11: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse
6, // 12: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse
6, // 13: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse
9, // [9:14] is the sub-list for method output_type
4, // [4:9] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
@@ -646,7 +738,7 @@ func file_label_proto_init() {
}
}
file_label_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetLabelsResponse); i {
switch v := v.(*GetAvailableLabelsRequest); i {
case 0:
return &v.state
case 1:
@@ -658,6 +750,18 @@ func file_label_proto_init() {
}
}
file_label_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetLabelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_label_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteLabelRequest); i {
case 0:
return &v.state
@@ -676,7 +780,7 @@ func file_label_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_label_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
@@ -702,6 +806,7 @@ const _ = grpc.SupportPackageIsVersion6
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LabelServiceClient interface {
GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
@@ -716,6 +821,15 @@ func NewLabelServiceClient(cc grpc.ClientConnInterface) LabelServiceClient {
return &labelServiceClient{cc}
}
func (c *labelServiceClient) GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/GetAvailableLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/GetLabels", in, out, opts...)
@@ -754,6 +868,7 @@ func (c *labelServiceClient) DeleteLabel(ctx context.Context, in *DeleteLabelReq
// LabelServiceServer is the server API for LabelService service.
type LabelServiceServer interface {
GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error)
GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error)
AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error)
ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error)
@@ -764,6 +879,9 @@ type LabelServiceServer interface {
type UnimplementedLabelServiceServer struct {
}
func (*UnimplementedLabelServiceServer) GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAvailableLabels not implemented")
}
func (*UnimplementedLabelServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented")
}
@@ -781,6 +899,24 @@ func RegisterLabelServiceServer(s *grpc.Server, srv LabelServiceServer) {
s.RegisterService(&_LabelService_serviceDesc, srv)
}
func _LabelService_GetAvailableLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAvailableLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).GetAvailableLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/GetAvailableLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).GetAvailableLabels(ctx, req.(*GetAvailableLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_GetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLabelsRequest)
if err := dec(in); err != nil {
@@ -857,6 +993,10 @@ var _LabelService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.LabelService",
HandlerType: (*LabelServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetAvailableLabels",
Handler: _LabelService_GetAvailableLabels_Handler,
},
{
MethodName: "GetLabels",
Handler: _LabelService_GetLabels_Handler,

View File

@@ -31,6 +31,97 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var (
filter_LabelService_GetAvailableLabels_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "resource": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
func request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAvailableLabelsRequest
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["resource"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource")
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAvailableLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAvailableLabelsRequest
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["resource"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource")
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_LabelService_GetAvailableLabels_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAvailableLabels(ctx, &protoReq)
return msg, metadata, err
}
func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetLabelsRequest
var metadata runtime.ServerMetadata
@@ -482,6 +573,26 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LabelServiceServer) error {
mux.Handle("GET", pattern_LabelService_GetAvailableLabels_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.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -603,6 +714,26 @@ func RegisterLabelServiceHandler(ctx context.Context, mux *runtime.ServeMux, con
// "LabelServiceClient" to call the correct interceptors.
func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LabelServiceClient) error {
mux.Handle("GET", pattern_LabelService_GetAvailableLabels_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)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -687,6 +818,8 @@ func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
}
var (
pattern_LabelService_GetAvailableLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 2}, []string{"apis", "v1beta1", "labels", "namespace", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_GetLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_AddLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true)))
@@ -697,6 +830,8 @@ var (
)
var (
forward_LabelService_GetAvailableLabels_0 = runtime.ForwardResponseMessage
forward_LabelService_GetLabels_0 = runtime.ForwardResponseMessage
forward_LabelService_AddLabels_0 = runtime.ForwardResponseMessage

View File

@@ -5,6 +5,12 @@ package api;
import "google/api/annotations.proto";
service LabelService {
rpc GetAvailableLabels (GetAvailableLabelsRequest) returns (GetLabelsResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/labels/{namespace}/{resource}/labels"
};
}
rpc GetLabels (GetLabelsRequest) returns (GetLabelsResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels"
@@ -61,6 +67,13 @@ message GetLabelsRequest {
string uid = 3;
}
message GetAvailableLabelsRequest {
string namespace = 1;
string resource = 2;
string keyLike = 3;
string skipKeys = 4;
}
message GetLabelsResponse {
repeated KeyValue labels = 1;
}

View File

@@ -686,6 +686,10 @@ type ListWorkflowExecutionsRequest struct {
WorkflowTemplateVersion string `protobuf:"bytes,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"`
PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"`
Order string `protobuf:"bytes,6,opt,name=order,proto3" json:"order,omitempty"`
Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"`
Phase string `protobuf:"bytes,8,opt,name=phase,proto3" json:"phase,omitempty"`
IncludeSystem bool `protobuf:"varint,9,opt,name=includeSystem,proto3" json:"includeSystem,omitempty"`
}
func (x *ListWorkflowExecutionsRequest) Reset() {
@@ -755,6 +759,34 @@ func (x *ListWorkflowExecutionsRequest) GetPage() int32 {
return 0
}
func (x *ListWorkflowExecutionsRequest) GetOrder() string {
if x != nil {
return x.Order
}
return ""
}
func (x *ListWorkflowExecutionsRequest) GetLabels() string {
if x != nil {
return x.Labels
}
return ""
}
func (x *ListWorkflowExecutionsRequest) GetPhase() string {
if x != nil {
return x.Phase
}
return ""
}
func (x *ListWorkflowExecutionsRequest) GetIncludeSystem() bool {
if x != nil {
return x.IncludeSystem
}
return false
}
type ListWorkflowExecutionsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1614,6 +1646,100 @@ func (x *UpdateWorkflowExecutionStatusRequest) GetStatus() *WorkflowExecutionSta
return nil
}
type GetWorkflowExecutionStatisticsForNamespaceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) Reset() {
*x = GetWorkflowExecutionStatisticsForNamespaceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_workflow_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoMessage() {}
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message {
mi := &file_workflow_proto_msgTypes[25]
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 GetWorkflowExecutionStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead.
func (*GetWorkflowExecutionStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) {
return file_workflow_proto_rawDescGZIP(), []int{25}
}
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetWorkflowExecutionStatisticsForNamespaceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
}
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) Reset() {
*x = GetWorkflowExecutionStatisticsForNamespaceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_workflow_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoMessage() {}
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message {
mi := &file_workflow_proto_msgTypes[26]
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 GetWorkflowExecutionStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead.
func (*GetWorkflowExecutionStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) {
return file_workflow_proto_rawDescGZIP(), []int{26}
}
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) GetStats() *WorkflowExecutionStatisticReport {
if x != nil {
return x.Stats
}
return nil
}
var File_workflow_proto protoreflect.FileDescriptor
var file_workflow_proto_rawDesc = []byte{
@@ -1700,7 +1826,7 @@ var file_workflow_proto_rawDesc = []byte{
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22,
0xd9, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0xc3, 0x02, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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,
@@ -1713,115 +1839,134 @@ var file_workflow_proto_rawDesc = []byte{
0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1e,
0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 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, 0x2d, 0x0a, 0x19, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x11, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61,
0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74,
0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73,
0x68, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e,
0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a,
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x72, 0x74,
0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
0x61, 0x22, 0xc4, 0x01, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f,
0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61,
0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69,
0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64,
0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
0x46, 0x69, 0x6c, 0x65, 0x73, 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, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65,
0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12,
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61,
0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12,
0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53,
0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46,
0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61,
0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73,
0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74,
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, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41,
0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a,
0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a,
0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a,
0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65,
0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc4, 0x01, 0x0a, 0x04,
0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69,
0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20,
0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69,
0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72,
0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69,
0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68,
0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26,
0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70,
0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73,
0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, 0x6f, 0x6e, 0x53,
0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xa7, 0x12, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61,
0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52,
0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0x89, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
@@ -1841,134 +1986,148 @@ var file_workflow_proto_rawDesc = []byte{
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, 0x66,
0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b,
0x75, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x66,
0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b,
0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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,
0x75, 0x69, 0x64, 0x7d, 0x12, 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 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, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b,
0x12, 0x39, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0x99, 0x01, 0x0a, 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01,
0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22,
0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, 0x12, 0x62, 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, 0x65, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64,
0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01,
0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 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, 0x65, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f,
0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x1a, 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, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78,
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72,
0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d,
0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72,
0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d,
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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18,
0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62,
0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74,
0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f,
0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e,
0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b,
0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 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, 0x65, 0x78, 0x65, 0x63, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73,
0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66,
0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01,
0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x45, 0x12, 0x43, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70,
0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, 0x3e, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x12, 0xcd, 0x01, 0x0a, 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x1a, 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, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73,
0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69,
0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b,
0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66,
0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x48, 0x12, 0x46, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
0x74, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09,
0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45,
0x12, 0x43, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74,
0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41,
0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x4c, 0x22, 0x3e, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12,
0xcd, 0x01, 0x0a, 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72,
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 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, 0x65, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72,
0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12,
0xae, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 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, 0x65,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f,
0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x12, 0xae, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1983,86 +2142,92 @@ func file_workflow_proto_rawDescGZIP() []byte {
return file_workflow_proto_rawDescData
}
var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
var file_workflow_proto_goTypes = []interface{}{
(*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody
(*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest
(*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest
(*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest
(*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest
(*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest
(*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest
(*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest
(*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest
(*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest
(*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse
(*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest
(*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse
(*LogEntry)(nil), // 13: api.LogEntry
(*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata
(*WorkflowExecution)(nil), // 15: api.WorkflowExecution
(*ArtifactResponse)(nil), // 16: api.ArtifactResponse
(*File)(nil), // 17: api.File
(*ListFilesRequest)(nil), // 18: api.ListFilesRequest
(*ListFilesResponse)(nil), // 19: api.ListFilesResponse
(*Statistics)(nil), // 20: api.Statistics
(*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest
(*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest
(*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus
(*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest
(*Parameter)(nil), // 25: api.Parameter
(*KeyValue)(nil), // 26: api.KeyValue
(*Metric)(nil), // 27: api.Metric
(*WorkflowTemplate)(nil), // 28: api.WorkflowTemplate
(*empty.Empty)(nil), // 29: google.protobuf.Empty
(*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody
(*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest
(*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest
(*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest
(*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest
(*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest
(*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest
(*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest
(*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest
(*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest
(*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse
(*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest
(*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse
(*LogEntry)(nil), // 13: api.LogEntry
(*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata
(*WorkflowExecution)(nil), // 15: api.WorkflowExecution
(*ArtifactResponse)(nil), // 16: api.ArtifactResponse
(*File)(nil), // 17: api.File
(*ListFilesRequest)(nil), // 18: api.ListFilesRequest
(*ListFilesResponse)(nil), // 19: api.ListFilesResponse
(*Statistics)(nil), // 20: api.Statistics
(*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest
(*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest
(*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus
(*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest
(*GetWorkflowExecutionStatisticsForNamespaceRequest)(nil), // 25: api.GetWorkflowExecutionStatisticsForNamespaceRequest
(*GetWorkflowExecutionStatisticsForNamespaceResponse)(nil), // 26: api.GetWorkflowExecutionStatisticsForNamespaceResponse
(*Parameter)(nil), // 27: api.Parameter
(*KeyValue)(nil), // 28: api.KeyValue
(*Metric)(nil), // 29: api.Metric
(*WorkflowTemplate)(nil), // 30: api.WorkflowTemplate
(*WorkflowExecutionStatisticReport)(nil), // 31: api.WorkflowExecutionStatisticReport
(*empty.Empty)(nil), // 32: google.protobuf.Empty
}
var file_workflow_proto_depIdxs = []int32{
25, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter
26, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue
27, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter
28, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue
0, // 2: api.CreateWorkflowExecutionRequest.body:type_name -> api.CreateWorkflowExecutionBody
27, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric
29, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric
15, // 4: api.ListWorkflowExecutionsResponse.workflowExecutions:type_name -> api.WorkflowExecution
25, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter
28, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate
26, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue
27, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter
30, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate
28, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue
14, // 8: api.WorkflowExecution.metadata:type_name -> api.WorkflowExecutionMetadata
17, // 9: api.ListFilesResponse.files:type_name -> api.File
20, // 10: api.AddWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics
20, // 11: api.CronStartWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics
23, // 12: api.UpdateWorkflowExecutionStatusRequest.status:type_name -> api.WorkflowExecutionStatus
1, // 13: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest
2, // 14: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest
3, // 15: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest
11, // 16: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest
5, // 17: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest
8, // 18: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest
9, // 19: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest
6, // 20: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest
7, // 21: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest
4, // 22: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest
18, // 23: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest
21, // 24: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest
22, // 25: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest
24, // 26: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest
15, // 27: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution
15, // 28: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution
15, // 29: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution
12, // 30: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse
15, // 31: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution
13, // 32: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry
10, // 33: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse
15, // 34: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution
29, // 35: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty
16, // 36: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse
19, // 37: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse
29, // 38: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty
29, // 39: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty
29, // 40: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty
27, // [27:41] is the sub-list for method output_type
13, // [13:27] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
31, // 13: api.GetWorkflowExecutionStatisticsForNamespaceResponse.stats:type_name -> api.WorkflowExecutionStatisticReport
1, // 14: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest
2, // 15: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest
25, // 16: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:input_type -> api.GetWorkflowExecutionStatisticsForNamespaceRequest
3, // 17: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest
11, // 18: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest
5, // 19: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest
8, // 20: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest
9, // 21: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest
6, // 22: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest
7, // 23: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest
4, // 24: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest
18, // 25: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest
21, // 26: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest
22, // 27: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest
24, // 28: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest
15, // 29: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution
15, // 30: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution
26, // 31: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:output_type -> api.GetWorkflowExecutionStatisticsForNamespaceResponse
15, // 32: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution
12, // 33: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse
15, // 34: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution
13, // 35: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry
10, // 36: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse
15, // 37: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution
32, // 38: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty
16, // 39: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse
19, // 40: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse
32, // 41: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty
32, // 42: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty
32, // 43: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty
29, // [29:44] is the sub-list for method output_type
14, // [14:29] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_workflow_proto_init() }
@@ -2375,6 +2540,30 @@ func file_workflow_proto_init() {
return nil
}
}
file_workflow_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workflow_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceResponse); 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{
@@ -2382,7 +2571,7 @@ func file_workflow_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_workflow_proto_rawDesc,
NumEnums: 0,
NumMessages: 25,
NumMessages: 27,
NumExtensions: 0,
NumServices: 1,
},
@@ -2412,6 +2601,7 @@ type WorkflowServiceClient interface {
CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
// Clone a Workflow. This is the same as running it again.
CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error)
GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error)
WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error)
@@ -2452,6 +2642,15 @@ func (c *workflowServiceClient) CloneWorkflowExecution(ctx context.Context, in *
return out, nil
}
func (c *workflowServiceClient) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
out := new(GetWorkflowExecutionStatisticsForNamespaceResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) {
out := new(WorkflowExecution)
err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecution", in, out, opts...)
@@ -2612,6 +2811,7 @@ type WorkflowServiceServer interface {
CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error)
// Clone a Workflow. This is the same as running it again.
CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error)
GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error)
GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error)
ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error)
WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error
@@ -2636,6 +2836,9 @@ func (*UnimplementedWorkflowServiceServer) CreateWorkflowExecution(context.Conte
func (*UnimplementedWorkflowServiceServer) CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowExecution not implemented")
}
func (*UnimplementedWorkflowServiceServer) GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionStatisticsForNamespace not implemented")
}
func (*UnimplementedWorkflowServiceServer) GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecution not implemented")
}
@@ -2713,6 +2916,24 @@ func _WorkflowService_CloneWorkflowExecution_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowExecutionStatisticsForNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, req.(*GetWorkflowExecutionStatisticsForNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_GetWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowExecutionRequest)
if err := dec(in); err != nil {
@@ -2947,6 +3168,10 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
MethodName: "CloneWorkflowExecution",
Handler: _WorkflowService_CloneWorkflowExecution_Handler,
},
{
MethodName: "GetWorkflowExecutionStatisticsForNamespace",
Handler: _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler,
},
{
MethodName: "GetWorkflowExecution",
Handler: _WorkflowService_GetWorkflowExecution_Handler,

View File

@@ -177,6 +177,60 @@ func local_request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context,
}
func request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest
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.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest
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.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkflowExecutionRequest
var metadata runtime.ServerMetadata
@@ -1203,6 +1257,26 @@ func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.Serv
})
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_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.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1498,6 +1572,26 @@ func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.Serv
})
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_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)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_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_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1746,6 +1840,8 @@ var (
pattern_WorkflowService_CloneWorkflowExecution_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", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "statistics"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkflowService_GetWorkflowExecution_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", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkflowService_ListWorkflowExecutions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "", runtime.AssumeColonVerbOpt(true)))
@@ -1776,6 +1872,8 @@ var (
forward_WorkflowService_CloneWorkflowExecution_0 = runtime.ForwardResponseMessage
forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.ForwardResponseMessage
forward_WorkflowService_GetWorkflowExecution_0 = runtime.ForwardResponseMessage
forward_WorkflowService_ListWorkflowExecutions_0 = runtime.ForwardResponseMessage

View File

@@ -25,6 +25,12 @@ service WorkflowService {
};
}
rpc GetWorkflowExecutionStatisticsForNamespace (GetWorkflowExecutionStatisticsForNamespaceRequest) returns (GetWorkflowExecutionStatisticsForNamespaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/statistics"
};
}
rpc GetWorkflowExecution (GetWorkflowExecutionRequest) returns (WorkflowExecution) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}"
@@ -169,6 +175,10 @@ message ListWorkflowExecutionsRequest {
string workflowTemplateVersion = 3;
int32 pageSize = 4;
int32 page = 5;
string order = 6;
string labels = 7;
string phase = 8;
bool includeSystem = 9;
}
message ListWorkflowExecutionsResponse {
@@ -256,4 +266,12 @@ message UpdateWorkflowExecutionStatusRequest {
string namespace = 1;
string uid = 2;
WorkflowExecutionStatus status = 3;
}
message GetWorkflowExecutionStatisticsForNamespaceRequest {
string namespace = 1;
}
message GetWorkflowExecutionStatisticsForNamespaceResponse {
WorkflowExecutionStatisticReport stats = 1;
}

View File

@@ -591,6 +591,9 @@ type ListWorkspaceRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"`
Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"`
Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"`
}
func (x *ListWorkspaceRequest) Reset() {
@@ -646,6 +649,27 @@ func (x *ListWorkspaceRequest) GetPage() int32 {
return 0
}
func (x *ListWorkspaceRequest) GetOrder() string {
if x != nil {
return x.Order
}
return ""
}
func (x *ListWorkspaceRequest) GetLabels() string {
if x != nil {
return x.Labels
}
return ""
}
func (x *ListWorkspaceRequest) GetPhase() string {
if x != nil {
return x.Phase
}
return ""
}
type ListWorkspaceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -890,6 +914,314 @@ func (x *DeleteWorkspaceRequest) GetUid() string {
return ""
}
type RetryActionWorkspaceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *RetryActionWorkspaceRequest) Reset() {
*x = RetryActionWorkspaceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryActionWorkspaceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryActionWorkspaceRequest) ProtoMessage() {}
func (x *RetryActionWorkspaceRequest) ProtoReflect() protoreflect.Message {
mi := &file_workspace_proto_msgTypes[13]
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 RetryActionWorkspaceRequest.ProtoReflect.Descriptor instead.
func (*RetryActionWorkspaceRequest) Descriptor() ([]byte, []int) {
return file_workspace_proto_rawDescGZIP(), []int{13}
}
func (x *RetryActionWorkspaceRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *RetryActionWorkspaceRequest) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type WorkspaceStatisticReport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
LastCreated string `protobuf:"bytes,2,opt,name=lastCreated,proto3" json:"lastCreated,omitempty"`
Launching int32 `protobuf:"varint,3,opt,name=launching,proto3" json:"launching,omitempty"`
Running int32 `protobuf:"varint,4,opt,name=running,proto3" json:"running,omitempty"`
Updating int32 `protobuf:"varint,5,opt,name=updating,proto3" json:"updating,omitempty"`
Pausing int32 `protobuf:"varint,6,opt,name=pausing,proto3" json:"pausing,omitempty"`
Paused int32 `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
Terminating int32 `protobuf:"varint,8,opt,name=terminating,proto3" json:"terminating,omitempty"`
Terminated int32 `protobuf:"varint,9,opt,name=terminated,proto3" json:"terminated,omitempty"`
FailedToPause int32 `protobuf:"varint,10,opt,name=failedToPause,proto3" json:"failedToPause,omitempty"`
FailedToResume int32 `protobuf:"varint,11,opt,name=failedToResume,proto3" json:"failedToResume,omitempty"`
FailedToTerminate int32 `protobuf:"varint,12,opt,name=failedToTerminate,proto3" json:"failedToTerminate,omitempty"`
FailedToLaunch int32 `protobuf:"varint,13,opt,name=failedToLaunch,proto3" json:"failedToLaunch,omitempty"`
FailedToUpdate int32 `protobuf:"varint,14,opt,name=failedToUpdate,proto3" json:"failedToUpdate,omitempty"`
Failed int32 `protobuf:"varint,15,opt,name=failed,proto3" json:"failed,omitempty"`
}
func (x *WorkspaceStatisticReport) Reset() {
*x = WorkspaceStatisticReport{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WorkspaceStatisticReport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorkspaceStatisticReport) ProtoMessage() {}
func (x *WorkspaceStatisticReport) ProtoReflect() protoreflect.Message {
mi := &file_workspace_proto_msgTypes[14]
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 WorkspaceStatisticReport.ProtoReflect.Descriptor instead.
func (*WorkspaceStatisticReport) Descriptor() ([]byte, []int) {
return file_workspace_proto_rawDescGZIP(), []int{14}
}
func (x *WorkspaceStatisticReport) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
func (x *WorkspaceStatisticReport) GetLastCreated() string {
if x != nil {
return x.LastCreated
}
return ""
}
func (x *WorkspaceStatisticReport) GetLaunching() int32 {
if x != nil {
return x.Launching
}
return 0
}
func (x *WorkspaceStatisticReport) GetRunning() int32 {
if x != nil {
return x.Running
}
return 0
}
func (x *WorkspaceStatisticReport) GetUpdating() int32 {
if x != nil {
return x.Updating
}
return 0
}
func (x *WorkspaceStatisticReport) GetPausing() int32 {
if x != nil {
return x.Pausing
}
return 0
}
func (x *WorkspaceStatisticReport) GetPaused() int32 {
if x != nil {
return x.Paused
}
return 0
}
func (x *WorkspaceStatisticReport) GetTerminating() int32 {
if x != nil {
return x.Terminating
}
return 0
}
func (x *WorkspaceStatisticReport) GetTerminated() int32 {
if x != nil {
return x.Terminated
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailedToPause() int32 {
if x != nil {
return x.FailedToPause
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailedToResume() int32 {
if x != nil {
return x.FailedToResume
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailedToTerminate() int32 {
if x != nil {
return x.FailedToTerminate
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailedToLaunch() int32 {
if x != nil {
return x.FailedToLaunch
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailedToUpdate() int32 {
if x != nil {
return x.FailedToUpdate
}
return 0
}
func (x *WorkspaceStatisticReport) GetFailed() int32 {
if x != nil {
return x.Failed
}
return 0
}
type GetWorkspaceStatisticsForNamespaceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *GetWorkspaceStatisticsForNamespaceRequest) Reset() {
*x = GetWorkspaceStatisticsForNamespaceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkspaceStatisticsForNamespaceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkspaceStatisticsForNamespaceRequest) ProtoMessage() {}
func (x *GetWorkspaceStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message {
mi := &file_workspace_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 GetWorkspaceStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead.
func (*GetWorkspaceStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) {
return file_workspace_proto_rawDescGZIP(), []int{15}
}
func (x *GetWorkspaceStatisticsForNamespaceRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetWorkspaceStatisticsForNamespaceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Stats *WorkspaceStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
}
func (x *GetWorkspaceStatisticsForNamespaceResponse) Reset() {
*x = GetWorkspaceStatisticsForNamespaceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_workspace_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkspaceStatisticsForNamespaceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkspaceStatisticsForNamespaceResponse) ProtoMessage() {}
func (x *GetWorkspaceStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message {
mi := &file_workspace_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 GetWorkspaceStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead.
func (*GetWorkspaceStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) {
return file_workspace_proto_rawDescGZIP(), []int{16}
}
func (x *GetWorkspaceStatisticsForNamespaceResponse) GetStats() *WorkspaceStatisticReport {
if x != nil {
return x.Stats
}
return nil
}
var File_workspace_proto protoreflect.FileDescriptor
var file_workspace_proto_rawDesc = []byte{
@@ -981,103 +1313,176 @@ var file_workspace_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64,
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x1a, 0x0a,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xa7, 0x01,
0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a,
0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x15, 0x50, 0x61, 0x75, 0x73, 0x65,
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x69, 0x64, 0x32, 0x86, 0x08, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0f, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x2c, 0x22, 0x24, 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, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x6c, 0x0a,
0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12,
0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05,
0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61,
0x73, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18,
0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x15,
0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, 0x65, 0x74,
0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6c,
0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a,
0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x72,
0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x75,
0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e,
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e,
0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x75,
0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69,
0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69,
0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54,
0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66,
0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73,
0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54,
0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11,
0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74,
0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75,
0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65,
0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69,
0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, 0x65, 0x74,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f,
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0f,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 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, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30,
0x12, 0x2e, 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, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x2c, 0x12, 0x2a, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x75,
0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12,
0x24, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0e, 0x4c,
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x19, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 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, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x1a,
0x31, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x2a, 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,
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x7e, 0x0a,
0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30, 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,
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, 0x73, 0x65, 0x12, 0x81, 0x01,
0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f,
0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x3b, 0x1a, 0x31, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x80, 0x01,
0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x1a, 0x31,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x2a,
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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6d,
0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30,
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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, 0x73, 0x65,
0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x33, 0x1a, 0x31, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65,
0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x2c, 0x2a, 0x2a, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d,
0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a,
0x30, 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, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x74, 0x72,
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1092,61 +1497,70 @@ func file_workspace_proto_rawDescGZIP() []byte {
return file_workspace_proto_rawDescData
}
var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_workspace_proto_goTypes = []interface{}{
(*Workspace)(nil), // 0: api.Workspace
(*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus
(*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody
(*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest
(*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest
(*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest
(*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody
(*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest
(*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest
(*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse
(*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest
(*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest
(*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest
(*Parameter)(nil), // 13: api.Parameter
(*WorkspaceTemplate)(nil), // 14: api.WorkspaceTemplate
(*KeyValue)(nil), // 15: api.KeyValue
(*empty.Empty)(nil), // 16: google.protobuf.Empty
(*Workspace)(nil), // 0: api.Workspace
(*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus
(*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody
(*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest
(*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest
(*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest
(*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody
(*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest
(*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest
(*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse
(*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest
(*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest
(*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest
(*RetryActionWorkspaceRequest)(nil), // 13: api.RetryActionWorkspaceRequest
(*WorkspaceStatisticReport)(nil), // 14: api.WorkspaceStatisticReport
(*GetWorkspaceStatisticsForNamespaceRequest)(nil), // 15: api.GetWorkspaceStatisticsForNamespaceRequest
(*GetWorkspaceStatisticsForNamespaceResponse)(nil), // 16: api.GetWorkspaceStatisticsForNamespaceResponse
(*Parameter)(nil), // 17: api.Parameter
(*WorkspaceTemplate)(nil), // 18: api.WorkspaceTemplate
(*KeyValue)(nil), // 19: api.KeyValue
(*empty.Empty)(nil), // 20: google.protobuf.Empty
}
var file_workspace_proto_depIdxs = []int32{
13, // 0: api.Workspace.parameters:type_name -> api.Parameter
14, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate
17, // 0: api.Workspace.parameters:type_name -> api.Parameter
18, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate
1, // 2: api.Workspace.status:type_name -> api.WorkspaceStatus
15, // 3: api.Workspace.labels:type_name -> api.KeyValue
13, // 4: api.Workspace.templateParameters:type_name -> api.Parameter
13, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter
15, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue
19, // 3: api.Workspace.labels:type_name -> api.KeyValue
17, // 4: api.Workspace.templateParameters:type_name -> api.Parameter
17, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter
19, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue
2, // 7: api.CreateWorkspaceRequest.body:type_name -> api.CreateWorkspaceBody
1, // 8: api.UpdateWorkspaceStatusRequest.status:type_name -> api.WorkspaceStatus
13, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter
15, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue
17, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter
19, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue
6, // 11: api.UpdateWorkspaceRequest.body:type_name -> api.UpdateWorkspaceBody
0, // 12: api.ListWorkspaceResponse.workspaces:type_name -> api.Workspace
3, // 13: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest
4, // 14: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest
8, // 15: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest
5, // 16: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest
7, // 17: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest
10, // 18: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest
11, // 19: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest
12, // 20: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest
0, // 21: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace
0, // 22: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace
9, // 23: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse
16, // 24: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty
16, // 25: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty
16, // 26: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty
16, // 27: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty
16, // 28: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty
21, // [21:29] is the sub-list for method output_type
13, // [13:21] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
14, // 13: api.GetWorkspaceStatisticsForNamespaceResponse.stats:type_name -> api.WorkspaceStatisticReport
3, // 14: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest
15, // 15: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:input_type -> api.GetWorkspaceStatisticsForNamespaceRequest
4, // 16: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest
8, // 17: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest
5, // 18: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest
7, // 19: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest
10, // 20: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest
11, // 21: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest
12, // 22: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest
13, // 23: api.WorkspaceService.RetryLastWorkspaceAction:input_type -> api.RetryActionWorkspaceRequest
0, // 24: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace
16, // 25: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:output_type -> api.GetWorkspaceStatisticsForNamespaceResponse
0, // 26: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace
9, // 27: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse
20, // 28: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty
20, // 29: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty
20, // 30: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty
20, // 31: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty
20, // 32: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty
20, // 33: api.WorkspaceService.RetryLastWorkspaceAction:output_type -> google.protobuf.Empty
24, // [24:34] is the sub-list for method output_type
14, // [14:24] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_workspace_proto_init() }
@@ -1314,6 +1728,54 @@ func file_workspace_proto_init() {
return nil
}
}
file_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryActionWorkspaceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorkspaceStatisticReport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkspaceStatisticsForNamespaceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkspaceStatisticsForNamespaceResponse); 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{
@@ -1321,7 +1783,7 @@ func file_workspace_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_workspace_proto_rawDesc,
NumEnums: 0,
NumMessages: 13,
NumMessages: 17,
NumExtensions: 0,
NumServices: 1,
},
@@ -1348,6 +1810,7 @@ const _ = grpc.SupportPackageIsVersion6
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WorkspaceServiceClient interface {
CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error)
GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error)
GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error)
ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error)
UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
@@ -1355,6 +1818,7 @@ type WorkspaceServiceClient interface {
PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type workspaceServiceClient struct {
@@ -1374,6 +1838,15 @@ func (c *workspaceServiceClient) CreateWorkspace(ctx context.Context, in *Create
return out, nil
}
func (c *workspaceServiceClient) GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) {
out := new(GetWorkspaceStatisticsForNamespaceResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) {
out := new(Workspace)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspace", in, out, opts...)
@@ -1437,9 +1910,19 @@ func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *Delete
return out, nil
}
func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/RetryLastWorkspaceAction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceServiceServer is the server API for WorkspaceService service.
type WorkspaceServiceServer interface {
CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error)
GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error)
GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error)
ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error)
UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*empty.Empty, error)
@@ -1447,6 +1930,7 @@ type WorkspaceServiceServer interface {
PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*empty.Empty, error)
ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*empty.Empty, error)
DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error)
RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error)
}
// UnimplementedWorkspaceServiceServer can be embedded to have forward compatible implementations.
@@ -1456,6 +1940,9 @@ type UnimplementedWorkspaceServiceServer struct {
func (*UnimplementedWorkspaceServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspace not implemented")
}
func (*UnimplementedWorkspaceServiceServer) GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceStatisticsForNamespace not implemented")
}
func (*UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented")
}
@@ -1477,6 +1964,9 @@ func (*UnimplementedWorkspaceServiceServer) ResumeWorkspace(context.Context, *Re
func (*UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented")
}
func (*UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented")
}
func RegisterWorkspaceServiceServer(s *grpc.Server, srv WorkspaceServiceServer) {
s.RegisterService(&_WorkspaceService_serviceDesc, srv)
@@ -1500,6 +1990,24 @@ func _WorkspaceService_CreateWorkspace_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceStatisticsForNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, req.(*GetWorkspaceStatisticsForNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceRequest)
if err := dec(in); err != nil {
@@ -1626,6 +2134,24 @@ func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_RetryLastWorkspaceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RetryActionWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/RetryLastWorkspaceAction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, req.(*RetryActionWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkspaceService",
HandlerType: (*WorkspaceServiceServer)(nil),
@@ -1634,6 +2160,10 @@ var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
MethodName: "CreateWorkspace",
Handler: _WorkspaceService_CreateWorkspace_Handler,
},
{
MethodName: "GetWorkspaceStatisticsForNamespace",
Handler: _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler,
},
{
MethodName: "GetWorkspace",
Handler: _WorkspaceService_GetWorkspace_Handler,
@@ -1662,6 +2192,10 @@ var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
MethodName: "DeleteWorkspace",
Handler: _WorkspaceService_DeleteWorkspace_Handler,
},
{
MethodName: "RetryLastWorkspaceAction",
Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workspace.proto",

View File

@@ -101,6 +101,60 @@ func local_request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marsh
}
func request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceStatisticsForNamespaceRequest
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.GetWorkspaceStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceStatisticsForNamespaceRequest
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.GetWorkspaceStatisticsForNamespace(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceRequest
var metadata runtime.ServerMetadata
@@ -658,6 +712,82 @@ func local_request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marsh
}
func request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq RetryActionWorkspaceRequest
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)
}
msg, err := client.RetryLastWorkspaceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq RetryActionWorkspaceRequest
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)
}
msg, err := server.RetryLastWorkspaceAction(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.
@@ -683,6 +813,26 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_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.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -823,6 +973,26 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
})
mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_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.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_RetryLastWorkspaceAction_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -884,6 +1054,26 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_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)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_GetWorkspaceStatisticsForNamespace_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_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1024,12 +1214,34 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
})
mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_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)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_RetryLastWorkspaceAction_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_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_WorkspaceService_CreateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workspace", "statistics"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_GetWorkspace_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"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_ListWorkspaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true)))
@@ -1043,11 +1255,15 @@ var (
pattern_WorkspaceService_ResumeWorkspace_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", "resume"}, "", runtime.AssumeColonVerbOpt(true)))
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"}, "", runtime.AssumeColonVerbOpt(true)))
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"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_WorkspaceService_CreateWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_GetWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage
@@ -1061,4 +1277,6 @@ var (
forward_WorkspaceService_ResumeWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.ForwardResponseMessage
)

View File

@@ -16,6 +16,12 @@ service WorkspaceService {
};
}
rpc GetWorkspaceStatisticsForNamespace (GetWorkspaceStatisticsForNamespaceRequest) returns (GetWorkspaceStatisticsForNamespaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspace/statistics"
};
}
rpc GetWorkspace (GetWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces/{uid}"
@@ -59,6 +65,12 @@ service WorkspaceService {
delete: "/apis/v1beta1/{namespace}/workspaces/{uid}"
};
}
rpc RetryLastWorkspaceAction (RetryActionWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/retry"
};
}
}
message Workspace {
@@ -121,6 +133,9 @@ message ListWorkspaceRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
string order = 4;
string labels = 5;
string phase = 6;
}
message ListWorkspaceResponse {
@@ -144,4 +159,35 @@ message ResumeWorkspaceRequest {
message DeleteWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message RetryActionWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message WorkspaceStatisticReport {
int32 total = 1;
string lastCreated = 2;
int32 launching = 3;
int32 running = 4;
int32 updating = 5;
int32 pausing = 6;
int32 paused = 7;
int32 terminating = 8;
int32 terminated = 9;
int32 failedToPause = 10;
int32 failedToResume = 11;
int32 failedToTerminate = 12;
int32 failedToLaunch = 13;
int32 failedToUpdate = 14;
int32 failed = 15;
}
message GetWorkspaceStatisticsForNamespaceRequest {
string namespace = 1;
}
message GetWorkspaceStatisticsForNamespaceResponse {
WorkspaceStatisticReport stats = 1;
}

View File

@@ -457,6 +457,9 @@ type ListWorkspaceTemplatesRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"`
Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"`
Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *ListWorkspaceTemplatesRequest) Reset() {
@@ -512,6 +515,27 @@ func (x *ListWorkspaceTemplatesRequest) GetPage() int32 {
return 0
}
func (x *ListWorkspaceTemplatesRequest) GetOrder() string {
if x != nil {
return x.Order
}
return ""
}
func (x *ListWorkspaceTemplatesRequest) GetLabels() string {
if x != nil {
return x.Labels
}
return ""
}
func (x *ListWorkspaceTemplatesRequest) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type ListWorkspaceTemplatesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -774,118 +798,122 @@ var file_workspace_template_proto_rawDesc = []byte{
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, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
0x6d, 0x0a, 0x1d, 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,
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, 0x1a,
0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xc8,
0x01, 0x0a, 0x1e, 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, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 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, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x24, 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,
0xad, 0x01, 0x0a, 0x1d, 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, 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,
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 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, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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,
0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70,
0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
0xc8, 0x01, 0x0a, 0x1e, 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, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 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,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x24, 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, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 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, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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,
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,
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,
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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
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, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (

View File

@@ -104,6 +104,9 @@ message ListWorkspaceTemplatesRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
string order = 4;
string labels = 5;
string uid = 6;
}
message ListWorkspaceTemplatesResponse {

View File

@@ -155,6 +155,10 @@ func printMarkDown(issues []*issue, version *string) {
fmt.Println("# Contributors")
contributors := make([]user, 0)
for _, contributor := range contributorsMap {
// Sorry, no bots.
if contributor.Login == "dependabot[bot]" {
continue
}
contributors = append(contributors, contributor)
}
sort.Slice(contributors, func(i, j int) bool { return contributors[i].ContributionsCount > contributors[j].ContributionsCount })

View File

@@ -0,0 +1,147 @@
# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
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.14.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: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /home/django/data
- name: keys
mountPath: /home/django/keys
- name: logs
mountPath: /home/django/logs
- name: models
mountPath: /home/django/models
- name: share
mountPath: /home/django/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.14.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
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
# 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,77 @@
# Docker containers that are part of the Workspace
containers:
- name: jupyterlab
image: onepanel/jupyterlab:1.0.1
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh 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"]
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
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;
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
routes:
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: / #jupyter runs at the default route
route:
- destination:
port:
number: 80
# DAG Workflow to be executed once a Workspace action completes (optional)
#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,79 @@
# Docker containers that are part of the Workspace
containers:
- name: jupyterlab
image: onepanel/jupyterlab:1.0.1
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh 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"]
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'
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
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;
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
routes:
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: / #jupyter runs at the default route
route:
- destination:
port:
number: 80
# DAG Workflow to be executed once a Workspace action completes (optional)
#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,159 @@
# 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.15.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_KEYS_DIR
value: /cvat/keys
- name: CVAT_DATA_DIR
value: /cvat/data
- name: CVAT_MODELS_DIR
value: /cvat/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"
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.15.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:s3
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,58 @@
# Docker containers that are part of the Workspace
containers:
- name: jupyterlab-tensorflow
image: onepanel/jupyterlab:1.0.1
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh 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"]
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
args:
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
volumeMounts:
- name: data
mountPath: /data
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
routes:
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: / #jupyter runs at the default route
route:
- destination:
port:
number: 80
# DAG Workflow to be executed once a Workspace action completes (optional)
#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,41 @@
# Docker containers that are part of the Workspace
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 ."]
ports:
- containerPort: 8080
name: vscode
volumeMounts:
- name: data
mountPath: /data
ports:
- name: vscode
port: 8080
protocol: TCP
targetPort: 8080
routes:
- match:
- uri:
prefix: / #vscode runs at the default route
route:
- destination:
port:
number: 8080
# DAG Workflow to be executed once a Workspace action completes (optional)
#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,60 @@
# Docker containers that are part of the Workspace
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 ."]
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;
ports:
- name: vscode
port: 8080
protocol: TCP
targetPort: 8080
routes:
- match:
- uri:
prefix: / #vscode runs at the default route
route:
- destination:
port:
number: 8080
# DAG Workflow to be executed once a Workspace action completes (optional)
#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

@@ -152,13 +152,14 @@ func Up20200626113635(tx *sql.Tx) error {
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate2,
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate2,
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}

View File

@@ -154,13 +154,13 @@ func Up20200704151301(tx *sql.Tx) error {
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate3,
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate3,
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}

View File

@@ -172,11 +172,6 @@ func Up20200724220450(tx *sql.Tx) error {
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate4,
}
for _, namespace := range namespaces {
artifactRepositoryType := "s3"
@@ -187,6 +182,12 @@ func Up20200724220450(tx *sql.Tx) error {
if nsConfig.ArtifactRepository.GCS != nil {
artifactRepositoryType = "gcs"
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate4,
}
workspaceTemplate.Manifest = strings.NewReplacer(
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {

View File

@@ -3,7 +3,7 @@ package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/pressly/goose"
)

View File

@@ -5,6 +5,7 @@ import (
v1 "github.com/onepanelio/core/pkg"
"github.com/pressly/goose"
"log"
"strings"
)
const maskRCNNWorkflowTemplate = `arguments:
@@ -47,7 +48,7 @@ const maskRCNNWorkflowTemplate = `arguments:
stage-1-epochs=1 # Epochs for network heads
stage-2-epochs=2 # Epochs for finetune layers
stage-3-epochs=3 # Epochs for all layers
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters."
- name: dump-format
type: select.select
@@ -143,7 +144,7 @@ templates:
artifacts:
- name: data
path: /mnt/data/datasets/
s3:
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
- git:
repo: '{{workflow.parameters.source}}'
@@ -156,7 +157,7 @@ templates:
- name: model
optional: true
path: /mnt/output
s3:
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
# Uncomment the lines below if you want to send Slack notifications
#- container:
@@ -198,7 +199,7 @@ volumeClaimTemplates:
const maskRCNNWorkflowTemplateName = "MaskRCNN Training"
const tensorflowWorkflowTemplate2 = `arguments:
const tensorflowObjectDetectionWorkflowTemplate = `arguments:
parameters:
- name: source
value: https://github.com/tensorflow/models.git
@@ -209,10 +210,12 @@ const tensorflowWorkflowTemplate2 = `arguments:
- name: trainingsource
value: https://github.com/onepanelio/cvat-training.git
type: hidden
visibility: private
- name: revision
value: v1.13.0
type: hidden
visibility: private
- name: sys-annotation-path
value: annotation-dump/sample_dataset
@@ -223,6 +226,7 @@ const tensorflowWorkflowTemplate2 = `arguments:
value: workflow-data/output/sample_output
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
displayName: Workflow output path
visibility: private
- name: ref-model
value: frcnn-res50-coco
@@ -321,7 +325,7 @@ templates:
apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \
pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \
cd /mnt/src/tf/research && \
export PYTHONPATH=$PYTHONPATH:` + "pwd`:`pwd`/slim" + `&& \
export PYTHONPATH=$PYTHONPATH:` + "`pwd`:`pwd`/slim" + ` && \
cd /mnt/src/train && \
python convert_workflow.py \
--extras="{{workflow.parameters.extras}}" \
@@ -344,12 +348,12 @@ templates:
artifacts:
- name: data
path: /mnt/data/datasets/
s3:
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
- name: models
path: /mnt/data/models/
optional: true
s3:
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.sys-finetune-checkpoint}}'
- git:
repo: '{{workflow.parameters.source}}'
@@ -367,7 +371,7 @@ templates:
- name: model
optional: true
path: /mnt/output
s3:
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
# Uncomment the lines below if you want to send Slack notifications
#- container:
@@ -407,6 +411,8 @@ volumeClaimTemplates:
requests:
storage: 200Gi`
const tensorflowObjectDetectionWorkflowTemplateName = "TF Object Detection Training"
func initialize20200812104328() {
if _, ok := initializedMigrations[20200812104328]; !ok {
goose.AddMigration(Up20200812104328, Down20200812104328)
@@ -414,6 +420,7 @@ func initialize20200812104328() {
}
}
// Up20200812104328 runs the migration to update MaskRCNN and TF_OD templates
func Up20200812104328(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
@@ -440,6 +447,9 @@ func Up20200812104328(tx *sql.Tx) error {
workflowTemplate := &v1.WorkflowTemplate{
Name: maskRCNNWorkflowTemplateName,
Manifest: maskRCNNWorkflowTemplate,
Labels: map[string]string{
"used-by": "cvat",
},
}
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
return err
@@ -448,29 +458,44 @@ func Up20200812104328(tx *sql.Tx) error {
for _, namespace := range namespaces {
existingWorkflowTemplate, err := client.GetLatestWorkflowTemplate(namespace.Name, workflowTemplate.UID)
if err != nil {
return err
if strings.Contains(err.Error(), "Workflow template not found") {
err = nil
existingWorkflowTemplate = nil
} else {
return err
}
}
if existingWorkflowTemplate != nil {
log.Printf("Skipping creating template '%v'. It already exists in namespace '%v'", workflowTemplate.Name, namespace.Name)
continue
}
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
if err != nil {
return err
}
if _, err := client.CreateWorkflowTemplate(namespace.Name, workflowTemplate); err != nil {
return err
}
}
// Update tf-od
// Create tf-od
workflowTemplate = &v1.WorkflowTemplate{
Name: tensorflowWorkflowTemplateName,
Manifest: tensorflowWorkflowTemplate2,
Name: tensorflowObjectDetectionWorkflowTemplateName,
Manifest: tensorflowObjectDetectionWorkflowTemplate,
Labels: map[string]string{
"used-by": "cvat",
},
}
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
return err
}
for _, namespace := range namespaces {
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
if err != nil {
return err
}
if _, err := client.CreateWorkflowTemplate(namespace.Name, workflowTemplate); err != nil {
return err
}
}
@@ -478,6 +503,7 @@ func Up20200812104328(tx *sql.Tx) error {
return nil
}
// Down20200812104328 does nothing
func Down20200812104328(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil

View File

@@ -39,7 +39,7 @@ containers:
- containerPort: 6379
name: tcp
- name: cvat
image: onepanel/cvat:0.12.0_cvat.1.0.0-beta.2
image: onepanel/cvat:0.12.0_cvat.1.0.0-beta.2-cuda
env:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: ""
@@ -53,6 +53,12 @@ containers:
value: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
@@ -77,7 +83,7 @@ containers:
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:s3
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
imagePullPolicy: Always
args:
- download
@@ -147,6 +153,7 @@ func initialize20200812113316() {
}
}
// Up20200812113316 runs the go migration to update cvat template
func Up20200812113316(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
@@ -173,11 +180,6 @@ func Up20200812113316(tx *sql.Tx) error {
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate5,
}
for _, namespace := range namespaces {
artifactRepositoryType := "s3"
@@ -188,6 +190,12 @@ func Up20200812113316(tx *sql.Tx) error {
if nsConfig.ArtifactRepository.GCS != nil {
artifactRepositoryType = "gcs"
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate5,
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
}
workspaceTemplate.Manifest = strings.NewReplacer(
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
@@ -198,6 +206,7 @@ func Up20200812113316(tx *sql.Tx) error {
return nil
}
// Down20200812113316 does nothing
func Down20200812113316(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil

View File

@@ -0,0 +1,58 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20200814160856() {
if _, ok := initializedMigrations[20200814160856]; !ok {
goose.AddMigration(Up20200814160856, Down20200814160856)
initializedMigrations[20200814160856] = true
}
}
// Up20200814160856 runs a migration to add description to jupyterlab template
func Up20200814160856(tx *sql.Tx) error {
// This code is executed when the migration is applied.
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200814160856]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate, err := client.GetWorkspaceTemplate(namespace.Name, "jupyterlab", 0)
if err != nil {
return err
}
workspaceTemplate.Description = "Interactive development environment for notebooks"
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200814160856 does nothing
func Down20200814160856(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,155 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const jupyterWorkspaceTemplate2 = `# Docker containers that are part of the Workspace
containers:
- name: jupyterlab-tensorflow
image: onepanel/jupyterlab:1.0.1
command: ["/bin/bash", "-c", "start.sh 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"]
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
args:
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
volumeMounts:
- name: data
mountPath: /data
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
routes:
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: / #jupyter runs at the default route
route:
- destination:
port:
number: 80
# DAG Workflow to be executed once a Workspace action completes (optional)
#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
`
func initialize20200821162630() {
if _, ok := initializedMigrations[20200821162630]; !ok {
goose.AddMigration(Up20200821162630, Down20200821162630)
initializedMigrations[20200821162630] = true
}
}
//Up20200821162630 updates jupyterlab workspace with new features.
// Tensorflow 2.3 compiled to support CUDA 10.2 and cudnn8
// Pytorch with GPU support.
// OpenCV compiled from source with CUDA support.
// Miniconda, Jupyterlab 2.2+, and lots of neat extensions.
func Up20200821162630(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200821162630]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: jupyterLabTemplateName,
Manifest: jupyterWorkspaceTemplate2,
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200821162630 removes the JupyterLab template update
func Down20200821162630(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: jupyterLabTemplateName,
Manifest: jupyterWorkspaceTemplate,
}
for _, namespace := range namespaces {
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}

View File

@@ -0,0 +1,251 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
"github.com/pressly/goose"
)
const maskRCNNTemplate2 = `arguments:
parameters:
- name: source
value: https://github.com/onepanelio/Mask_RCNN.git
displayName: Model source code
type: hidden
visibility: private
- name: cvat-annotation-path
value: annotation-dump/sample_dataset
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
displayName: Dataset path
visibility: private
- name: cvat-output-path
value: workflow-data/output/sample_output
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
displayName: Workflow output path
visibility: private
- name: cvat-finetune-checkpoint
value: ''
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
displayName: Checkpoint path
visibility: public
- name: cvat-num-classes
displayName: Number of classes
hint: Number of classes (i.e in CVAT taks) + 1 for background
value: 81
visibility: private
- name: hyperparameters
displayName: Hyperparameters
visibility: public
type: textarea.textarea
value: |-
stage-1-epochs=1 # Epochs for network heads
stage-2-epochs=2 # Epochs for finetune layers
stage-3-epochs=3 # Epochs for all layers
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
- name: dump-format
value: cvat_coco
displayName: CVAT dump format
visibility: public
- name: tf-image
visibility: public
value: tensorflow/tensorflow:1.13.1-py3
type: select.select
displayName: Select TensorFlow image
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.select
visibility: public
name: sys-node-pool
value: Standard_D4s_v3
required: true
options:
- name: 'CPU: 2, RAM: 8GB'
value: Standard_D2s_v3
- name: 'CPU: 4, RAM: 16GB'
value: Standard_D4s_v3
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
value: Standard_NC6
entrypoint: main
templates:
- dag:
tasks:
- name: train-model
template: tensorflow
# Uncomment the lines below if you want to send Slack notifications
# - arguments:
# artifacts:
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
# name: metrics
# parameters:
# - name: status
# value: '{{tasks.train-model.status}}'
# dependencies:
# - train-model
# name: notify-in-slack
# template: slack-notify-success
name: main
- container:
args:
- |
apt-get update \
&& apt-get install -y git wget libglib2.0-0 libsm6 libxext6 libxrender-dev \
&& pip install -r requirements.txt \
&& pip install boto3 pyyaml google-cloud-storage \
&& git clone https://github.com/waleedka/coco \
&& cd coco/PythonAPI \
&& python setup.py build_ext install \
&& rm -rf build \
&& cd ../../ \
&& wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 \
&& python setup.py install && ls \
&& python samples/coco/cvat.py train --dataset=/mnt/data/datasets \
--model=workflow_maskrcnn \
--extras="{{workflow.parameters.hyperparameters}}" \
--ref_model_path="{{workflow.parameters.cvat-finetune-checkpoint}}" \
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
&& cd /mnt/src/ \
&& python prepare_dataset.py /mnt/data/datasets/annotations/instances_default.json
command:
- sh
- -c
image: '{{workflow.parameters.tf-image}}'
volumeMounts:
- mountPath: /mnt/data
name: data
- mountPath: /mnt/output
name: output
workingDir: /mnt/src
nodeSelector:
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
- git:
repo: '{{workflow.parameters.source}}'
revision: "no-boto"
name: src
path: /mnt/src
name: tensorflow
outputs:
artifacts:
- name: model
optional: true
path: /mnt/output
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
# Uncomment the lines below if you want to send Slack notifications
#- container:
# args:
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
# command:
# - sh
# - -c
# image: technosophos/slack-notify
# inputs:
# artifacts:
# - name: metrics
# optional: true
# path: /tmp/metrics.json
# parameters:
# - name: status
# name: slack-notify-success
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
creationTimestamp: null
name: output
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi`
func initialize20200824095513() {
if _, ok := initializedMigrations[20200824095513]; !ok {
goose.AddMigration(Up20200824095513, Down20200824095513)
initializedMigrations[20200824095513] = true
}
}
// Up20200824095513 updates the maskrcnn workflow template
func Up20200824095513(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200824095513]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
// Update maskrcnn
workflowTemplate := &v1.WorkflowTemplate{
Name: maskRCNNWorkflowTemplateName,
Manifest: maskRCNNTemplate2,
Labels: map[string]string{
"used-by": "cvat",
},
}
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
return err
}
for _, namespace := range namespaces {
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
if err != nil {
return err
}
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
return err
}
}
return nil
}
// Down20200824095513 does nothing
func Down20200824095513(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,281 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
"github.com/pressly/goose"
)
const tensorflowObjectDetectionTraining2 = `arguments:
parameters:
- name: source
value: https://github.com/tensorflow/models.git
displayName: Model source code
type: hidden
visibility: private
- name: trainingsource
value: https://github.com/onepanelio/cvat-training.git
type: hidden
visibility: private
- name: revision
value: v1.13.0
type: hidden
visibility: private
- name: cvat-annotation-path
value: annotation-dump/sample_dataset
displayName: Dataset path
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
visibility: private
- name: cvat-output-path
value: workflow-data/output/sample_output
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
displayName: Workflow output path
visibility: private
- 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: hyperparameters
value: |-
num-steps=10000
displayName: Hyperparameters
visibility: public
type: textarea.textarea
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
- name: cvat-finetune-checkpoint
value: ''
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
displayName: Checkpoint path
visibility: public
- name: cvat-num-classes
value: 81
hint: Number of classes
displayName: Number of classes
visibility: private
- 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.select
name: sys-node-pool
value: Standard_D4s_v3
visibility: public
required: true
options:
- name: 'CPU: 2, RAM: 8GB'
value: Standard_D2s_v3
- name: 'CPU: 4, RAM: 16GB'
value: Standard_D4s_v3
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
value: Standard_NC6
- name: dump-format
value: cvat_tfrecord
visibility: public
entrypoint: main
templates:
- dag:
tasks:
- name: train-model
template: tensorflow
# Uncomment the lines below if you want to send Slack notifications
# - arguments:
# artifacts:
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
# name: metrics
# parameters:
# - name: status
# value: '{{tasks.train-model.status}}'
# dependencies:
# - train-model
# name: notify-in-slack
# template: slack-notify-success
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 pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \
cd /mnt/src/tf/research && \
export PYTHONPATH=$PYTHONPATH:` + "`pwd`:`pwd`" + `/slim && \
cd /mnt/src/train && \
python convert_workflow.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}}
command:
- sh
- -c
image: '{{workflow.parameters.tf-image}}'
volumeMounts:
- mountPath: /mnt/data
name: data
- mountPath: /mnt/output
name: output
workingDir: /mnt/src
nodeSelector:
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
inputs:
artifacts:
- name: data
path: /mnt/data/datasets/
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
- name: models
path: /mnt/data/models/
optional: true
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}'
- git:
repo: '{{workflow.parameters.source}}'
revision: '{{workflow.parameters.revision}}'
name: src
path: /mnt/src/tf
- git:
repo: '{{workflow.parameters.trainingsource}}'
revision: 'optional-artifacts'
name: tsrc
path: /mnt/src/train
name: tensorflow
outputs:
artifacts:
- name: model
optional: true
path: /mnt/output
{{.ArtifactRepositoryType}}:
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
# Uncomment the lines below if you want to send Slack notifications
#- container:
# args:
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
# command:
# - sh
# - -c
# image: technosophos/slack-notify
# inputs:
# artifacts:
# - name: metrics
# optional: true
# path: /tmp/metrics.json
# parameters:
# - name: status
# name: slack-notify-success
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- metadata:
creationTimestamp: null
name: output
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi`
func initialize20200824101019() {
if _, ok := initializedMigrations[20200824101019]; !ok {
goose.AddMigration(Up20200824101019, Down20200824101019)
initializedMigrations[20200824101019] = true
}
}
// Up20200824101019 updates the tf object detection training workflow template
func Up20200824101019(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200824101019]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
// Update tfObjectDetectionTraining
workflowTemplate := &v1.WorkflowTemplate{
Name: tensorflowObjectDetectionWorkflowTemplateName,
Manifest: tensorflowObjectDetectionTraining2,
Labels: map[string]string{
"used-by": "cvat",
},
}
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
return err
}
for _, namespace := range namespaces {
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
if err != nil {
return err
}
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
return err
}
}
return nil
}
// Down20200824101019 does nothing
func Down20200824101019(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,206 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const cvatWorkspaceTemplate6 = `# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
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.12.0-rc.6_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: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /home/django/data
- name: keys
mountPath: /home/django/keys
- name: logs
mountPath: /home/django/logs
- name: models
mountPath: /home/django/models
- name: share
mountPath: /home/django/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.12.0-rc.1_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
imagePullPolicy: Always
args:
- download
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
routes:
- 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
timeout: 600s
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
timeout: 600s
# 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`
func initialize20200824101905() {
if _, ok := initializedMigrations[20200824101905]; !ok {
goose.AddMigration(Up20200824101905, Down20200824101905)
initializedMigrations[20200824101905] = true
}
}
// Up20200824101905 updates the cvat workspace template
func Up20200824101905(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200824101905]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate6,
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
}
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
if err != nil {
return err
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200824101905 does nothing
func Down20200824101905(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,206 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const cvatWorkspaceTemplate7 = `# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
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.12.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: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /home/django/data
- name: keys
mountPath: /home/django/keys
- name: logs
mountPath: /home/django/logs
- name: models
mountPath: /home/django/models
- name: share
mountPath: /home/django/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
imagePullPolicy: Always
args:
- download
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
routes:
- 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
timeout: 600s
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
timeout: 600s
# 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`
func initialize20200825154403() {
if _, ok := initializedMigrations[20200825154403]; !ok {
goose.AddMigration(Up20200825154403, Down20200825154403)
initializedMigrations[20200825154403] = true
}
}
// Up20200825154403 runs the migration to upgrade the cvat workspace template
func Up20200825154403(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200825154403]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate7,
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
}
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
if err != nil {
return err
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200825154403 does nothing
func Down20200825154403(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,218 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const cvatWorkspaceTemplate8 = `# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
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.12.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: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /home/django/data
- name: keys
mountPath: /home/django/keys
- name: logs
mountPath: /home/django/logs
- name: models
mountPath: /home/django/models
- name: share
mountPath: /home/django/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
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
timeout: 600s
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
timeout: 600s
# 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`
func initialize20200826185926() {
if _, ok := initializedMigrations[20200826185926]; !ok {
goose.AddMigration(Up20200826185926, Down20200826185926)
initializedMigrations[20200826185926] = true
}
}
// Up20200826185926 runs the migration to upgrade the cvat workspace template
func Up20200826185926(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200826185926]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate8,
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
}
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
if err != nil {
return err
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200826185926 does nothing
func Down20200826185926(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,68 @@
package migration
import (
"database/sql"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
func initialize20200922103448() {
if _, ok := initializedMigrations[20200922103448]; !ok {
goose.AddMigration(Up20200922103448, Down20200922103448)
initializedMigrations[20200922103448] = true
}
}
// Up20200922103448 adds a description to the jupyterlab workspace template
func Up20200922103448(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200922103448]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate, err := client.GetWorkspaceTemplate(namespace.Name, uid, 0)
if err != nil {
return err
}
if workspaceTemplate == nil {
continue
}
// Adding description
workspaceTemplate.Description = "Interactive development environment for notebooks"
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200922103448 does nothing
func Down20200922103448(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,123 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const vscodeWorkspaceTemplate = `
# Docker containers that are part of the Workspace
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 ."]
ports:
- containerPort: 8080
name: vscode
volumeMounts:
- name: data
mountPath: /data
ports:
- name: vscode
port: 8080
protocol: TCP
targetPort: 8080
routes:
- match:
- uri:
prefix: / #vscode runs at the default route
route:
- destination:
port:
number: 8080
# DAG Workflow to be executed once a Workspace action completes (optional)
#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
`
const vscodeWorkspaceTemplateName = "Visual Studio Code"
func initialize20200929144301() {
if _, ok := initializedMigrations[20200929144301]; !ok {
goose.AddMigration(Up20200929144301, Down20200929144301)
initializedMigrations[20200929144301] = true
}
}
// Up20200929144301 adds Visual Studio Code as a workspace template.
func Up20200929144301(tx *sql.Tx) error {
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200929144301]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
workspaceTemplate := &v1.WorkspaceTemplate{
Name: vscodeWorkspaceTemplateName,
Manifest: vscodeWorkspaceTemplate,
}
// Adding description
workspaceTemplate.Description = "Open source code editor"
for _, namespace := range namespaces {
if _, err := client.CreateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20200929144301 removes Visual Studio Code from workspace templates.
func Down20200929144301(tx *sql.Tx) error {
client, err := getClient()
if err != nil {
return err
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(vscodeWorkspaceTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
if _, err := client.ArchiveWorkspaceTemplate(namespace.Name, uid); err != nil {
return err
}
}
return nil
}

View File

@@ -0,0 +1,148 @@
package migration
import (
"database/sql"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const jupyterWorkspaceTemplate3 = `
# Docker containers that are part of the Workspace
containers:
- name: jupyterlab-tensorflow
image: onepanel/jupyterlab:1.0.1
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh 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"]
env:
- name: tornado
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
args:
ports:
- containerPort: 8888
name: jupyterlab
- containerPort: 6006
name: tensorboard
volumeMounts:
- name: data
mountPath: /data
ports:
- name: jupyterlab
port: 80
protocol: TCP
targetPort: 8888
- name: tensorboard
port: 6006
protocol: TCP
targetPort: 6006
routes:
- match:
- uri:
prefix: /tensorboard
route:
- destination:
port:
number: 6006
- match:
- uri:
prefix: / #jupyter runs at the default route
route:
- destination:
port:
number: 80
# DAG Workflow to be executed once a Workspace action completes (optional)
#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
`
func initialize20200929153931() {
if _, ok := initializedMigrations[20200929153931]; !ok {
goose.AddMigration(Up20200929153931, Down20200929153931)
initializedMigrations[20200929153931] = true
}
}
// Up20200929153931 updates jupyterlab workspace to include the onepanel-sdk
func Up20200929153931(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200929153931]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
if _, err := client.UpdateWorkspaceTemplateManifest(namespace.Name, uid, jupyterWorkspaceTemplate3); err != nil {
return err
}
}
return nil
}
// Down20200929153931 removes the onepanel-sdk addition.
func Down20200929153931(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20200929153931]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
if _, err := client.UpdateWorkspaceTemplateManifest(namespace.Name, uid, jupyterWorkspaceTemplate2); err != nil {
return err
}
}
return nil
}

View File

@@ -0,0 +1,216 @@
package migration
import (
"database/sql"
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/pressly/goose"
)
const cvatWorkspaceTemplate9 = `# Workspace arguments
arguments:
parameters:
- name: sync-directory
displayName: Directory to sync raw input and training output
value: workflow-data
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
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.12.1_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: /home/django/data
- 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"
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /home/django/data
- name: keys
mountPath: /home/django/keys
- name: logs
mountPath: /home/django/logs
- name: models
mountPath: /home/django/models
- name: share
mountPath: /home/django/share
- name: sys-namespace-config
mountPath: /etc/onepanel
readOnly: true
- name: cvat-ui
image: onepanel/cvat-ui:0.12.1_cvat.1.0.0
ports:
- containerPort: 80
name: http
# You can add multiple FileSyncer sidecar containers if needed
- name: filesyncer
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
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
# 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`
func initialize20201001070806() {
if _, ok := initializedMigrations[20201001070806]; !ok {
goose.AddMigration(Up20201001070806, Down20201001070806)
initializedMigrations[20201001070806] = true
}
}
// Up20201001070806 updates the cvat workspace
func Up20201001070806(tx *sql.Tx) error {
// This code is executed when the migration is applied.
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
migrationsRan, err := getRanSQLMigrations(client)
if err != nil {
return err
}
if _, ok := migrationsRan[20201001070806]; ok {
return nil
}
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: cvatTemplateName,
Manifest: cvatWorkspaceTemplate9,
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
}
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
if err != nil {
return err
}
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
return err
}
}
return nil
}
// Down20201001070806 does nothing
func Down20201001070806(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,25 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20201016170415() {
if _, ok := initializedMigrations[20201016170415]; !ok {
goose.AddMigration(Up20201016170415, Down20201016170415)
initializedMigrations[20201016170415] = true
}
}
// Up20201016170415 updates cvat to a new version
func Up20201016170415(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest("20201016170415_cvat.yaml", cvatTemplateName)
}
// Down20201016170415 does nothing
func Down20201016170415(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,26 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20201028145442() {
if _, ok := initializedMigrations[20201028145442]; !ok {
goose.AddMigration(Up20201028145442, Down20201028145442)
initializedMigrations[20201028145442] = true
}
}
// Up20201028145442 updates the jupyterlab workspace to include container lifecycle hooks.
// These hooks will attempt to persist conda, pip, and jupyterlab extensions between pause and shut-down.
func Up20201028145442(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest("20201028145442_jupyterlab.yaml", jupyterLabTemplateName)
}
// Down20201028145442 removes the lifecycle hooks from the template.
func Down20201028145442(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@@ -0,0 +1,28 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20201028145443() {
if _, ok := initializedMigrations[20201028145443]; !ok {
goose.AddMigration(Up20201028145443, Down20201028145443)
initializedMigrations[20201028145443] = true
}
}
// Up20201028145443 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 Up20201028145443(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest("vscode_20201028145443.yaml", vscodeWorkspaceTemplateName)
}
// Down20201028145443 removes the lifecycle hooks from VSCode workspace template.
func Down20201028145443(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest("vscode_20201028145443.yaml", vscodeWorkspaceTemplateName)
}

View File

@@ -0,0 +1,26 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20201031165106() {
if _, ok := initializedMigrations[20201031165106]; !ok {
goose.AddMigration(Up20201031165106, Down20201031165106)
initializedMigrations[20201031165106] = true
}
}
// Up20201031165106 updates the jupyterlab workspace to include container lifecycle hooks.
// These hooks will attempt to persist conda, pip, and jupyterlab extensions between pause and shut-down.
func Up20201031165106(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest("20201031165106_jupyterlab.yaml", jupyterLabTemplateName)
}
// Down20201031165106 removes the lifecycle hooks from the template.
func Down20201031165106(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest("20201028145442_jupyterlab.yaml", jupyterLabTemplateName)
}

View File

@@ -0,0 +1,27 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func initialize20201102104048() {
if _, ok := initializedMigrations[20201102104048]; !ok {
goose.AddMigration(Up20201102104048, Down20201102104048)
initializedMigrations[20201102104048] = true
}
}
// Up20201102104048 updates CVAT to use less volumes.
// Through the use of environment variables, various CVAT data directories
// are placed under one path, and that path is on one volume.
func Up20201102104048(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest("20201102104048_cvat.yaml", cvatTemplateName)
}
// Down20201102104048 reverts CVAT back to original amount of volumes.
func Down20201102104048(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest("20201016170415_cvat.yaml", cvatTemplateName)
}

View File

@@ -1,10 +1,15 @@
package migration
import (
"errors"
sq "github.com/Masterminds/squirrel"
"github.com/jmoiron/sqlx"
v1 "github.com/onepanelio/core/pkg"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
)
// initializedMigrations is used to keep track of which migrations have been initialized.
@@ -47,6 +52,22 @@ func Initialize() {
initialize20200728190804()
initialize20200812104328()
initialize20200812113316()
initialize20200814160856()
initialize20200821162630()
initialize20200824095513()
initialize20200824101019()
initialize20200824101905()
initialize20200825154403()
initialize20200826185926()
initialize20200922103448()
initialize20200929144301()
initialize20200929153931()
initialize20201001070806()
initialize20201016170415()
initialize20201028145442()
initialize20201028145443()
initialize20201031165106()
initialize20201102104048()
if err := client.DB.Close(); err != nil {
log.Printf("[error] closing db %v", err)
@@ -89,3 +110,43 @@ func getRanSQLMigrations(client *v1.Client) (map[uint64]bool, error) {
return result, nil
}
// ReplaceArtifactRepositoryType will look for {{.ArtifactRepositoryType}} in the migration and replace it based on config.
func ReplaceArtifactRepositoryType(client *v1.Client, namespace *v1.Namespace, workflowTemplate *v1.WorkflowTemplate, workspaceTemplate *v1.WorkspaceTemplate) error {
artifactRepositoryType := "s3"
nsConfig, err := client.GetNamespaceConfig(namespace.Name)
if err != nil {
return err
}
if nsConfig.ArtifactRepository.GCS != nil {
artifactRepositoryType = "gcs"
}
if workflowTemplate != nil {
workflowTemplate.Manifest = strings.NewReplacer(
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workflowTemplate.Manifest)
}
if workspaceTemplate != nil {
workspaceTemplate.Manifest = strings.NewReplacer(
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
}
if workflowTemplate == nil && workspaceTemplate == nil {
return errors.New("workflow and workspace template cannot be nil")
}
return nil
}
// readDataFile returns the contents of a file in the db/data/{name} directory
func readDataFile(name string) (string, error) {
curDir, err := os.Getwd()
if err != nil {
return "", err
}
data, err := ioutil.ReadFile(filepath.Join(curDir, "db", "data", name))
if err != nil {
return "", err
}
return string(data), nil
}

49
db/go/util.go Normal file
View File

@@ -0,0 +1,49 @@
package migration
import (
v1 "github.com/onepanelio/core/pkg"
uid2 "github.com/onepanelio/core/pkg/util/uid"
)
// updateWorkspaceTemplateManifest will update the workspace template given by {{templateName}} with the contents
// given by {{filename}}
// It will do so for all namespaces.
func updateWorkspaceTemplateManifest(filename, templateName string) error {
client, err := getClient()
if err != nil {
return err
}
defer client.DB.Close()
namespaces, err := client.ListOnepanelEnabledNamespaces()
if err != nil {
return err
}
newManifest, err := readDataFile(filename)
if err != nil {
return err
}
uid, err := uid2.GenerateUID(templateName, 30)
if err != nil {
return err
}
for _, namespace := range namespaces {
workspaceTemplate := &v1.WorkspaceTemplate{
UID: uid,
Name: templateName,
Manifest: newManifest,
}
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
if err != nil {
return err
}
if _, err := client.UpdateWorkspaceTemplateManifest(namespace.Name, uid, workspaceTemplate.Manifest); err != nil {
return err
}
}
return nil
}

View File

@@ -0,0 +1,24 @@
-- +goose Up
-- SQL in this section is executed when the migration is applied.
UPDATE workflow_executions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workflow_templates
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workspace_templates
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workflow_template_versions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workspace_template_Versions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.

View File

@@ -0,0 +1,46 @@
# Background
A user may install pip packages, conda packages, jupyterlab extensions,
or vscode extensions.
To improve the user experience, we should save these packages
when the user pauses and resumes the workspace.
- And when the user changes the workspace machine.
To achieve this end, were using lifecycle hooks for containers, via Kubernetes.
Well add these hooks to workspace templates, to VSCode and JupyterLab.
Note: We're not supporting CVAT Workspace persistence.
- User does not have access to the terminal through the UI.
# Problem(s)
Originally, we attempted to tar up the packages of conda, vscode, and jupyter.
This worked, but ate non-trivial amount of space. Roughly ~2 GB with a clean workspace,
using our dockerfile image.
- So we'd need to warn the user to have enough space for their volume mounts
- We'd also have to warn the user that if there is not enough space, the packages
may not persist.
The other problem was we needed to extend the terminationGracePeriodSeconds of the
pod.
- K8s sets 30 seconds by default
We use the preStop hook to do the back-up.
- This operation runs for 2-3 minutes on a clean workspace image
- For a user with more packages, it would take longer.
- k8s will grant a 2 second increase once, if preStop is not done.
Otherwise, k8s kills the preStop hook and the container.
We thought about exposing the terminationGracePeriodSeconds to the user,
allow them to change this value as needed.
And lastly, k8s will wait the entire grace period.
- Even if the preStop hook finishes early, k8s will wait to kill the container.
- In testing, k8s waited 20 minutes before terminating the container
So we decided to export the list of installed packages, as a text file.
- Then, we re-install on workspace start-up with postStart hook.
# References
- https://github.com/onepanelio/core/issues/623

1
go.mod
View File

@@ -43,4 +43,5 @@ require (
k8s.io/apimachinery v0.16.7-beta.0
k8s.io/client-go v0.16.4
sigs.k8s.io/yaml v1.2.0
github.com/dgrijalva/jwt-go v3.2.0+incompatible
)

BIN
img/auto-annotation.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/jupyterlab.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
img/onepanel.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

BIN
img/pipelines.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB

BIN
img/tools.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 KiB

27
main.go
View File

@@ -4,20 +4,6 @@ import (
"context"
"flag"
"fmt"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
corev1 "k8s.io/api/core/v1"
apiv1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
k8runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"math"
"net"
"net/http"
"path/filepath"
"strings"
"github.com/gorilla/handlers"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus"
@@ -34,6 +20,19 @@ import (
log "github.com/sirupsen/logrus"
"github.com/tmc/grpc-websocket-proxy/wsproxy"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
corev1 "k8s.io/api/core/v1"
apiv1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
k8runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"math"
"net"
"net/http"
"path/filepath"
"strings"
)
var (

View File

@@ -4,6 +4,7 @@ import (
"fmt"
sq "github.com/Masterminds/squirrel"
argoprojv1alpha1 "github.com/argoproj/argo/pkg/client/clientset/versioned/typed/workflow/v1alpha1"
"github.com/jmoiron/sqlx"
"github.com/onepanelio/core/pkg/util/gcs"
"github.com/onepanelio/core/pkg/util/router"
"github.com/onepanelio/core/pkg/util/s3"
@@ -18,6 +19,7 @@ type Config = rest.Config
var sb = sq.StatementBuilder.PlaceholderFormat(sq.Dollar)
type Client struct {
Token string
kubernetes.Interface
argoprojV1alpha1 argoprojv1alpha1.ArgoprojV1alpha1Interface
*DB
@@ -38,6 +40,37 @@ func NewConfig() (config *Config) {
return
}
// GetDefaultClient loads a default k8s client
func GetDefaultClient() (*Client, error) {
kubeConfig := NewConfig()
client, err := NewClient(kubeConfig, nil, nil)
if err != nil {
return nil, err
}
config, err := client.GetSystemConfig()
if err != nil {
return nil, err
}
dbDriverName, dbDataSourceName := config.DatabaseConnection()
client.DB = NewDB(sqlx.MustConnect(dbDriverName, dbDataSourceName))
return client, nil
}
// GetDefaultClientWithDB loads a default k8s client with an existing DB
func GetDefaultClientWithDB(db *DB) (*Client, error) {
kubeConfig := NewConfig()
client, err := NewClient(kubeConfig, nil, nil)
if err != nil {
return nil, err
}
client.DB = db
return client, nil
}
// NewClient creates a client to interact with the Onepanel system.
// It includes access to the database, kubernetes, argo, and configuration.
func NewClient(config *Config, db *DB, systemConfig SystemConfig) (client *Client, err error) {

View File

@@ -100,7 +100,6 @@ func DefaultTestClient() *Client {
func clearDatabase(t *testing.T) {
// We do not delete from goose_db_version as we need it to mark the migrations as ran.
query := `
DELETE FROM labels;
DELETE FROM workspaces;
DELETE FROM workflow_executions;
DELETE FROM cron_workflows;

View File

@@ -48,8 +48,8 @@ func TestParseParametersFromManifest(t *testing.T) {
// Make sure visibility is set
assert.Equal(t, *keyedParameters["dataset-path"].Visibility, "public")
// Make sure visibility is not set if omitted
assert.Nil(t, keyedParameters["tf-image"].Visibility)
// Make sure visibility is public if omitted
assert.Equal(t, *keyedParameters["tf-image"].Visibility, "public")
// Make sure numbers, slashes, dashes, and letters are parsed correctly
assert.Equal(t, *keyedParameters["tf-image"].Value, "tensorflow/tensorflow:1.13.1-py3")

View File

@@ -3,13 +3,12 @@ package v1
import (
"encoding/base64"
"fmt"
"strings"
"github.com/onepanelio/core/pkg/util/ptr"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
corev1 "k8s.io/api/core/v1"
k8yaml "sigs.k8s.io/yaml"
"strings"
)
// SystemConfig is configuration loaded from kubernetes config and secrets that includes information about the
@@ -38,6 +37,12 @@ func NewSystemConfig(configMap *ConfigMap, secret *Secret) (config SystemConfig,
}
config["databasePassword"] = string(databasePassword)
hmac, err := base64.StdEncoding.DecodeString(secret.Data["hmac"])
if err != nil {
return
}
config["hmac"] = string(hmac)
return
}
@@ -183,6 +188,16 @@ func (s SystemConfig) UpdateNodePoolOptions(parameters []Parameter) ([]Parameter
return result, nil
}
// HMACKey gets the HMAC value, or nil.
func (s SystemConfig) HMACKey() []byte {
hmac := s.GetValue("hmac")
if hmac == nil {
return []byte{}
}
return []byte(*hmac)
}
// ArtifactRepositoryS3Provider is meant to be used
// by the CLI. CLI will marshal this struct into the correct
// YAML structure for k8s configmap / secret.

View File

@@ -7,7 +7,7 @@ import (
argojson "github.com/argoproj/pkg/json"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/label"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/request/pagination"
uid2 "github.com/onepanelio/core/pkg/util/uid"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
@@ -433,7 +433,6 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64
if err != nil {
return
}
createdCronWorkflow, err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Create(cwf)
if err != nil {
return nil, err

View File

@@ -3,8 +3,8 @@ package v1
import (
"encoding/json"
"github.com/onepanelio/core/pkg/util/mapping"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
"github.com/onepanelio/core/util/sql"
"gopkg.in/yaml.v2"
"time"
)

28
pkg/filter.go Normal file
View File

@@ -0,0 +1,28 @@
package v1
import sq "github.com/Masterminds/squirrel"
// LabelFilter represents a filter that has labels
type LabelFilter interface {
// GetLabels returns the labels to filter by. These are assumed to be ANDed together.
GetLabels() []*Label
}
// ApplyLabelSelectQuery returns a query builder that adds where statements to filter by labels in the filter, if there are any
// labelSelector is the database column that has the labels, such as "we.labels" for workflowExecutions aliased by "we".
func ApplyLabelSelectQuery(labelSelector string, sb sq.SelectBuilder, filter LabelFilter) (sq.SelectBuilder, error) {
labels := filter.GetLabels()
if len(labels) == 0 {
return sb, nil
}
labelsJSON, err := LabelsToJSONString(labels)
if err != nil {
return sb, err
}
sb = sb.Where(labelSelector+" @> ?", labelsJSON)
return sb, nil
}

View File

@@ -8,8 +8,65 @@ import (
"github.com/onepanelio/core/pkg/util/mapping"
"github.com/onepanelio/core/pkg/util/types"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"strings"
)
// SelectLabelsQuery represents the options available to filter a select labels query
type SelectLabelsQuery struct {
Table string
Alias string
Namespace string
KeyLike string
Skip []string
}
// SkipKeysFromString parses keys encoded in a string and returns an array of keys
// The separator is ";"
func SkipKeysFromString(keys string) []string {
results := make([]string, 0)
for _, key := range strings.Split(keys, ";") {
if key == "" {
continue
}
results = append(results, key)
}
return results
}
// SelectLabels returns a SelectBuilder that selects key, value columns from the criteria specified in query
func SelectLabels(query *SelectLabelsQuery) sq.SelectBuilder {
// Sample query
// SELECT DISTINCT labels.*
// FROM workflow_executions w,
// jsonb_each_text(w.labels) labels
// WHERE labels.key LIKE 'ca%'
// AND labels.key NOT IN ('catdog')
// AND namespace = 'onepanel'
// AND labels != 'null'::jsonb
fromTable := fmt.Sprintf("%s %s", query.Table, query.Alias)
fromJsonb := fmt.Sprintf("jsonb_each_text(%s.labels) labels", query.Alias)
bld := sb.Select("key", "value").
Distinct().
From(fromTable + ", " + fromJsonb).
Where("labels != 'null'::jsonb")
if query.Namespace != "" {
bld = bld.Where(sq.Eq{query.Alias + ".namespace": query.Namespace})
}
if query.KeyLike != "" {
bld = bld.Where(sq.Like{"labels.key": query.KeyLike})
}
if len(query.Skip) != 0 {
bld = bld.Where(sq.NotEq{"labels.key": query.Skip})
}
return bld
}
func (c *Client) ListLabels(resource string, uid string) (labels []*Label, err error) {
sb := sb.Select("labels").
From(TypeToTableName(resource))
@@ -49,6 +106,22 @@ func (c *Client) ListLabels(resource string, uid string) (labels []*Label, err e
return
}
// ListAvailableLabels lists the labels available for the resource specified by the query
func (c *Client) ListAvailableLabels(query *SelectLabelsQuery) (result []*Label, err error) {
selectLabelsBuilder := SelectLabels(query)
// Don't select labels from Terminated workspaces.
if query.Table == "workspaces" {
selectLabelsBuilder = selectLabelsBuilder.Where(sq.NotEq{
"workspaces.phase": "Terminated",
})
}
err = c.Selectx(&result, selectLabelsBuilder)
return
}
func (c *Client) AddLabels(namespace, resource, uid string, keyValues map[string]string) error {
source, meta, err := c.GetK8sLabelResource(namespace, resource, uid)
if err != nil {

View File

@@ -67,13 +67,32 @@ type Metric struct {
type WorkflowExecutionStatisticReport struct {
WorkflowTemplateId uint64 `db:"workflow_template_id"`
Total int32
LastExecuted time.Time `db:"last_executed"`
LastExecuted *time.Time `db:"last_executed"`
Running int32
Completed int32
Failed int32
Terminated int32
}
// WorkspaceStatisticReport contains stats on the phases the workspaces in the system are in
type WorkspaceStatisticReport struct {
LastCreated *time.Time `db:"last_created"`
Launching int32
Running int32
Updating int32
Pausing int32
Paused int32
Terminating int32
Terminated int32
FailedToPause int32 `db:"failed_to_pause" json:"failedToPause"`
FailedToResume int32 `db:"failed_to_resume" json:"failedToResume"`
FailedToTerminate int32 `db:"failed_to_terminate" json:"failedToTerminate"`
FailedToLaunch int32 `db:"failed_to_launch" json:"failedToLaunch"`
FailedToUpdate int32 `db:"failed_to_update" json:"failedToUpdate"`
Failed int32
Total int32
}
type CronWorkflowStatisticReport struct {
WorkflowTemplateId uint64 `db:"workflow_template_id"`
Total int32

View File

@@ -10,6 +10,14 @@ type PaginationRequest struct {
PageSize uint64
}
// New creates a new pagination request from the page and page size.
func New(page, pageSize int32) *PaginationRequest {
pr := NewRequest(page, pageSize)
return &pr
}
// NewRequest creates a new pagination request (not pointer) from the page and page size
func NewRequest(page, pageSize int32) PaginationRequest {
if page == 0 {
page = 1

View File

@@ -0,0 +1,36 @@
package request
import (
"github.com/Masterminds/squirrel"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/onepanelio/core/pkg/util/request/sort"
)
// Request creates a new resource request with criteria to pagination, filter, and sort the results.
type Request struct {
Pagination *pagination.PaginationRequest
Filter interface{}
Sort *sort.Criteria
}
// HasSorting returns true if there are any sorting criteria in the request
func (r *Request) HasSorting() bool {
return r != nil &&
r.Sort != nil &&
len(r.Sort.Properties) > 0
}
// HasFilter returns true if there is any filtering criteria in the request
func (r *Request) HasFilter() bool {
return r != nil &&
r.Filter != nil
}
// ApplyPaginationToSelect applies the pagination to the selectBuilder, if there is a pagination.
func (r *Request) ApplyPaginationToSelect(sb *squirrel.SelectBuilder) *squirrel.SelectBuilder {
if r == nil || r.Pagination == nil {
return sb
}
return r.Pagination.ApplyToSelect(sb)
}

View File

@@ -0,0 +1,65 @@
package sort
import (
"fmt"
"strings"
)
// Order represents a sorting order such as created_at, desc
type Order struct {
Property string
Direction string
}
// Criteria represents the sorting criteria for a list of resources
type Criteria struct {
Properties []Order
}
// New parses the properties, represented as comma delimited fields, into a Criteria struct
// The first part is the properties, the second part is the delimiter used between properties. If none is provided,
// a semi-colon (;) is used.
// Each property is assumed to be of the form: propertyName,desc;propertyName2;asc
// example: createdAt,desc;name,asc
func New(parts ...string) (*Criteria, error) {
if len(parts) == 0 {
return nil, fmt.Errorf("no properties provided to create a Criteria")
}
separator := ";"
if len(parts) > 1 {
separator = parts[1]
}
criteria := &Criteria{
Properties: make([]Order, 0),
}
if parts[0] == "" {
return criteria, nil
}
items := strings.Split(parts[0], separator)
for _, item := range items {
parts := strings.Split(item, ",")
if len(parts) != 2 {
return nil, fmt.Errorf("badly formatted sort: '%v'", item)
}
direction := strings.ToLower(parts[1])
if direction != "asc" && direction != "desc" {
return nil, fmt.Errorf("unknown sort '%v'", parts[1])
}
newSort := Order{
Property: parts[0],
Direction: direction,
}
criteria.Properties = append(criteria.Properties, newSort)
}
return criteria, nil
}

36
pkg/util/router/api.go Normal file
View File

@@ -0,0 +1,36 @@
package router
import "fmt"
// API provides methods to generate urls for the API
type API interface {
UpdateWorkspaceStatus(namespace, uid string) string
}
// api is a basic implementation of router.API
type api struct {
protocol string
fqdn string
}
// UpdateWorkspaceStatus generates a url to update the status of a workspace
func (a *api) UpdateWorkspaceStatus(namespace, uid string) string {
// <protocol><fqdn>/apis/v1beta1/{namespace}/workspaces/{uid}/status
return fmt.Sprintf("%v%v/apis/v1beta1/%v/workspaces/%v/status", a.protocol, a.fqdn, namespace, uid)
}
// NewAPIRouter creates a new api router used to generate urls for the api
func NewAPIRouter(protocol, fqdn string) (API, error) {
return &api{
protocol: protocol,
fqdn: fqdn,
}, nil
}
// NewRelativeAPIRouter creates an api router that does relative routes, with no protocol or fqdn
func NewRelativeAPIRouter() (API, error) {
return &api{
protocol: "",
fqdn: "",
}, nil
}

View File

@@ -10,7 +10,7 @@ type Web interface {
WorkflowExecution(namespace, uid string) string
}
// web is a basic implementation of WebRouter
// web is a basic implementation of router.Web
type web struct {
protocol string
fqdn string
@@ -18,7 +18,7 @@ type web struct {
// WorkflowExecution generates a url to view a specific workflow
func (w *web) WorkflowExecution(namespace, uid string) string {
// <protocol>:<fqdn>/<namespace>/workflows/<uid>
// <protocol><fqdn>/<namespace>/workflows/<uid>
return fmt.Sprintf("%v%v/%v/workflows/%v", w.protocol, w.fqdn, namespace, uid)
}
@@ -29,3 +29,11 @@ func NewWebRouter(protocol, fqdn string) (Web, error) {
fqdn: fqdn,
}, nil
}
// NewRelativeWebRouter creates a web router that does relative routes, with no protocol or fqdn
func NewRelativeWebRouter() (Web, error) {
return &web{
protocol: "",
fqdn: "",
}, nil
}

View File

@@ -1,6 +1,8 @@
package sql
import "fmt"
import (
"fmt"
)
// FormatColumnSelect returns a list of column names to be used in a SQL Select modified with optional alias and destination.
//

View File

@@ -21,7 +21,12 @@ func (l *JSONLabels) Unmarshal(v interface{}) error {
// Value returns j as a value. This does a validating unmarshal into another
// RawMessage. If j is invalid json, it returns an error.
// Note that nil values will return "{}" - empty JSON.
func (l JSONLabels) Value() (driver.Value, error) {
if l == nil {
return json.Marshal(make(map[string]string))
}
return json.Marshal(l)
}

View File

@@ -10,8 +10,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/onepanelio/core/pkg/util/gcs"
"github.com/onepanelio/core/pkg/util/label"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"golang.org/x/net/context"
@@ -62,6 +62,63 @@ func typeWorkflow(wf *wfv1.Workflow) (workflow *WorkflowExecution) {
return
}
// WorkflowExecutionFilter represents the available ways we can filter WorkflowExecutions
type WorkflowExecutionFilter struct {
Labels []*Label
Phase string // empty string means none
}
// GetLabels returns the labels in the filter
func (wf *WorkflowExecutionFilter) GetLabels() []*Label {
return wf.Labels
}
func applyWorkflowExecutionFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
if !request.HasFilter() {
return sb, nil
}
filter, ok := request.Filter.(WorkflowExecutionFilter)
if !ok {
return sb, nil
}
sb, err := ApplyLabelSelectQuery("we.labels", sb, &filter)
if err != nil {
return sb, err
}
switch filter.Phase {
case "":
return sb, nil
case "running":
sb = sb.Where(sq.Eq{
"we.finished_at": nil,
"we.phase": []string{"Running", "Pending"},
})
case "completed":
sb = sb.Where(sq.NotEq{
"we.finished_at": nil,
}).Where(sq.Eq{
"we.phase": "Succeeded",
})
case "failed":
sb = sb.Where(sq.NotEq{
"we.finished_at": nil,
}).Where(sq.Eq{
"we.phase": []string{"Failed", "Error"},
})
case "stopped":
sb = sb.Where(sq.Eq{
"we.phase": "Terminated",
})
default:
return sb, fmt.Errorf("unknown workflow execution phase filter '%v'", filter.Phase)
}
return sb, nil
}
func UnmarshalWorkflows(wfBytes []byte, strict bool) (wfs []wfv1.Workflow, err error) {
if len(wfBytes) == 0 {
return nil, fmt.Errorf("UnmarshalWorkflows unable to work on empty bytes")
@@ -130,7 +187,7 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na
artifact.GCS.Bucket = gcsConfig.Bucket
artifact.GCS.Key = gcsConfig.KeyFormat
artifact.GCS.ServiceAccountKeySecret.Name = "onepanel"
artifact.GCS.ServiceAccountKeySecret.Key = "serviceAccountKey"
artifact.GCS.ServiceAccountKeySecret.Key = "artifactRepositoryGCSServiceAccountKey"
}
// Default to no compression for artifacts
@@ -139,47 +196,23 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na
}
}
// injectContainerResourceQuotas adds resource requests and limits if they exist
func injectContainerResourceQuotas(wf *wfv1.Workflow, template *wfv1.Template, systemConfig SystemConfig) {
// injectHostPortToContainer adds a hostPort to the template container, if a nodeSelector is present.
// Kubernetes will ensure that multiple containers with the same hostPort do not share the same node.
func (c *Client) injectHostPortToContainer(template *wfv1.Template) error {
if template.NodeSelector == nil {
return
return nil
}
var value string
for k, v := range template.NodeSelector {
if k == *systemConfig.NodePoolLabel() {
value = v
break
}
ports := []corev1.ContainerPort{
{Name: "node-capturer", HostPort: 80, ContainerPort: 80},
}
if value == "" {
return
if template.Container != nil {
template.Container.Ports = ports
}
if strings.Contains(value, "{{workflow.") {
parts := strings.Split(strings.Replace(value, "}}", "", -1), ".")
paramName := parts[len(parts)-1]
for _, param := range wf.Spec.Arguments.Parameters {
if param.Name == paramName && param.Value != nil {
value = *param.Value
break
}
}
}
option, err := systemConfig.NodePoolOptionByValue(value)
if err != nil {
return
}
if option != nil && option.Resources.Limits != nil {
// If a node is selected specifically, match the resources request to limits
option.Resources.Requests = option.Resources.Limits
if template.Container != nil {
template.Container.Resources = option.Resources
}
if template.Script != nil {
template.Script.Container.Resources = option.Resources
}
if template.Script != nil {
template.Script.Container.Ports = ports
}
return nil
}
func injectEnvironmentVariables(container *corev1.Container, systemConfig SystemConfig) {
@@ -249,15 +282,18 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts
Name: "sys-dshm",
MountPath: "/dev/shm",
})
injectContainerResourceQuotas(wf, template, systemConfig)
err = c.injectHostPortToContainer(template)
if err != nil {
return err
}
injectEnvironmentVariables(template.Container, systemConfig)
}
if template.Script != nil {
injectContainerResourceQuotas(wf, template, systemConfig)
err = c.injectHostPortToContainer(template)
if err != nil {
return err
}
injectEnvironmentVariables(&template.Script.Container, systemConfig)
}
@@ -401,6 +437,51 @@ func (c *Client) createWorkflow(namespace string, workflowTemplateID uint64, wor
return
}
func ensureWorkflowRunsOnDedicatedNode(wf *wfv1.Workflow, config SystemConfig) (*wfv1.Workflow, error) {
antiAffinityLabelKey := "onepanel.io/reserves-instance-type"
nodeSelectorVal := ""
addPodAffinity := false
for i := range wf.Spec.Templates {
template := &wf.Spec.Templates[i]
if template.NodeSelector == nil {
continue
}
for _, v := range template.NodeSelector {
if strings.Contains(v, "{{workflow.") {
parts := strings.Split(strings.Replace(v, "}}", "", -1), ".")
paramName := parts[len(parts)-1]
for _, param := range wf.Spec.Arguments.Parameters {
if param.Name == paramName && param.Value != nil {
nodeSelectorVal = *param.Value
break
}
}
}
break
}
template.Metadata.Labels = map[string]string{antiAffinityLabelKey: nodeSelectorVal}
addPodAffinity = true
}
if addPodAffinity {
wf.Spec.Affinity = &corev1.Affinity{
PodAntiAffinity: &corev1.PodAntiAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: []corev1.PodAffinityTerm{
{
LabelSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{Key: antiAffinityLabelKey, Operator: "In", Values: []string{nodeSelectorVal}},
},
},
TopologyKey: "kubernetes.io/hostname",
},
},
},
}
}
return wf, nil
}
func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (err error) {
manifest, err = filterOutCustomTypesFromManifest(manifest)
if err != nil {
@@ -688,11 +769,30 @@ func (c *Client) GetWorkflowExecution(namespace, uid string) (workflow *Workflow
}
// ListWorkflowExecutions gets a list of WorkflowExecutions ordered by most recently created first.
func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, paginator *pagination.PaginationRequest) (workflows []*WorkflowExecution, err error) {
sb := workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion).
OrderBy("we.created_at DESC")
sb = *paginator.ApplyToSelect(&sb)
func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool, request *request.Request) (workflows []*WorkflowExecution, err error) {
sb := workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem)
if request.HasSorting() {
properties := getWorkflowExecutionColumnsMap(true)
for _, order := range request.Sort.Properties {
if columnName, ok := properties[order.Property]; ok {
nullSort := "NULLS FIRST"
if order.Direction == "desc" {
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
}
sb = sb.OrderBy(fmt.Sprintf("we.%v %v %v", columnName, order.Direction, nullSort))
}
}
} else {
sb = sb.OrderBy("we.created_at DESC")
}
sb, err = applyWorkflowExecutionFilter(sb, request)
if err != nil {
return nil, err
}
sb = *request.ApplyPaginationToSelect(&sb)
if err := c.DB.Selectx(&workflows, sb); err != nil {
return nil, err
}
@@ -701,10 +801,16 @@ func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflow
}
// CountWorkflowExecutions returns the number of workflow executions
func (c *Client) CountWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string) (count int, err error) {
err = workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion).
Columns("COUNT(*)").
RunWith(c.DB).
func (c *Client) CountWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool, request *request.Request) (count int, err error) {
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem).
Columns("COUNT(*)")
sb, err = applyWorkflowExecutionFilter(sb, request)
if err != nil {
return
}
err = sb.RunWith(c.DB).
QueryRow().
Scan(&count)
@@ -1234,7 +1340,7 @@ func (c *Client) ListFiles(namespace, key string) (files []*File, err error) {
doneCh := make(chan struct{})
defer close(doneCh)
for objInfo := range s3Client.ListObjectsV2(config.ArtifactRepository.S3.Bucket, key, false, doneCh) {
for objInfo := range s3Client.ListObjects(config.ArtifactRepository.S3.Bucket, key, false, doneCh) {
if objInfo.Key == key {
continue
}
@@ -1482,6 +1588,33 @@ func (c *Client) SetWorkflowTemplateLabels(namespace, uid, prefix string, keyVal
return filteredMap, nil
}
// GetWorkflowExecutionStatisticsForNamespace loads statistics on workflow executions for the provided namespace
func (c *Client) GetWorkflowExecutionStatisticsForNamespace(namespace string) (report *WorkflowExecutionStatisticReport, err error) {
statsSelect := `
MAX(we.created_at) last_executed,
COUNT(*) FILTER (WHERE finished_at IS NULL AND (phase = 'Running' OR phase = 'Pending')) running,
COUNT(*) FILTER (WHERE finished_at IS NOT NULL AND phase = 'Succeeded') completed,
COUNT(*) FILTER (WHERE finished_at IS NOT NULL AND (phase = 'Failed' OR phase = 'Error')) failed,
COUNT(*) FILTER (WHERE phase = 'Terminated') terminated,
COUNT(*) total`
query := sb.Select(statsSelect).
From("workflow_executions we").
LeftJoin("workflow_template_versions wtv ON we.workflow_template_version_id = wtv.id").
LeftJoin("workflow_templates wt ON wtv.workflow_template_id = wt.id").
Where(sq.Eq{
"we.namespace": namespace,
"wt.is_system": false,
})
report = &WorkflowExecutionStatisticReport{}
err = c.DB.Getx(report, query)
return
}
// GetWorkflowExecutionStatisticsForTemplates loads statistics on workflow executions for the provided
// workflowTemplates and sets it as the WorkflowExecutionStatisticReport property
func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ...*WorkflowTemplate) (err error) {
if len(workflowTemplates) == 0 {
return nil
@@ -1492,16 +1625,6 @@ func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ..
return err
}
whereIn := "wtv.workflow_template_id IN (?"
for i := range workflowTemplates {
if i == 0 {
continue
}
whereIn += ",?"
}
whereIn += ")"
ids := make([]interface{}, len(workflowTemplates))
for i, workflowTemplate := range workflowTemplates {
ids[i] = workflowTemplate.ID
@@ -1521,7 +1644,9 @@ func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ..
query, args, err := sb.Select(statsSelect).
From("workflow_executions we").
Join("workflow_template_versions wtv ON wtv.id = we.workflow_template_version_id").
Where(whereIn, ids...).
Where(sq.Eq{
"wtv.workflow_template_id": ids,
}).
GroupBy("wtv.workflow_template_id").
ToSql()
@@ -1555,17 +1680,8 @@ Will build a template that makes a CURL request to the onepanel-core API,
with statistics about the workflow that was just executed.
*/
func getCURLNodeTemplate(name, curlMethod, curlPath, curlBody string, inputs wfv1.Inputs) (template *wfv1.Template, err error) {
host := env.GetEnv("ONEPANEL_CORE_SERVICE_HOST", "onepanel-core.onepanel.svc.cluster.local")
if host == "" {
err = errors.New("ONEPANEL_CORE_SERVICE_HOST is empty.")
return
}
port := env.GetEnv("ONEPANEL_CORE_SERVICE_PORT", "80")
if port == "" {
err = errors.New("ONEPANEL_CORE_SERVICE_PORT is empty.")
return
}
endpoint := fmt.Sprintf("http://%s:%s%s", host, port, curlPath)
host := "onepanel-core.onepanel.svc.cluster.local"
endpoint := fmt.Sprintf("http://%s%s", host, curlPath)
template = &wfv1.Template{
Name: name,
Inputs: inputs,
@@ -1692,13 +1808,13 @@ func injectWorkflowExecutionStatusCaller(wf *wfv1.Workflow, phase wfv1.NodePhase
for j, task := range t.DAG.Tasks {
if task.Dependencies == nil {
wf.Spec.Templates[i].DAG.Tasks[j].Dependencies = []string{containerTemplate.Name}
wf.Spec.Templates[i].DAG.Tasks = append(t.DAG.Tasks, wfv1.DAGTask{
Name: containerTemplate.Name,
Template: containerTemplate.Name,
})
}
}
}
wf.Spec.Templates[i].DAG.Tasks = append(t.DAG.Tasks, wfv1.DAGTask{
Name: containerTemplate.Name,
Template: containerTemplate.Name,
})
break
}
}
@@ -1706,14 +1822,22 @@ func injectWorkflowExecutionStatusCaller(wf *wfv1.Workflow, phase wfv1.NodePhase
return nil
}
func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion string) sq.SelectBuilder {
func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool) sq.SelectBuilder {
whereMap := sq.Eq{
"wt.namespace": namespace,
"wt.uid": workflowTemplateUID,
"we.is_archived": false,
}
if workflowTemplateVersion != "" {
whereMap["wtv.version"] = workflowTemplateVersion
if !includeSystem {
whereMap["wt.is_system"] = false
}
if workflowTemplateUID != "" {
whereMap["wt.uid"] = workflowTemplateUID
if workflowTemplateVersion != "" {
whereMap["wtv.version"] = workflowTemplateVersion
}
}
sb := sb.Select().
@@ -1725,16 +1849,16 @@ func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, wo
return sb
}
func workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion string) sq.SelectBuilder {
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion)
sb = sb.Columns(getWorkflowExecutionColumns("we", "")...).
Columns(`wtv.version "workflow_template.version"`, `wtv.created_at "workflow_template.created_at"`)
func workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool) sq.SelectBuilder {
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem)
sb = sb.Columns(getWorkflowExecutionColumns("we")...).
Columns(`wtv.version "workflow_template.version"`, `wtv.created_at "workflow_template.created_at"`, `wt.name "workflow_template.name"`, `wt.uid "workflow_template.uid"`)
return sb
}
func (c *Client) getWorkflowExecutionAndTemplate(namespace string, uid string) (workflow *WorkflowExecution, err error) {
sb := sb.Select(getWorkflowExecutionColumns("we", "")...).
sb := sb.Select(getWorkflowExecutionColumns("we")...).
Columns(getWorkflowTemplateColumns("wt", "workflow_template")...).
Columns(`wtv.manifest "workflow_template.manifest"`, `wtv.version "workflow_template.version"`).
From("workflow_executions we").

View File

@@ -3,9 +3,9 @@ package v1
import (
"encoding/json"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/onepanelio/core/util/sql"
"time"
)
@@ -108,3 +108,28 @@ func getWorkflowExecutionColumns(aliasAndDestination ...string) []string {
columns := []string{"id", "created_at", "uid", "name", "parameters", "phase", "started_at", "finished_at", "labels"}
return sql.FormatColumnSelect(columns, aliasAndDestination...)
}
// getWorkflowExecutionColumnsMap returns a map where the keys are the columns of the workflow execution table
// the value is the raw column name as it is in the database
func getWorkflowExecutionColumnsMap(camelCase bool) map[string]string {
result := map[string]string{
"id": "id",
"uid": "uid",
"name": "name",
"parameters": "parameters",
"phase": "phase",
"labels": "labels",
}
if camelCase {
result["createdAt"] = "created_at"
result["startedAt"] = "started_at"
result["finishedAt"] = "finished_at"
} else {
result["created_at"] = "created_at"
result["started_at"] = "started_at"
result["finished_at"] = "finished_at"
}
return result
}

View File

@@ -5,7 +5,8 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/request"
pagination "github.com/onepanelio/core/pkg/util/request/pagination"
"strconv"
"strings"
"time"
@@ -26,6 +27,24 @@ type WorkflowTemplateFilter struct {
Labels []*Label
}
// applyLabelSelectQuery returns a query builder that adds where statements to filter by labels in the request,
// if there are any
func applyLabelSelectQuery(sb sq.SelectBuilder, request *request.Request) sq.SelectBuilder {
if request.Filter != nil {
filter, ok := request.Filter.(WorkflowTemplateFilter)
if ok && len(filter.Labels) > 0 {
labelsJSON, err := LabelsToJSONString(filter.Labels)
if err != nil {
log.Printf("[error] %v", err)
} else {
sb = sb.Where("wt.labels @> ?", labelsJSON)
}
}
}
return sb
}
// createWorkflowTemplateVersionDB inserts a record into workflow_template_versions using the current time accurate to nanoseconds
// the data is returned in the resulting WorkflowTemplateVersion struct.
func createWorkflowTemplateVersionDB(runner sq.BaseRunner, workflowTemplateVersion *WorkflowTemplateVersion, parameters []Parameter) (err error) {
@@ -152,6 +171,7 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
workflowTemplateVersion := &WorkflowTemplateVersion{
WorkflowTemplate: workflowTemplate,
Manifest: workflowTemplate.Manifest,
Labels: workflowTemplate.Labels,
}
err = createWorkflowTemplateVersionDB(tx, workflowTemplateVersion, params)
if err != nil {
@@ -159,13 +179,6 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
}
workflowTemplate.WorkflowTemplateVersionID = workflowTemplateVersion.ID
// TODO remove this labels or update it to a generic version so we can update the labels table with recent data
//_, err = c.InsertLabelsRunner(tx, TypeWorkflowTemplateVersion, workflowTemplateVersion.ID, workflowTemplate.Labels)
//if err != nil {
// return nil, nil, err
//}
//
argoWft, err := createArgoWorkflowTemplate(workflowTemplate, workflowTemplateVersion.Version)
if err != nil {
return nil, nil, err
@@ -401,32 +414,25 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
return
}
func (c *Client) selectWorkflowTemplatesQuery(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (sb sq.SelectBuilder) {
func (c *Client) selectWorkflowTemplatesQuery(namespace string, request *request.Request) (sb sq.SelectBuilder) {
sb = c.workflowTemplatesSelectBuilder(namespace).
Column("COUNT(wtv.*) versions, MAX(wtv.id) workflow_template_version_id").
Join("workflow_template_versions wtv ON wtv.workflow_template_id = wt.id").
GroupBy("wt.id", "wt.created_at", "wt.uid", "wt.name", "wt.is_archived").
OrderBy("wt.created_at DESC")
if filter != nil && len(filter.Labels) > 0 {
labelsJSON, err := LabelsToJSONString(filter.Labels)
if err != nil {
log.Printf("[error] %v", err)
} else {
sb = sb.Where("wt.labels @> ?", labelsJSON)
}
}
sb = *paginator.ApplyToSelect(&sb)
sb = applyLabelSelectQuery(sb, request)
sb = *request.ApplyPaginationToSelect(&sb)
return
}
// selectWorkflowTemplatesDB loads non-archived and non-system workflow templates from the database for the input namespace
// it also selects the total number of versions and latest version id
func (c *Client) selectWorkflowTemplatesDB(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplates []*WorkflowTemplate, err error) {
func (c *Client) selectWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) {
workflowTemplates = make([]*WorkflowTemplate, 0)
sb := c.selectWorkflowTemplatesQuery(namespace, paginator, filter).
sb := c.selectWorkflowTemplatesQuery(namespace, request).
Where(sq.Eq{
"wt.is_archived": false,
"wt.is_system": false,
@@ -439,10 +445,10 @@ func (c *Client) selectWorkflowTemplatesDB(namespace string, paginator *paginati
// selectAllWorkflowTemplatesDB loads all workflow templates from the database for the input namespace
// it also selects the total number of versions and latest version id
func (c *Client) selectAllWorkflowTemplatesDB(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplates []*WorkflowTemplate, err error) {
func (c *Client) selectAllWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) {
workflowTemplates = make([]*WorkflowTemplate, 0)
sb := c.selectWorkflowTemplatesQuery(namespace, paginator, filter)
sb := c.selectWorkflowTemplatesQuery(namespace, request)
err = c.DB.Selectx(&workflowTemplates, sb)
return
@@ -450,7 +456,7 @@ func (c *Client) selectAllWorkflowTemplatesDB(namespace string, paginator *pagin
// CountWorkflowTemplates counts the total number of workflow templates for the given namespace
// archived, and system templates are ignored.
func (c *Client) CountWorkflowTemplates(namespace string, filter *WorkflowTemplateFilter) (count int, err error) {
func (c *Client) CountWorkflowTemplates(namespace string, request *request.Request) (count int, err error) {
sb := sb.Select("COUNT(*)").
From("workflow_templates wt").
Where(sq.Eq{
@@ -459,14 +465,7 @@ func (c *Client) CountWorkflowTemplates(namespace string, filter *WorkflowTempla
"wt.is_system": false,
})
if filter != nil && len(filter.Labels) > 0 {
labelsJSON, err := LabelsToJSONString(filter.Labels)
if err != nil {
log.Printf("[error] %v", err)
} else {
sb = sb.Where("wt.labels @> ?", labelsJSON)
}
}
sb = applyLabelSelectQuery(sb, request)
err = sb.RunWith(c.DB).
QueryRow().
@@ -738,8 +737,8 @@ func (c *Client) ListWorkflowTemplateVersionsAll(paginator *pagination.Paginatio
}
// ListAllWorkflowTemplates lists all of the workflow templates, including archived and system specific
func (c *Client) ListAllWorkflowTemplates(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplateVersions []*WorkflowTemplate, err error) {
workflowTemplateVersions, err = c.selectAllWorkflowTemplatesDB(namespace, paginator, filter)
func (c *Client) ListAllWorkflowTemplates(namespace string, request *request.Request) (workflowTemplateVersions []*WorkflowTemplate, err error) {
workflowTemplateVersions, err = c.selectAllWorkflowTemplatesDB(namespace, request)
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
@@ -755,8 +754,8 @@ func (c *Client) ListAllWorkflowTemplates(namespace string, paginator *paginatio
// ListWorkflowTemplates returns all WorkflowTemplates where the results
// are filtered by is_archived and is_System is false.
func (c *Client) ListWorkflowTemplates(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplateVersions []*WorkflowTemplate, err error) {
workflowTemplateVersions, err = c.selectWorkflowTemplatesDB(namespace, paginator, filter)
func (c *Client) ListWorkflowTemplates(namespace string, request *request.Request) (workflowTemplateVersions []*WorkflowTemplate, err error) {
workflowTemplateVersions, err = c.selectWorkflowTemplatesDB(namespace, request)
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
@@ -855,7 +854,8 @@ func (c *Client) ArchiveWorkflowTemplate(namespace, uid string) (archived bool,
workflowTemplateName := uid + "-v" + wfTempVer
for {
wfs, err := c.ListWorkflowExecutions(namespace, uid, wfTempVer, &paginator)
req := &request.Request{Pagination: &paginator}
wfs, err := c.ListWorkflowExecutions(namespace, uid, wfTempVer, true, req)
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,

View File

@@ -4,9 +4,9 @@ import (
"encoding/json"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util/mapping"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/onepanelio/core/util/sql"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@@ -1,8 +1,8 @@
package v1
import (
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
"github.com/onepanelio/core/util/sql"
"time"
)

View File

@@ -3,19 +3,61 @@ package v1
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
sq "github.com/Masterminds/squirrel"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/asaskevich/govalidator"
"github.com/ghodss/yaml"
"github.com/lib/pq"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"strings"
"time"
)
// WorkspaceFilter represents the available ways we can filter Workspaces
type WorkspaceFilter struct {
Labels []*Label
Phase string // empty string means none
}
// GetLabels gets the labels of the filter
func (wf *WorkspaceFilter) GetLabels() []*Label {
return wf.Labels
}
func applyWorkspaceFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
if !request.HasFilter() {
return sb, nil
}
filter, ok := request.Filter.(WorkspaceFilter)
if !ok {
return sb, nil
}
if filter.Phase != "" {
sb = sb.Where(sq.Eq{
"phase": filter.Phase,
})
} else {
sb = sb.Where(sq.NotEq{
"phase": WorkspaceTerminated,
})
}
sb, err := ApplyLabelSelectQuery("w.labels", sb, &filter)
if err != nil {
return sb, err
}
return sb, nil
}
func (c *Client) workspacesSelectBuilder(namespace string) sq.SelectBuilder {
sb := sb.Select(getWorkspaceColumns("w")...).
Columns(getWorkspaceStatusColumns("w", "status")...).
@@ -43,20 +85,16 @@ func workspaceStatusToFieldMap(status *WorkspaceStatus) sq.Eq {
case WorkspaceLaunching:
fieldMap["paused_at"] = pq.NullTime{}
fieldMap["started_at"] = time.Now().UTC()
break
case WorkspacePausing:
fieldMap["started_at"] = pq.NullTime{}
fieldMap["paused_at"] = time.Now().UTC()
break
case WorkspaceUpdating:
fieldMap["paused_at"] = pq.NullTime{}
fieldMap["updated_at"] = time.Now().UTC()
break
case WorkspaceTerminating:
fieldMap["started_at"] = pq.NullTime{}
fieldMap["paused_at"] = pq.NullTime{}
fieldMap["terminated_at"] = time.Now().UTC()
break
}
return fieldMap
@@ -66,6 +104,7 @@ func workspaceStatusToFieldMap(status *WorkspaceStatus) sq.Eq {
func updateWorkspaceStatusBuilder(namespace, uid string, status *WorkspaceStatus) sq.UpdateBuilder {
fieldMap := workspaceStatusToFieldMap(status)
// Failed, Error, Succeeded
ub := sb.Update("workspaces").
SetMap(fieldMap).
Where(sq.And{
@@ -181,6 +220,17 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace
}
}
templates := argoTemplate.Spec.Templates
for i, t := range templates {
if t.Name == WorkspaceStatefulSetResource {
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
if err != nil {
return nil, err
}
templates[i].Resource.Manifest = string(resultManifest)
}
}
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
Parameters: workspace.Parameters,
}, workflowTemplate)
@@ -215,17 +265,167 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace
return workspace, nil
}
// CreateWorkspace creates a workspace by triggering the corresponding workflow
func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
config, err := c.GetSystemConfig()
// addResourceRequestsAndLimitsToWorkspaceTemplate will take the workspace statefulset resource
// and attempt to figure out the resources it requests, based on the Node selected.
func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template, argoTemplate *wfv1.WorkflowTemplate, workspace *Workspace) ([]byte, error) {
//due to placeholders, we can't unmarshal into a k8s statefulset
statefulSet := map[string]interface{}{}
if err := yaml.Unmarshal([]byte(t.Resource.Manifest), &statefulSet); err != nil {
return nil, err
}
spec, ok := statefulSet["spec"].(map[string]interface{})
if !ok {
return nil, errors.New("unable to type check statefulset manifest")
}
template, ok := spec["template"].(map[string]interface{})
if !ok {
return nil, errors.New("unable to type check statefulset manifest")
}
templateSpec, ok := template["spec"].(map[string]interface{})
if !ok {
return nil, errors.New("unable to type check statefulset manifest")
}
extraContainer := generateExtraContainerWithHostPortToSequesterNode()
if extraContainer != nil {
containers, ok := templateSpec["containers"].([]interface{})
if !ok {
return nil, errors.New("unable to type check statefulset manifest")
}
templateSpec["containers"] = append([]interface{}{extraContainer}, containers...)
}
resultManifest, err := yaml.Marshal(statefulSet)
if err != nil {
return nil, err
}
return resultManifest, nil
}
// generateExtraContainerWithHostPortToSequesterNode will add an extra container to a workspace.
// The extra container have a hostPort set. Kubernetes will ensure the hostPort does not get conflict
// between containers, scheduling a new node as needed.
// The container will sleep once started, and generally consume negligible resources.
func generateExtraContainerWithHostPortToSequesterNode() map[string]interface{} {
extraContainer := map[string]interface{}{
"image": "alpine:latest",
"name": "node-capturer",
"command": []interface{}{"/bin/sh"},
"args": []interface{}{"-c", "while :; do sleep 2073600; done"},
"ports": []interface{}{
map[string]interface{}{
"name": "node-capturer",
"hostPort": 80,
"containerPort": 80,
},
},
}
return extraContainer
}
// startWorkspace starts a workspace and related resources. It assumes a DB record already exists
// The following are required on the workspace:
// WorkspaceTemplate.WorkflowTemplate.UID
// WorkspaceTemplate.WorkflowTemplate.Version
func (c *Client) startWorkspace(namespace string, parameters []byte, workspace *Workspace) (*Workspace, error) {
if workspace == nil {
return nil, fmt.Errorf("workspace is nil")
}
if workspace.WorkspaceTemplate == nil {
return nil, fmt.Errorf("workspace.WorkspaceTemplate is nil")
}
if workspace.WorkspaceTemplate.WorkflowTemplate == nil {
return nil, fmt.Errorf("workspace.WorkspaceTemplate.WorkflowTemplate is nil")
}
systemConfig, err := c.GetSystemConfig()
if err != nil {
return nil, err
}
workflowTemplate, err := c.GetWorkflowTemplate(namespace, workspace.WorkspaceTemplate.WorkflowTemplate.UID, workspace.WorkspaceTemplate.WorkflowTemplate.Version)
if err != nil {
log.WithFields(log.Fields{
"Namespace": namespace,
"Workspace": workspace,
"Error": err.Error(),
}).Error("Error with getting workflow template.")
return nil, util.NewUserError(codes.NotFound, "Error with getting workflow template.")
}
runtimeParameters, err := generateRuntimeParameters(systemConfig)
if err != nil {
return nil, err
}
runtimeParametersMap := make(map[string]*string)
for _, p := range runtimeParameters {
runtimeParametersMap[p.Name] = p.Value
}
argoTemplate := workflowTemplate.ArgoWorkflowTemplate
for i, p := range argoTemplate.Spec.Arguments.Parameters {
value := runtimeParametersMap[p.Name]
if value != nil {
argoTemplate.Spec.Arguments.Parameters[i].Value = value
}
}
templates := argoTemplate.Spec.Templates
for i, t := range templates {
if t.Name == WorkspaceStatefulSetResource {
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
if err != nil {
return nil, err
}
templates[i].Resource.Manifest = string(resultManifest)
}
}
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
Parameters: workspace.Parameters,
}, workflowTemplate)
if err != nil {
return nil, err
}
_, err = sb.Update("workspaces").
SetMap(sq.Eq{
"phase": WorkspaceLaunching,
"started_at": time.Now().UTC(),
}).
Where(sq.Eq{"id": workspace.ID}).
RunWith(c.DB).
Exec()
if err != nil {
if strings.Contains(err.Error(), "invalid input syntax for type json") {
return nil, util.NewUserError(codes.InvalidArgument, err.Error())
}
return nil, util.NewUserError(codes.Unknown, err.Error())
}
return workspace, nil
}
// CreateWorkspace creates a workspace by triggering the corresponding workflow
func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
if err := workspace.GenerateUID(workspace.Name); err != nil {
return nil, err
}
existingWorkspace, err := c.GetWorkspace(namespace, workspace.UID)
if err != nil {
return nil, err
}
if existingWorkspace != nil {
return nil, util.NewUserError(codes.AlreadyExists, "Workspace already exists.")
}
config, err := c.GetSystemConfig()
if err != nil {
return nil, err
}
parameters, err := json.Marshal(workspace.Parameters)
if err != nil {
return nil, err
@@ -245,12 +445,55 @@ func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Works
return nil, fmt.Errorf("sys-host parameter not found")
}
existingWorkspace, err := c.GetWorkspace(namespace, workspace.UID)
// Validate workspace fields
valid, err := govalidator.ValidateStruct(workspace)
if err != nil || !valid {
return nil, util.NewUserError(codes.InvalidArgument, err.Error())
}
workspaceTemplate, err := c.GetWorkspaceTemplate(namespace, workspace.WorkspaceTemplate.UID, workspace.WorkspaceTemplate.Version)
if err != nil || workspaceTemplate == nil {
return nil, util.NewUserError(codes.NotFound, "Workspace template not found.")
}
workspace.WorkspaceTemplate = workspaceTemplate
workspace, err = c.createWorkspace(namespace, parameters, workspace)
if err != nil {
return nil, err
}
if existingWorkspace != nil {
return nil, util.NewUserError(codes.AlreadyExists, "Workspace already exists.")
return workspace, nil
}
// StartWorkspace starts a workspace
func (c *Client) StartWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
// If already started and not failed, return an error
if workspace.ID != 0 && workspace.Status.Phase != WorkspaceFailedToLaunch {
return workspace, fmt.Errorf("unable to start a workspace with phase %v", workspace.Status.Phase)
}
config, err := c.GetSystemConfig()
if err != nil {
return nil, err
}
parameters, err := json.Marshal(workspace.Parameters)
if err != nil {
return nil, err
}
err = injectWorkspaceSystemParameters(namespace, workspace, "create", "apply", config)
if err != nil {
return nil, err
}
workspace.Parameters = append(workspace.Parameters, Parameter{
Name: "sys-uid",
Value: ptr.String(workspace.UID),
})
sysHost := workspace.GetParameterValue("sys-host")
if sysHost == nil {
return nil, fmt.Errorf("sys-host parameter not found")
}
// Validate workspace fields
@@ -265,7 +508,7 @@ func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Works
}
workspace.WorkspaceTemplate = workspaceTemplate
workspace, err = c.createWorkspace(namespace, parameters, workspace)
workspace, err = c.startWorkspace(namespace, parameters, workspace)
if err != nil {
return nil, err
}
@@ -312,6 +555,30 @@ func (c *Client) GetWorkspace(namespace, uid string) (workspace *Workspace, err
// UpdateWorkspaceStatus updates workspace status and times based on phase
func (c *Client) UpdateWorkspaceStatus(namespace, uid string, status *WorkspaceStatus) (err error) {
// A succeeded status is passed in when a DAG succeeds. We don't need to do anything in this case.
if status.Phase == "Succeeded" {
return nil
}
if status.Phase == "Failed" || status.Phase == "Error" {
workspace, err := c.GetWorkspace(namespace, uid)
if err != nil {
return err
}
if workspace.Status.Phase == WorkspaceLaunching && workspace.Status.PausedAt == nil {
status.Phase = WorkspaceFailedToLaunch
} else if workspace.Status.Phase == WorkspaceLaunching && workspace.Status.PausedAt != nil {
status.Phase = WorkspaceFailedToResume
} else if workspace.Status.Phase == WorkspacePausing {
status.Phase = WorkspaceFailedToPause
} else if workspace.Status.Phase == WorkspaceTerminating {
status.Phase = WorkspaceFailedToTerminate
} else if workspace.Status.Phase == WorkspaceUpdating {
status.Phase = WorkspaceFailedToUpdate
}
}
result, err := updateWorkspaceStatusBuilder(namespace, uid, status).
RunWith(c.DB).
Exec()
@@ -355,22 +622,36 @@ func (c *Client) ListWorkspacesByTemplateID(namespace string, templateID uint64)
return
}
func (c *Client) ListWorkspaces(namespace string, paginator *pagination.PaginationRequest) (workspaces []*Workspace, err error) {
// ListWorkspaces returns a list of workspaces that satisfy the conditions in the request
func (c *Client) ListWorkspaces(namespace string, request *request.Request) (workspaces []*Workspace, err error) {
sb := sb.Select(getWorkspaceColumns("w")...).
Columns(getWorkspaceStatusColumns("w", "status")...).
Columns(getWorkspaceTemplateColumns("wt", "workspace_template")...).
From("workspaces w").
Join("workspace_templates wt ON wt.id = w.workspace_template_id").
OrderBy("w.created_at DESC").
Where(sq.And{
sq.Eq{
"w.namespace": namespace,
},
sq.NotEq{
"phase": WorkspaceTerminated,
},
})
sb = *paginator.ApplyToSelect(&sb)
Where(sq.Eq{"w.namespace": namespace})
if request.HasSorting() {
properties := getWorkspaceColumnsMap(true)
for _, order := range request.Sort.Properties {
if columnName, ok := properties[order.Property]; ok {
nullSort := "NULLS FIRST"
if order.Direction == "desc" {
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
}
sb = sb.OrderBy(fmt.Sprintf("w.%v %v %v", columnName, order.Direction, nullSort))
}
}
} else {
sb = sb.OrderBy("w.created_at DESC")
}
sb, err = applyWorkspaceFilter(sb, request)
if err != nil {
return nil, err
}
sb = *request.ApplyPaginationToSelect(&sb)
if err := c.DB.Selectx(&workspaces, sb); err != nil {
return nil, err
@@ -380,8 +661,8 @@ func (c *Client) ListWorkspaces(namespace string, paginator *pagination.Paginati
}
// CountWorkspaces returns the total number of workspaces in the given namespace that are not terminated
func (c *Client) CountWorkspaces(namespace string) (count int, err error) {
err = sb.Select("COUNT( DISTINCT( w.id ))").
func (c *Client) CountWorkspaces(namespace string, request *request.Request) (count int, err error) {
query := sb.Select("COUNT( DISTINCT( w.id ))").
From("workspaces w").
Join("workspace_templates wt ON w.workspace_template_id = wt.id").
Where(sq.And{
@@ -391,8 +672,14 @@ func (c *Client) CountWorkspaces(namespace string) (count int, err error) {
sq.NotEq{
"phase": WorkspaceTerminated,
},
}).
RunWith(c.DB).
})
query, err = applyWorkspaceFilter(query, request)
if err != nil {
return 0, err
}
err = query.RunWith(c.DB).
QueryRow().
Scan(&count)
@@ -446,6 +733,18 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction
workspaceTemplate.WorkflowTemplate = workflowTemplate
workspace.WorkspaceTemplate = workspaceTemplate
templates := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate.Spec.Templates
argoTemplate := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate
for i, t := range templates {
if t.Name == WorkspaceStatefulSetResource {
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
if err != nil {
return err
}
templates[i].Resource.Manifest = string(resultManifest)
}
}
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
Parameters: workspace.Parameters,
}, workspaceTemplate.WorkflowTemplate)
@@ -487,3 +786,34 @@ func (c *Client) DeleteWorkspace(namespace, uid string) (err error) {
func (c *Client) ArchiveWorkspace(namespace, uid string, parameters ...Parameter) (err error) {
return c.updateWorkspace(namespace, uid, "delete", "delete", &WorkspaceStatus{Phase: WorkspaceTerminating}, parameters...)
}
// GetWorkspaceStatisticsForNamespace loads statistics for workspaces for the provided namespace
func (c *Client) GetWorkspaceStatisticsForNamespace(namespace string) (report *WorkspaceStatisticReport, err error) {
statsSelect := `
MAX(w.created_at) last_created,
COUNT(*) FILTER (WHERE phase = 'Launching') launching,
COUNT(*) FILTER (WHERE phase = 'Running') running,
COUNT(*) FILTER (WHERE phase = 'Updating') updating,
COUNT(*) FILTER (WHERE phase = 'Pausing') pausing,
COUNT(*) FILTER (WHERE phase = 'Paused') paused,
COUNT(*) FILTER (WHERE phase = 'Terminating') terminating,
COUNT(*) FILTER (WHERE phase = 'Terminated') terminated,
COUNT(*) FILTER (WHERE phase = 'Failed to pause') failed_to_pause,
COUNT(*) FILTER (WHERE phase = 'Failed to resume') failed_to_resume,
COUNT(*) FILTER (WHERE phase = 'Failed to terminate') failed_to_terminate,
COUNT(*) FILTER (WHERE phase = 'Failed to launch') failed_to_launch,
COUNT(*) FILTER (WHERE phase = 'Failed to update') failed_to_update,
COUNT(*) FILTER (WHERE phase LIKE 'Failed%') failed,
COUNT(*) total`
query := sb.Select(statsSelect).
From("workspaces w").
Where(sq.Eq{
"w.namespace": namespace,
})
report = &WorkspaceStatisticReport{}
err = c.DB.Getx(report, query)
return
}

View File

@@ -10,8 +10,9 @@ import (
"github.com/asaskevich/govalidator"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/env"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/router"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
networking "istio.io/api/networking/v1alpha3"
@@ -22,6 +23,95 @@ import (
"strings"
)
// WorkspaceDAGTemplateCreateStatefulSet is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateCreateStatefulSet = "create-stateful-set"
// WorkspaceDAGTemplateGetStatefulSet is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateGetStatefulSet = "get-stateful-set"
// WorkspaceDAGTemplateService is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateService = "service"
// WorkspaceDAGTemplateVirtualService is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateVirtualService = "virtual-service"
// WorkspaceDAGTemplateCreateWorkspace is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateCreateWorkspace = "create-workspace"
// WorkspaceDAGTemplateDeleteStatefulSet is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateDeleteStatefulSet = "delete-stateful-set"
// WorkspaceDAGTemplateDeleteWorkspace is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateDeleteWorkspace = "delete-workspace"
// WorkspaceDAGTemplateDeletePVC is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateDeletePVC = "delete-pvc"
// WorkspaceDAGTemplateSysSetPhaseRunning is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateSysSetPhaseRunning = "sys-set-phase-running"
// WorkspaceDAGTemplateSysSetPhasePaused is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateSysSetPhasePaused = "sys-set-phase-paused"
// WorkspaceDAGTemplateSysSetPhaseTerminated is used inside the DAG creation for the workspace.
const WorkspaceDAGTemplateSysSetPhaseTerminated = "sys-set-phase-terminated"
// WorkspaceServiceResource is resource used in workspace template creation.
const WorkspaceServiceResource = "service-resource"
// WorkspaceVirtualServiceResource is resource used in workspace template creation.
const WorkspaceVirtualServiceResource = "virtual-service-resource"
// WorkspaceStatefulSetResource is resource used in workspace template creation.
const WorkspaceStatefulSetResource = "stateful-set-resource"
// WorkspaceGetStatefulSetResource is resource used in workspace template creation.
const WorkspaceGetStatefulSetResource = "get-stateful-set-resource"
// WorkspaceDeleteStatefulSetResource is resource used in workspace template creation.
const WorkspaceDeleteStatefulSetResource = "delete-stateful-set-resource"
// WorkspaceResource is resource used in workspace template creation.
const WorkspaceResource = "workspace-resource"
// WorkspaceDeletePVCResource is resource used in workspace template creation.
const WorkspaceDeletePVCResource = "delete-pvc-resource"
// WorkspaceTemplateFilter represents the available ways we can filter WorkspaceTemplates
type WorkspaceTemplateFilter struct {
Labels []*Label
UID string // empty string means none
}
// GetLabels gets the labels of the filter
func (wt *WorkspaceTemplateFilter) GetLabels() []*Label {
return wt.Labels
}
func applyWorkspaceTemplateFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
if !request.HasFilter() {
return sb, nil
}
filter, ok := request.Filter.(WorkspaceTemplateFilter)
if !ok {
return sb, nil
}
if filter.UID != "" {
sb = sb.Where(sq.Eq{
"uid": filter.UID,
})
}
sb, err := ApplyLabelSelectQuery("wt.labels", sb, &filter)
if err != nil {
return sb, err
}
return sb, nil
}
// createWorkspaceTemplateVersionDB creates a workspace template version in the database.
func createWorkspaceTemplateVersionDB(tx sq.BaseRunner, template *WorkspaceTemplate) (err error) {
err = sb.Insert("workspace_template_versions").
@@ -311,7 +401,7 @@ func createStatefulSetManifest(spec *WorkspaceSpec, config map[string]string, se
env.PrependEnvVarToContainer(container, "ONEPANEL_DOMAIN", config["ONEPANEL_DOMAIN"])
env.PrependEnvVarToContainer(container, "ONEPANEL_PROVIDER", config["ONEPANEL_PROVIDER"])
env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}")
env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-name}}")
env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}")
for _, service := range services {
envName := fmt.Sprintf("ONEPANEL_SERVICES_%v_API_URL", strings.ToUpper(service.Name))
@@ -467,31 +557,43 @@ kind: PersistentVolumeClaim
metadata:
name: {{inputs.parameters.sys-pvc-name}}-{{workflow.parameters.sys-uid}}-0
`
templates := []wfv1.Template{
{
Name: "handleExit",
DAG: &wfv1.DAGTemplate{
Tasks: []wfv1.DAGTask{
{
Name: "exit-handler",
Template: "sys-update-workspace-status",
},
},
},
},
{
Name: "workspace",
DAG: &wfv1.DAGTemplate{
FailFast: ptr.Bool(false),
Tasks: []wfv1.DAGTask{
{
Name: "service",
Template: "service-resource",
Name: WorkspaceDAGTemplateService,
Template: WorkspaceServiceResource,
},
{
Name: "virtual-service",
Template: "virtual-service-resource",
Dependencies: []string{"service"},
Name: WorkspaceDAGTemplateVirtualService,
Template: WorkspaceVirtualServiceResource,
Dependencies: []string{WorkspaceDAGTemplateService},
},
{
Name: "create-stateful-set",
Template: "stateful-set-resource",
Dependencies: []string{"virtual-service"},
Name: WorkspaceDAGTemplateCreateStatefulSet,
Template: WorkspaceStatefulSetResource,
Dependencies: []string{WorkspaceDAGTemplateVirtualService},
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
},
{
Name: "get-stateful-set",
Template: "get-stateful-set-resource",
Dependencies: []string{"create-stateful-set"},
Name: WorkspaceDAGTemplateGetStatefulSet,
Template: WorkspaceGetStatefulSetResource,
Dependencies: []string{WorkspaceDAGTemplateCreateStatefulSet},
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
Arguments: wfv1.Arguments{
Parameters: []wfv1.Parameter{
@@ -503,27 +605,27 @@ metadata:
},
},
{
Name: "create-workspace",
Template: "workspace-resource",
Dependencies: []string{"get-stateful-set"},
Name: WorkspaceDAGTemplateCreateWorkspace,
Template: WorkspaceResource,
Dependencies: []string{WorkspaceDAGTemplateGetStatefulSet},
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
},
{
Name: "delete-stateful-set",
Template: "delete-stateful-set-resource",
Dependencies: []string{"virtual-service"},
Name: WorkspaceDAGTemplateDeleteStatefulSet,
Template: WorkspaceDeleteStatefulSetResource,
Dependencies: []string{WorkspaceDAGTemplateVirtualService},
When: "{{workflow.parameters.sys-workspace-action}} == pause || {{workflow.parameters.sys-workspace-action}} == delete",
},
{
Name: "delete-workspace",
Template: "workspace-resource",
Dependencies: []string{"delete-stateful-set"},
Name: WorkspaceDAGTemplateDeleteWorkspace,
Template: WorkspaceResource,
Dependencies: []string{WorkspaceDAGTemplateDeleteStatefulSet},
When: "{{workflow.parameters.sys-workspace-action}} == pause || {{workflow.parameters.sys-workspace-action}} == delete",
},
{
Name: "delete-pvc",
Template: "delete-pvc-resource",
Dependencies: []string{"delete-workspace"},
Name: WorkspaceDAGTemplateDeletePVC,
Template: WorkspaceDeletePVCResource,
Dependencies: []string{WorkspaceDAGTemplateDeleteWorkspace},
Arguments: wfv1.Arguments{
Parameters: []wfv1.Parameter{
{
@@ -536,9 +638,9 @@ metadata:
WithItems: volumeClaimItems,
},
{
Name: "sys-set-phase-running",
Name: WorkspaceDAGTemplateSysSetPhaseRunning,
Template: "sys-update-status",
Dependencies: []string{"create-workspace"},
Dependencies: []string{WorkspaceDAGTemplateCreateWorkspace},
Arguments: wfv1.Arguments{
Parameters: []wfv1.Parameter{
{
@@ -550,9 +652,9 @@ metadata:
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
},
{
Name: "sys-set-phase-paused",
Name: WorkspaceDAGTemplateSysSetPhasePaused,
Template: "sys-update-status",
Dependencies: []string{"delete-workspace"},
Dependencies: []string{WorkspaceDAGTemplateDeleteWorkspace},
Arguments: wfv1.Arguments{
Parameters: []wfv1.Parameter{
{
@@ -564,9 +666,9 @@ metadata:
When: "{{workflow.parameters.sys-workspace-action}} == pause",
},
{
Name: "sys-set-phase-terminated",
Name: WorkspaceDAGTemplateSysSetPhaseTerminated,
Template: "sys-update-status",
Dependencies: []string{"delete-pvc"},
Dependencies: []string{WorkspaceDAGTemplateDeletePVC},
Arguments: wfv1.Arguments{
Parameters: []wfv1.Parameter{
{
@@ -581,21 +683,21 @@ metadata:
},
},
{
Name: "service-resource",
Name: WorkspaceServiceResource,
Resource: &wfv1.ResourceTemplate{
Action: "{{workflow.parameters.sys-resource-action}}",
Manifest: serviceManifest,
},
},
{
Name: "virtual-service-resource",
Name: WorkspaceVirtualServiceResource,
Resource: &wfv1.ResourceTemplate{
Action: "{{workflow.parameters.sys-resource-action}}",
Manifest: virtualServiceManifest,
},
},
{
Name: "stateful-set-resource",
Name: WorkspaceStatefulSetResource,
Resource: &wfv1.ResourceTemplate{
Action: "{{workflow.parameters.sys-resource-action}}",
Manifest: statefulSetManifest,
@@ -613,7 +715,7 @@ metadata:
},
},
{
Name: "get-stateful-set-resource",
Name: WorkspaceGetStatefulSetResource,
Inputs: wfv1.Inputs{
Parameters: []wfv1.Parameter{{Name: "update-revision"}},
},
@@ -624,21 +726,21 @@ metadata:
},
},
{
Name: "delete-stateful-set-resource",
Name: WorkspaceDeleteStatefulSetResource,
Resource: &wfv1.ResourceTemplate{
Action: "{{workflow.parameters.sys-resource-action}}",
Manifest: statefulSetManifest,
},
},
{
Name: "workspace-resource",
Name: WorkspaceResource,
Resource: &wfv1.ResourceTemplate{
Action: "{{workflow.parameters.sys-resource-action}}",
Manifest: workspaceManifest,
},
},
{
Name: "delete-pvc-resource",
Name: WorkspaceDeletePVCResource,
Inputs: wfv1.Inputs{
Parameters: []wfv1.Parameter{{Name: "sys-pvc-name"}},
},
@@ -648,16 +750,36 @@ metadata:
},
},
}
// Add curl template
curlPath := fmt.Sprintf("/apis/v1beta1/{{workflow.namespace}}/workspaces/{{workflow.parameters.sys-uid}}/status")
webRouter, err := router.NewRelativeAPIRouter()
if err != nil {
return "", err
}
curlUpdateWorkspaceStatusPath := webRouter.UpdateWorkspaceStatus("{{workflow.namespace}}", "{{workflow.parameters.sys-uid}}")
status := map[string]interface{}{
"phase": "{{inputs.parameters.sys-workspace-phase}}",
"phase": "{{workflow.status}}",
}
statusBytes, err := json.Marshal(status)
if err != nil {
return
}
inputs := wfv1.Inputs{
inputs := wfv1.Inputs{}
curlUpdateWorkspaceNodeTemplate, err := getCURLNodeTemplate("sys-update-workspace-status", http.MethodPut, curlUpdateWorkspaceStatusPath, string(statusBytes), inputs)
if err != nil {
return
}
templates = append(templates, *curlUpdateWorkspaceNodeTemplate)
// Add curl template
curlPath := fmt.Sprintf("/apis/v1beta1/{{workflow.namespace}}/workspaces/{{workflow.parameters.sys-uid}}/status")
status = map[string]interface{}{
"phase": "{{inputs.parameters.sys-workspace-phase}}",
}
statusBytes, err = json.Marshal(status)
if err != nil {
return
}
inputs = wfv1.Inputs{
Parameters: []wfv1.Parameter{
{Name: "sys-workspace-phase"},
},
@@ -672,10 +794,10 @@ metadata:
dag := wfv1.DAGTask{
Name: spec.PostExecutionWorkflow.Entrypoint,
Template: spec.PostExecutionWorkflow.Entrypoint,
Dependencies: []string{"sys-set-phase-running", "sys-set-phase-paused", "sys-set-phase-terminated"},
Dependencies: []string{WorkspaceDAGTemplateSysSetPhaseRunning, WorkspaceDAGTemplateSysSetPhasePaused, WorkspaceDAGTemplateSysSetPhaseTerminated},
}
templates[0].DAG.Tasks = append(templates[0].DAG.Tasks, dag)
templates[1].DAG.Tasks = append(templates[1].DAG.Tasks, dag)
templates = append(templates, spec.PostExecutionWorkflow.Templates...)
}
@@ -683,6 +805,7 @@ metadata:
workflowTemplateSpec := map[string]interface{}{
"arguments": spec.Arguments,
"entrypoint": "workspace",
"onExit": "handleExit",
"templates": templates,
}
@@ -1035,15 +1158,47 @@ func (c *Client) UpdateWorkspaceTemplate(namespace string, workspaceTemplate *Wo
return workspaceTemplate, nil
}
// UpdateWorkspaceTemplateManifest updates a workspace template by creating a new version where the only difference is the manifest
func (c *Client) UpdateWorkspaceTemplateManifest(namespace, uid string, manifest string) (*WorkspaceTemplate, error) {
existingTemplate, err := c.GetWorkspaceTemplate(namespace, uid, 0)
if err != nil {
return nil, err
}
existingTemplate.UID = uid
existingTemplate.Manifest = manifest
return c.UpdateWorkspaceTemplate(namespace, existingTemplate)
}
// ListWorkspaceTemplates returns a list of workspace templates that are not archived, sorted by most recent created first
func (c *Client) ListWorkspaceTemplates(namespace string, paginator *pagination.PaginationRequest) (workspaceTemplates []*WorkspaceTemplate, err error) {
func (c *Client) ListWorkspaceTemplates(namespace string, request *request.Request) (workspaceTemplates []*WorkspaceTemplate, err error) {
sb := c.workspaceTemplatesSelectBuilder(namespace).
Where(sq.Eq{
"wt.is_archived": false,
}).
OrderBy("wt.created_at DESC")
})
sb = *paginator.ApplyToSelect(&sb)
if request.HasSorting() {
properties := getWorkspaceTemplateColumnsMap(true)
for _, order := range request.Sort.Properties {
if columnName, ok := properties[order.Property]; ok {
nullSort := "NULLS FIRST"
if order.Direction == "desc" {
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
}
sb = sb.OrderBy(fmt.Sprintf("wt.%v %v %v", columnName, order.Direction, nullSort))
}
}
} else {
sb = sb.OrderBy("wt.created_at DESC")
}
sb, err = applyWorkspaceTemplateFilter(sb, request)
if err != nil {
return nil, err
}
sb = *request.ApplyPaginationToSelect(&sb)
err = c.DB.Selectx(&workspaceTemplates, sb)

View File

@@ -3,9 +3,9 @@ package v1
import (
"fmt"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/onepanelio/core/util/sql"
"sigs.k8s.io/yaml"
"time"
)
@@ -110,3 +110,28 @@ func getWorkspaceTemplateColumnsWithoutLabels(aliasAndDestination ...string) []s
columns := []string{"id", "uid", "created_at", "modified_at", "name", "description", "namespace", "is_archived", "workflow_template_id"}
return sql.FormatColumnSelect(columns, aliasAndDestination...)
}
// getWorkspaceTemplateColumnsMap returns a map where the keys are the columns of the workspace_templates table
// the value is the raw column name as it is in the database
func getWorkspaceTemplateColumnsMap(camelCase bool) map[string]string {
result := map[string]string{
"id": "id",
"labels": "labels",
"name": "name",
"uid": "uid",
"namespace": "namespace",
"description": "description",
}
if camelCase {
result["createdAt"] = "created_at"
result["modifiedAt"] = "modified_at"
result["isArchived"] = "is_archived"
} else {
result["created_at"] = "created_at"
result["modified_at"] = "modified_at"
result["is_archived"] = "is_archived"
}
return result
}

View File

@@ -3,9 +3,9 @@ package v1
import (
"fmt"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/onepanelio/core/pkg/util/sql"
"github.com/onepanelio/core/pkg/util/types"
uid2 "github.com/onepanelio/core/pkg/util/uid"
"github.com/onepanelio/core/util/sql"
networking "istio.io/api/networking/v1alpha3"
corev1 "k8s.io/api/core/v1"
"time"
@@ -15,13 +15,18 @@ type WorkspacePhase string
// Workspace phases
const (
WorkspaceLaunching WorkspacePhase = "Launching"
WorkspaceRunning WorkspacePhase = "Running"
WorkspaceUpdating WorkspacePhase = "Updating"
WorkspacePausing WorkspacePhase = "Pausing"
WorkspacePaused WorkspacePhase = "Paused"
WorkspaceTerminating WorkspacePhase = "Terminating"
WorkspaceTerminated WorkspacePhase = "Terminated"
WorkspaceLaunching WorkspacePhase = "Launching"
WorkspaceRunning WorkspacePhase = "Running"
WorkspaceUpdating WorkspacePhase = "Updating"
WorkspacePausing WorkspacePhase = "Pausing"
WorkspacePaused WorkspacePhase = "Paused"
WorkspaceTerminating WorkspacePhase = "Terminating"
WorkspaceTerminated WorkspacePhase = "Terminated"
WorkspaceFailedToPause WorkspacePhase = "Failed to pause"
WorkspaceFailedToResume WorkspacePhase = "Failed to resume"
WorkspaceFailedToTerminate WorkspacePhase = "Failed to terminate"
WorkspaceFailedToLaunch WorkspacePhase = "Failed to launch"
WorkspaceFailedToUpdate WorkspacePhase = "Failed to upgrade"
)
type WorkspaceStatus struct {
@@ -117,3 +122,27 @@ func WorkspacesToIDs(resources []*Workspace) (ids []uint64) {
return
}
// getWorkspaceColumnsMap returns a map where the keys are the columns of the workspaces table
// the value is the raw column name as it is in the database
func getWorkspaceColumnsMap(camelCase bool) map[string]string {
result := map[string]string{
"id": "id",
"labels": "labels",
"name": "name",
"uid": "uid",
"namespace": "namespace",
"phase": "phase",
"parameters": "parameters",
}
if camelCase {
result["createdAt"] = "created_at"
result["modifiedAt"] = "modified_at"
} else {
result["created_at"] = "created_at"
result["modified_at"] = "modified_at"
}
return result
}

View File

@@ -2,8 +2,14 @@ package auth
import (
"context"
"crypto/md5"
"encoding/hex"
"errors"
"fmt"
"github.com/onepanelio/core/api"
"github.com/onepanelio/core/pkg/util"
log "github.com/sirupsen/logrus"
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
"net/http"
"strings"
@@ -26,6 +32,9 @@ const (
func getBearerToken(ctx context.Context) (*string, bool) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
log.WithFields(log.Fields{
"Method": "getBearerToken",
}).Error("Unable to get metadata from incoming context")
return nil, false
}
@@ -35,6 +44,9 @@ func getBearerToken(ctx context.Context) (*string, bool) {
return nil, false
}
t = strings.ReplaceAll(t, prefix, "")
if t == "null" {
return nil, false
}
return &t, true
}
@@ -54,20 +66,36 @@ func getBearerToken(ctx context.Context) (*string, bool) {
return &t, true
}
log.WithFields(log.Fields{
"Method": "getBearerToken",
}).Error("Unable to get BearerToken:", md)
return nil, false
}
func getClient(ctx context.Context, kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfig) (context.Context, error) {
if kubeConfig == nil {
return nil, fmt.Errorf("getClient - nil passed in for kubeConfig")
}
if db == nil {
return nil, fmt.Errorf("getClient - nil passed in for db")
}
bearerToken, ok := getBearerToken(ctx)
if !ok {
return nil, status.Error(codes.Unauthenticated, `Missing or invalid "authorization" header.`)
}
if bearerToken == nil {
return nil, status.Error(codes.Unauthenticated, "Bearer token is nil")
}
kubeConfig.BearerToken = *bearerToken
client, err := v1.NewClient(kubeConfig, db, sysConfig)
if err != nil {
return nil, err
}
client.Token = kubeConfig.BearerToken
return context.WithValue(ctx, ContextClientKey, client), nil
}
@@ -85,17 +113,55 @@ func IsAuthorized(c *v1.Client, namespace, verb, group, resource, name string) (
},
})
deniedMsg := fmt.Sprintf(`Permission denied. Namespace: '%v', Verb: '%v', Group: '%v', Resource '%v', Name: '%v'`, namespace, verb, group, resource, name)
if err != nil {
return false, status.Error(codes.PermissionDenied, "Permission denied.")
return false, status.Error(codes.PermissionDenied, deniedMsg)
}
allowed = review.Status.Allowed
if !allowed {
return false, status.Error(codes.PermissionDenied, "Permission denied.")
return false, status.Error(codes.PermissionDenied, deniedMsg)
}
return
}
func verifyLogin(client *v1.Client, tokenRequest *api.GetAccessTokenRequest) (rawToken string, err error) {
accountsList, err := client.CoreV1().ServiceAccounts("onepanel").List(v1.ListOptions{})
if err != nil {
return "", err
}
authTokenSecretName := ""
for _, serviceAccount := range accountsList.Items {
if serviceAccount.Name != tokenRequest.Username {
continue
}
for _, secret := range serviceAccount.Secrets {
if strings.Contains(secret.Name, "-token-") {
authTokenSecretName = secret.Name
break
}
}
}
if authTokenSecretName == "" {
return "", util.NewUserError(codes.InvalidArgument, fmt.Sprintf("unknown service account '%v'", tokenRequest.Username))
}
secret, err := client.CoreV1().Secrets("onepanel").Get(authTokenSecretName, v12.GetOptions{})
if err != nil {
return "", err
}
currentTokenBytes := md5.Sum(secret.Data["token"])
currentTokenString := hex.EncodeToString(currentTokenBytes[:])
if tokenRequest.Token != fmt.Sprintf("%s", currentTokenString) {
return "", util.NewUserError(codes.InvalidArgument, "token doesn't match what's on record")
}
return string(secret.Data["token"]), nil
}
// UnaryInterceptor performs authentication checks.
// The two main cases are:
// 1. Is the token valid? This is used for logging in.
@@ -103,6 +169,41 @@ func IsAuthorized(c *v1.Client, namespace, verb, group, resource, name string) (
func UnaryInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfig) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
// Check if the provided token is valid. This does not require a token in the header.
if info.FullMethod == "/api.AuthService/GetAccessToken" {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return resp, errors.New("unable to get metadata from incoming context")
}
getAccessTokenRequest, ok := req.(*api.GetAccessTokenRequest)
if !ok {
return resp, errors.New("invalid request object for GetAccessTokenRequest")
}
defaultClient, err := v1.GetDefaultClientWithDB(db)
if err != nil {
return nil, err
}
rawToken, err := verifyLogin(defaultClient, getAccessTokenRequest)
if err != nil {
return nil, err
}
sysConfig, err := defaultClient.GetSystemConfig()
if err != nil {
return nil, err
}
md.Set("authorization", "Bearer "+rawToken)
ctx, err = getClient(ctx, kubeConfig, db, sysConfig)
if err != nil {
ctx = nil
}
return handler(ctx, req)
}
if info.FullMethod == "/api.AuthService/IsValidToken" {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
@@ -111,10 +212,29 @@ func UnaryInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfi
tokenRequest, ok := req.(*api.IsValidTokenRequest)
if !ok {
return resp, errors.New("IsValidToken does not have correct request type")
return resp, errors.New("invalid request object for GetAccessTokenRequest")
}
getAccessTokenRequest := &api.GetAccessTokenRequest{
Username: tokenRequest.Username,
Token: tokenRequest.Token,
}
md.Set("authorization", tokenRequest.Token.Token)
defaultClient, err := v1.GetDefaultClientWithDB(db)
if err != nil {
return nil, err
}
rawToken, err := verifyLogin(defaultClient, getAccessTokenRequest)
if err != nil {
return nil, err
}
sysConfig, err := defaultClient.GetSystemConfig()
if err != nil {
return nil, err
}
md.Set("authorization", "Bearer "+rawToken)
ctx, err = getClient(ctx, kubeConfig, db, sysConfig)
if err != nil {

View File

@@ -2,8 +2,10 @@ package server
import (
"context"
"fmt"
"github.com/onepanelio/core/api"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/server/auth"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
@@ -41,20 +43,20 @@ func (a *AuthServer) IsAuthorized(ctx context.Context, request *api.IsAuthorized
allowed, err := auth.IsAuthorized(client, request.IsAuthorized.Namespace, request.IsAuthorized.Verb, request.IsAuthorized.Group, request.IsAuthorized.Resource, request.IsAuthorized.ResourceName)
if err != nil {
res.Authorized = false
return res, err
return res, util.NewUserError(codes.PermissionDenied, fmt.Sprintf("Namespace: %v, Verb: %v, Group: \"%v\", Resource: %v. Source: %v", request.IsAuthorized.Namespace, request.IsAuthorized.Verb, request.IsAuthorized.Group, request.IsAuthorized.ResourceName, err))
}
res.Authorized = allowed
return res, nil
}
func (a *AuthServer) IsValidToken(ctx context.Context, req *api.IsValidTokenRequest) (res *api.IsValidTokenResponse, err error) {
// GetAccessToken is an alias for IsValidToken. It returns a token given a username and hashed token.
func (a *AuthServer) GetAccessToken(ctx context.Context, req *api.GetAccessTokenRequest) (res *api.GetAccessTokenResponse, err error) {
if ctx == nil {
return nil, status.Error(codes.Unauthenticated, "Unauthenticated.")
return nil, status.Error(codes.Unauthenticated, "unauthenticated")
}
client := getClient(ctx)
err = a.isValidToken(err, client)
if err != nil {
return nil, err
@@ -64,10 +66,50 @@ func (a *AuthServer) IsValidToken(ctx context.Context, req *api.IsValidTokenRequ
if err != nil {
return
}
res = &api.IsValidTokenResponse{}
res.Domain = config["ONEPANEL_DOMAIN"]
return res, nil
domain := config.Domain()
if domain == nil {
return nil, fmt.Errorf("domain is not set")
}
res = &api.GetAccessTokenResponse{
Domain: *domain,
AccessToken: client.Token,
Username: req.Username,
}
return
}
// IsValidToken returns the appropriate token information given an md5 version of the token
func (a *AuthServer) IsValidToken(ctx context.Context, req *api.IsValidTokenRequest) (res *api.IsValidTokenResponse, err error) {
if ctx == nil {
return nil, status.Error(codes.Unauthenticated, "unauthenticated")
}
client := getClient(ctx)
err = a.isValidToken(err, client)
if err != nil {
return nil, err
}
config, err := client.GetSystemConfig()
if err != nil {
return
}
domain := config.Domain()
if domain == nil {
return nil, fmt.Errorf("domain is not set")
}
res = &api.IsValidTokenResponse{
Domain: *domain,
Token: client.Token,
Username: req.Username,
}
return
}
func (a *AuthServer) isValidToken(err error, client *v1.Client) error {

View File

@@ -37,6 +37,29 @@ func MappingToKeyValue(mapping map[string]string) []*api.KeyValue {
return keyValues
}
// LabelsToKeyValues converts []*v1.Label to []*api.Label
func LabelsToKeyValues(labels []*v1.Label) []*api.KeyValue {
keyValues := make([]*api.KeyValue, 0)
for _, label := range labels {
keyValues = append(keyValues, LabelToKeyValue(label))
}
sort.Slice(keyValues, func(i, j int) bool {
return keyValues[i].Key < keyValues[j].Key
})
return keyValues
}
// LabelToKeyValue converts a *v1.Label to *api.Label
func LabelToKeyValue(label *v1.Label) *api.KeyValue {
return &api.KeyValue{
Key: label.Key,
Value: label.Value,
}
}
func ParameterOptionToAPI(option *v1.ParameterOption) *api.ParameterOption {
apiOption := &api.ParameterOption{
Name: option.Name,
@@ -147,3 +170,48 @@ func TimestampToAPIString(ts *time.Time) string {
return ts.UTC().Format(time.RFC3339)
}
// WorkflowExecutionStatisticsReportToAPI converts v1.WorkflowExecutionStatisticReport to api.WorkflowExecutionStatisticReport
func WorkflowExecutionStatisticsReportToAPI(report *v1.WorkflowExecutionStatisticReport) *api.WorkflowExecutionStatisticReport {
if report == nil {
return nil
}
stats := &api.WorkflowExecutionStatisticReport{
Total: report.Total,
Running: report.Running,
Completed: report.Completed,
Failed: report.Failed,
Terminated: report.Terminated,
LastExecuted: TimestampToAPIString(report.LastExecuted),
}
return stats
}
// WorkspaceStatisticsReportToAPI converts v1.WorkspaceStatisticReport to api.WorkspaceStatisticReport
func WorkspaceStatisticsReportToAPI(report *v1.WorkspaceStatisticReport) *api.WorkspaceStatisticReport {
if report == nil {
return nil
}
stats := &api.WorkspaceStatisticReport{
LastCreated: TimestampToAPIString(report.LastCreated),
Launching: report.Launching,
Running: report.Running,
Updating: report.Updating,
Pausing: report.Pausing,
Paused: report.Paused,
Terminating: report.Terminating,
Terminated: report.Terminated,
FailedToPause: report.FailedToPause,
FailedToResume: report.FailedToResume,
FailedToTerminate: report.FailedToTerminate,
FailedToLaunch: report.FailedToLaunch,
FailedToUpdate: report.FailedToUpdate,
Failed: report.Failed,
Total: report.Total,
}
return stats
}

View File

@@ -5,8 +5,8 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"github.com/onepanelio/core/api"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/onepanelio/core/server/auth"
"github.com/onepanelio/core/server/converter"
)

View File

@@ -5,23 +5,25 @@ import (
"github.com/onepanelio/core/api"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/server/auth"
"github.com/onepanelio/core/server/converter"
)
func resourceIdentifierToArgoResource(identifier string) string {
func getGroupAndResourceByIdentifier(identifier string) (group, resource string) {
group = "argoproj.io"
switch identifier {
case v1.TypeWorkflowTemplate:
return "workflowtemplates"
return group, "workflowtemplates"
case v1.TypeWorkflowTemplateVersion:
return "workflowtemplates"
return group, "workflowtemplates"
case v1.TypeWorkflowExecution:
return "workflows"
return group, "workflows"
case v1.TypeCronWorkflow:
return "cronworkflows"
return group, "cronworkflows"
case v1.TypeWorkspace:
return "statefulset"
return "onepanel.io", "workspaces"
}
return ""
return "", ""
}
func mapLabelsToKeyValue(labels []*v1.Label) []*api.KeyValue {
@@ -54,10 +56,10 @@ func NewLabelServer() *LabelServer {
}
func (s *LabelServer) GetLabels(ctx context.Context, req *api.GetLabelsRequest) (*api.GetLabelsResponse, error) {
argoResource := resourceIdentifierToArgoResource(req.Resource)
group, resource := getGroupAndResourceByIdentifier(req.Resource)
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", argoResource, "")
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", group, resource, "")
if err != nil || !allowed {
return nil, err
}
@@ -73,10 +75,10 @@ func (s *LabelServer) GetLabels(ctx context.Context, req *api.GetLabelsRequest)
}
func (s *LabelServer) AddLabels(ctx context.Context, req *api.AddLabelsRequest) (*api.GetLabelsResponse, error) {
argoResource := resourceIdentifierToArgoResource(req.Resource)
group, resource := getGroupAndResourceByIdentifier(req.Resource)
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "argoproj.io", argoResource, "")
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", group, resource, "")
if err != nil || !allowed {
return nil, err
}
@@ -97,10 +99,10 @@ func (s *LabelServer) AddLabels(ctx context.Context, req *api.AddLabelsRequest)
}
func (s *LabelServer) ReplaceLabels(ctx context.Context, req *api.ReplaceLabelsRequest) (*api.GetLabelsResponse, error) {
argoResource := resourceIdentifierToArgoResource(req.Resource)
group, resource := getGroupAndResourceByIdentifier(req.Resource)
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "argoproj.io", argoResource, "")
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", group, resource, "")
if err != nil || !allowed {
return nil, err
}
@@ -121,11 +123,11 @@ func (s *LabelServer) ReplaceLabels(ctx context.Context, req *api.ReplaceLabelsR
}
func (s *LabelServer) DeleteLabel(ctx context.Context, req *api.DeleteLabelRequest) (*api.GetLabelsResponse, error) {
argoResource := resourceIdentifierToArgoResource(req.Resource)
group, resource := getGroupAndResourceByIdentifier(req.Resource)
client := getClient(ctx)
// update verb here since we are not deleting the resource, but labels
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "argoproj.io", argoResource, "")
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", group, resource, "")
if err != nil || !allowed {
return nil, err
}
@@ -146,3 +148,29 @@ func (s *LabelServer) DeleteLabel(ctx context.Context, req *api.DeleteLabelReque
Labels: mapLabelsToKeyValue(labels),
}, nil
}
// GetAvailableLabels returns the labels available for a resource specified by the GetAvailableLabelsRequest
func (s *LabelServer) GetAvailableLabels(ctx context.Context, req *api.GetAvailableLabelsRequest) (*api.GetLabelsResponse, error) {
group, resource := getGroupAndResourceByIdentifier(req.Resource)
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", group, resource, "")
if err != nil || !allowed {
return nil, err
}
labels, err := client.ListAvailableLabels(&v1.SelectLabelsQuery{
Table: v1.TypeToTableName(req.Resource),
Alias: "l",
Namespace: req.Namespace,
KeyLike: req.KeyLike + "%",
Skip: v1.SkipKeysFromString(req.SkipKeys),
})
if err != nil {
return nil, err
}
return &api.GetLabelsResponse{
Labels: converter.LabelsToKeyValues(labels),
}, nil
}

View File

@@ -5,7 +5,8 @@ import (
"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/pagination"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/onepanelio/core/pkg/util/router"
"github.com/onepanelio/core/server/converter"
"google.golang.org/grpc/codes"
@@ -19,6 +20,8 @@ import (
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/server/auth"
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
)
type WorkflowServer struct{}
@@ -178,6 +181,9 @@ func (s *WorkflowServer) GetWorkflowExecution(ctx context.Context, req *api.GetW
if err != nil {
return nil, err
}
if wf == nil {
return nil, util.NewUserError(codes.NotFound, "Workflow not found")
}
wf.Namespace = req.Namespace
@@ -275,6 +281,7 @@ func (s *WorkflowServer) GetWorkflowExecutionMetrics(ctx context.Context, req *a
return &api.GetWorkflowExecutionMetricsResponse{Metrics: apiMetrics}, nil
}
// ListWorkflowExecutions returns a list of workflow executions that are specified by the criteria in the ListWorkflowExecutionsRequest
func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.ListWorkflowExecutionsRequest) (*api.ListWorkflowExecutionsResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "argoproj.io", "workflows", "")
@@ -282,8 +289,25 @@ func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.Li
return nil, err
}
paginator := pagination.NewRequest(req.Page, req.PageSize)
workflows, err := client.ListWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, &paginator)
labelFilter, err := v1.LabelsFromString(req.Labels)
if err != nil {
return nil, err
}
reqSort, err := requestSort.New(req.Order)
if err != nil {
return nil, err
}
resourceRequest := &request.Request{
Pagination: pagination.New(req.Page, req.PageSize),
Filter: v1.WorkflowExecutionFilter{
Labels: labelFilter,
Phase: req.Phase,
},
Sort: reqSort,
}
workflows, err := client.ListWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, req.IncludeSystem, resourceRequest)
if err != nil {
return nil, err
}
@@ -299,11 +323,12 @@ func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.Li
apiWorkflowExecutions = append(apiWorkflowExecutions, apiWorkflowExecution(wf, webRouter))
}
count, err := client.CountWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion)
count, err := client.CountWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, req.IncludeSystem, resourceRequest)
if err != nil {
return nil, err
}
paginator := resourceRequest.Pagination
return &api.ListWorkflowExecutionsResponse{
Count: int32(len(apiWorkflowExecutions)),
WorkflowExecutions: apiWorkflowExecutions,
@@ -424,3 +449,22 @@ func (s *WorkflowServer) UpdateWorkflowExecutionStatus(ctx context.Context, req
return &empty.Empty{}, err
}
// GetWorkflowExecutionStatisticsForNamespace returns statistics on workflow executions for a given namespace
func (s *WorkflowServer) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, req *api.GetWorkflowExecutionStatisticsForNamespaceRequest) (*api.GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "argoproj.io", "workflows", "")
if err != nil || !allowed {
return nil, err
}
report, err := client.GetWorkflowExecutionStatisticsForNamespace(req.Namespace)
if err != nil {
return nil, err
}
return &api.GetWorkflowExecutionStatisticsForNamespaceResponse{
Stats: converter.WorkflowExecutionStatisticsReportToAPI(report),
}, nil
}

View File

@@ -5,10 +5,10 @@ import (
"errors"
"github.com/onepanelio/core/api"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/request/pagination"
"github.com/onepanelio/core/server/auth"
"github.com/onepanelio/core/server/converter"
"time"
)
type WorkflowTemplateServer struct{}
@@ -31,17 +31,7 @@ func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
IsArchived: wft.IsArchived,
Labels: converter.MappingToKeyValue(wft.Labels),
Parameters: converter.ParametersToAPI(wft.Parameters),
}
if wft.WorkflowExecutionStatisticReport != nil {
res.Stats = &api.WorkflowExecutionStatisticReport{
Total: wft.WorkflowExecutionStatisticReport.Total,
LastExecuted: wft.WorkflowExecutionStatisticReport.LastExecuted.Format(time.RFC3339),
Running: wft.WorkflowExecutionStatisticReport.Running,
Completed: wft.WorkflowExecutionStatisticReport.Completed,
Failed: wft.WorkflowExecutionStatisticReport.Failed,
Terminated: wft.WorkflowExecutionStatisticReport.Terminated,
}
Stats: converter.WorkflowExecutionStatisticsReportToAPI(wft.WorkflowExecutionStatisticReport),
}
if wft.CronWorkflowsStatisticsReport != nil {
@@ -53,6 +43,7 @@ func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
return res
}
// CreateWorkflowTemplate creates a workflow template and the initial version
func (s *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req *api.CreateWorkflowTemplateRequest) (*api.WorkflowTemplate, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "argoproj.io", "workflowtemplates", "")
@@ -192,12 +183,15 @@ func (s *WorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req
if err != nil {
return nil, err
}
filter := v1.WorkflowTemplateFilter{
Labels: labelFilter,
resourceRequest := &request.Request{
Pagination: pagination.New(req.Page, req.PageSize),
Filter: v1.WorkflowTemplateFilter{
Labels: labelFilter,
},
}
paginator := pagination.NewRequest(req.Page, req.PageSize)
workflowTemplates, err := client.ListWorkflowTemplates(req.Namespace, &paginator, &filter)
workflowTemplates, err := client.ListWorkflowTemplates(req.Namespace, resourceRequest)
if err != nil {
return nil, err
}
@@ -207,11 +201,12 @@ func (s *WorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req
apiWorkflowTemplates = append(apiWorkflowTemplates, apiWorkflowTemplate(wtv))
}
count, err := client.CountWorkflowTemplates(req.Namespace, &filter)
count, err := client.CountWorkflowTemplates(req.Namespace, resourceRequest)
if err != nil {
return nil, err
}
paginator := resourceRequest.Pagination
return &api.ListWorkflowTemplatesResponse{
Count: int32(len(apiWorkflowTemplates)),
WorkflowTemplates: apiWorkflowTemplates,

View File

@@ -6,8 +6,10 @@ import (
"github.com/onepanelio/core/api"
v1 "github.com/onepanelio/core/pkg"
"github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/pagination"
"github.com/onepanelio/core/pkg/util/ptr"
"github.com/onepanelio/core/pkg/util/request"
"github.com/onepanelio/core/pkg/util/request/pagination"
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
"github.com/onepanelio/core/server/auth"
"github.com/onepanelio/core/server/converter"
log "github.com/sirupsen/logrus"
@@ -29,7 +31,7 @@ func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace {
log.WithFields(log.Fields{
"Method": "apiWorkspace",
"Error": "protocol is nil",
})
}).Error("apiWorkspace")
return nil
}
@@ -38,7 +40,7 @@ func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace {
log.WithFields(log.Fields{
"Method": "apiWorkspace",
"Error": "domain is nil",
})
}).Error("apiWorkspace")
return nil
}
@@ -177,6 +179,7 @@ func (s *WorkspaceServer) UpdateWorkspaceStatus(ctx context.Context, req *api.Up
status := &v1.WorkspaceStatus{
Phase: v1.WorkspacePhase(req.Status.Phase),
}
err = client.UpdateWorkspaceStatus(req.Namespace, req.Uid, status)
return &empty.Empty{}, err
@@ -212,8 +215,25 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks
return nil, err
}
paginator := pagination.NewRequest(req.Page, req.PageSize)
workspaces, err := client.ListWorkspaces(req.Namespace, &paginator)
labelFilter, err := v1.LabelsFromString(req.Labels)
if err != nil {
return nil, err
}
reqSort, err := requestSort.New(req.Order)
if err != nil {
return nil, err
}
resourceRequest := &request.Request{
Pagination: pagination.New(req.Page, req.PageSize),
Filter: v1.WorkspaceFilter{
Labels: labelFilter,
Phase: req.Phase,
},
Sort: reqSort,
}
workspaces, err := client.ListWorkspaces(req.Namespace, resourceRequest)
if err != nil {
return nil, err
}
@@ -227,11 +247,12 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks
apiWorkspaces = append(apiWorkspaces, apiWorkspace(w, sysConfig))
}
count, err := client.CountWorkspaces(req.Namespace)
count, err := client.CountWorkspaces(req.Namespace, resourceRequest)
if err != nil {
return nil, err
}
paginator := resourceRequest.Pagination
return &api.ListWorkspaceResponse{
Count: int32(len(apiWorkspaces)),
Workspaces: apiWorkspaces,
@@ -276,3 +297,83 @@ func (s *WorkspaceServer) DeleteWorkspace(ctx context.Context, req *api.DeleteWo
return &empty.Empty{}, err
}
// RetryLastWorkspaceAction will attempt the last action on the workspace again.
func (s *WorkspaceServer) RetryLastWorkspaceAction(ctx context.Context, req *api.RetryActionWorkspaceRequest) (*empty.Empty, error) {
client := getClient(ctx)
workspace, err := client.GetWorkspace(req.Namespace, req.Uid)
if err != nil {
return nil, err
}
if workspace == nil {
return nil, util.NewUserError(codes.NotFound, "workspace not found")
}
verb := ""
switch workspace.Status.Phase {
case v1.WorkspaceFailedToLaunch:
verb = "create"
case v1.WorkspaceFailedToPause:
verb = "update"
case v1.WorkspaceFailedToResume:
verb = "update"
case v1.WorkspaceFailedToTerminate:
verb = "delete"
case v1.WorkspaceFailedToUpdate:
verb = "update"
default:
return nil, util.NewUserError(codes.InvalidArgument, "Workspace is not in a failed state")
}
allowed, err := auth.IsAuthorized(client, req.Namespace, verb, "onepanel.io", "workspaces", req.Uid)
if err != nil || !allowed {
return &empty.Empty{}, err
}
switch workspace.Status.Phase {
case v1.WorkspaceFailedToLaunch:
if _, err := client.StartWorkspace(req.Namespace, workspace); err != nil {
return nil, err
}
case v1.WorkspaceFailedToPause:
if err := client.PauseWorkspace(req.Namespace, workspace.UID); err != nil {
return nil, err
}
case v1.WorkspaceFailedToResume:
if err := client.ResumeWorkspace(req.Namespace, workspace.UID); err != nil {
return nil, err
}
case v1.WorkspaceFailedToTerminate:
if err := client.DeleteWorkspace(req.Namespace, workspace.UID); err != nil {
return nil, err
}
case v1.WorkspaceFailedToUpdate:
if err := client.UpdateWorkspace(req.Namespace, workspace.UID, workspace.Parameters); err != nil {
return nil, err
}
default:
return nil, util.NewUserError(codes.InvalidArgument, "Workspace is not in a failed state")
}
return &empty.Empty{}, err
}
// GetWorkspaceStatisticsForNamespace returns statistics on workflow executions for a given namespace
func (s *WorkspaceServer) GetWorkspaceStatisticsForNamespace(ctx context.Context, req *api.GetWorkspaceStatisticsForNamespaceRequest) (*api.GetWorkspaceStatisticsForNamespaceResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
if err != nil || !allowed {
return nil, err
}
report, err := client.GetWorkspaceStatisticsForNamespace(req.Namespace)
if err != nil {
return nil, err
}
return &api.GetWorkspaceStatisticsForNamespaceResponse{
Stats: converter.WorkspaceStatisticsReportToAPI(report),
}, nil
}

Some files were not shown because too many files have changed in this diff Show More