This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
fix: Use resourceHandler from apiv2 package instead of newly creating an internal-only, unauthenticated client #535
Merged
Conversation
This file contains 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
…h proper api authentication Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
bacherfl
force-pushed
the
fix/8722/api-client
branch
from
August 24, 2022 11:57
a87fe4f
to
e5e9d73
Compare
Codecov Report
@@ Coverage Diff @@
## master #535 +/- ##
=========================================
Coverage ? 50.44%
=========================================
Files ? 105
Lines ? 5792
Branches ? 0
=========================================
Hits ? 2922
Misses ? 2737
Partials ? 133 |
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
FYI @TannerGabriel please give it a try, and let us know if this works |
odubajDT
reviewed
Aug 29, 2022
Signed-off-by: Florian Bacher <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
odubajDT
approved these changes
Aug 29, 2022
TannerGabriel
approved these changes
Aug 30, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it out in the job-executor-service. The remote execution plane file fetching seems to work fine now.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes keptn/keptn/#8722
This PR Introduces a new
APIV2()
method to the Keptn SDK's Keptn Handler, which retrieves the recently introduced v2 API client. The returned API handler will either use the in-cluster mode (directly calling the internal service URLs of the control-plane's API), or send its requests with anx-token
via the Keptn Gateway's API endpoint. As previously, this is determined by setting the environment variablesKEPTN_API_ENDPOINT
andKEPTN_API_TOKEN
.For backwards compatibility, the
APIV1()
method is still there, but has been deprecated.This PR also fixes the
GetResourceHandler()
method of the SDKs Keptn Handler by returning a wrapper to the previously initialized v2 Resource API client, as opposed to a resource handler that is only usable in in-cluster mode. The signature of the resource handler'sGetResource()
method has not been changed in this PR, so no adaptation should be required for services that were already using this.