-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deck always defaults to konnect.yaml instead of kong.yaml #288
Comments
Use separate variables to store Konnect command flag values where Konnect commands share flags with non-Konnect commands. Cobra will otherwise update the variable contents with whichever flags it processes last, effectively overriding the non-Konnect defaults with the Konnect defaults. Fix #288
Particularly annoying for dump because of the way the
A temporary workaround for 1.5 is to explicitly specify the old default. Even though it's not used for the filenames, it allows the check to pass and continues on to create the workspace filenames normally:
|
I use deck a lot in CI/CD contexts.
It would nice to have the opportunity to flag the name of config file on demand. As a workaround I always use |
Use separate variables to store Konnect command flag values where Konnect commands share flags with non-Konnect commands. Cobra will otherwise update the variable contents with whichever flags it processes last, effectively overriding the non-Konnect defaults with the Konnect defaults. Fix #288
Use separate variables to store Konnect command flag values where Konnect commands share flags with non-Konnect commands. Cobra will otherwise update the variable contents with whichever flags it processes last, effectively overriding the non-Konnect defaults with the Konnect defaults. Fix #288
Use separate variables to store Konnect command flag values where Konnect commands share flags with non-Konnect commands. Cobra will otherwise update the variable contents with whichever flags it processes last, effectively overriding the non-Konnect defaults with the Konnect defaults. Fix #288
With decK 1.5 the default Kong configuration file is
konnect.yaml
and no longerkong.yaml
. Reading the code, I believe this is a mistake? The non-Konnect commands still havekong.yaml
as the default, e.g.deck/cmd/dump.go
Lines 152 to 154 in a640f10
However, the same variable names are used in the Konnect commands, e.g.
deck/cmd/konnect_dump.go
Lines 80 to 82 in a640f10
What I think is happening is that the first thing
StringVarP
does is set the variable to the default value in https://github.com/spf13/pflag/blob/85dd5c8bc61cfa382fecd072378089d4e856579d/string.go#L6-L9And since the Konnect files are alphabetically after the non-Konnect files their default value will always overwrite the non-Konnect values during package initialization.
The different commands should probably just use different variables to avoid any crossover.
The text was updated successfully, but these errors were encountered: