fix: enable decK's convert subcommand to work with Konnect again #847
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.
After the deprecation of the old
deck konnect
command and the old Konnect format, thedeck convert
command with the Konnect format is not useful anymore in its current shape because the old Konnect format is not compatible anymore with the new workflow handled directly with the maindeck
command.Despite the new Konnect format is mostly compatible with the 'regular' Kong format, it has a few differences:
_format_version
entry set to"3.0"
_workspace
entryThis means that doing a
deck dump
and then adeck sync
from one Gateway with workspaces to Konnect may not natively work because of these incompatibilities.This commit makes sure to support the new Konnect format in the
deck convert
command. The new convertion does the following:_format_version
entry to"3.0"
_workspace
entry and the addition of the_konnect.runtime_group_name
in the following manner:_workspace
entry--konnect-runtime-group-name foo
flag is used, then set_konnect.runtime_group_name: foo
--konnect-runtime-group-name
flag is used, then set_konnect.runtime_group_name
to the value_workspace
was precedently set to_workspace
was present and no--konnect-runtime-group-name
flag is used, then leave the whole_konnect
entry unset