Skip to content
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

fix: correct order of precedence to gate Konnect mode #738

Merged
merged 1 commit into from Sep 26, 2022

Conversation

GGabriele
Copy link
Collaborator

Right now decK runs against Konnect if some Konnect
credentials are around, either via command flags or via
environment variables. In the case of having a kong-addr
different from the default value and some lingering Konnect
credentials environment variables set, decK would still
decide to run against Konnect instead of Kong.

This PR is reworking the order of precedence gating Konnect:

  1. if the config file contains the _konnect entry, run
    against Konnect
  2. if the kong-addr is set to a non-default value, run
    against Kong
  3. if some Konnect credentials are set, run against Konnect
  4. otherwise run against Kong

Right now decK runs against Konnect if some Konnect
credentials are around, either via command flags or via
environment variables. In the case of having a `kong-addr`
different from the default value and some lingering Konnect
credentials environment variables set, decK would still
decide to run against Konnect instead of Kong.

This PR is reworking the order of precedence gating Konnect:
1. if the config file contains the `_konnect` entry, run
   against Konnect
2. if the `kong-addr` is set to a non-default value, run
   against Kong
3. if some Konnect credentials are set, run against Konnect
4. otherwise run against Kong
@GGabriele GGabriele requested a review from a team as a code owner August 19, 2022 05:41
@GGabriele GGabriele temporarily deployed to Configure ci August 19, 2022 05:41 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2022

Codecov Report

Merging #738 (5065a7d) into main (49d2f98) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #738      +/-   ##
==========================================
- Coverage   43.05%   43.04%   -0.02%     
==========================================
  Files          74       74              
  Lines        9016     9019       +3     
==========================================
  Hits         3882     3882              
- Misses       4763     4766       +3     
  Partials      371      371              
Impacted Files Coverage Δ
cmd/common.go 5.49% <0.00%> (-0.07%) ⬇️
cmd/root.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GGabriele GGabriele merged commit addfd48 into main Sep 26, 2022
@GGabriele GGabriele deleted the fix/precedence branch September 26, 2022 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants