feat: Added changes to support workspace with konnect flow#1892
Open
shivaygupta-dotcom wants to merge 17 commits intomainfrom
Open
feat: Added changes to support workspace with konnect flow#1892shivaygupta-dotcom wants to merge 17 commits intomainfrom
shivaygupta-dotcom wants to merge 17 commits intomainfrom
Conversation
Contributor
Author
|
CI is failing because, no other entity is present other than routes for Konnect Workspaces.This will be fixed once changes are deployed from KoKo side. Changes are inProgress from KoKo side, I didn't got any specific ETA. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1892 +/- ##
==========================================
- Coverage 33.54% 33.02% -0.52%
==========================================
Files 76 76
Lines 6711 6810 +99
==========================================
- Hits 2251 2249 -2
- Misses 4280 4381 +101
Partials 180 180 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| errorExpected: true, | ||
| errorString: "workspace doesn't exist: nonexistent", | ||
| }, | ||
| { |
Contributor
Author
There was a problem hiding this comment.
removed runtime group test because, --konnect-runtime-group-name is deprecated and CI was throwing error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://konghq.atlassian.net/browse/KOKO-3141
#1859
Supporting PRs:
Kong/go-kong#602
Kong/go-database-reconciler#376
Summary:
This PR introduces workspace support for Konnect as part of the referenced Jira task. The changes extend existing commands to support workspaces when operating in Konnect mode. Add changes in sync, diff, reset, apply, dump and validate command. The overall flow is similar to the existing Kong workspace implementation, but Konnect uses different workspace API endpoints, which required additional handling.
In Konnect, all entities are attached to the default workspace by default but endpoint is bit different then what we have in Kong . Therefore, when the user explicitly specifies the default workspace (e.g., during reset or dump), the system should follow the existing normal Konnect flow, without triggering workspace-specific logic.
Few major changes I want to highlight below:
workspaceExistsfunc by adding a boolean parameter to support workspace validation logic for Konnect.GetKongClientForKonnectModeto support WorkspaceName and added validation to check if an Authorization Bearer token is already set; if present, the token initialization step is skippedresetKonnectV2to support both single workspace resets (--workspace) and reset across all workspaces (--all-workspaces), with additional validation to ensure the default workspace follows the existing Konnect behavior.dumpKonnectV2to support dumping configurations for a single workspace or all workspaces, with logic to treat the default workspace using the current standard Konnect flow.Integration tests For Konnect Workspaces:
Dump Command
Reset Command
Sync Command
Diff Command
Apply Command
Validate Command