feat: adds http put support to cel expressions#53
Open
gaganhr94 wants to merge 1 commit intokyverno:mainfrom
Open
feat: adds http put support to cel expressions#53gaganhr94 wants to merge 1 commit intokyverno:mainfrom
gaganhr94 wants to merge 1 commit intokyverno:mainfrom
Conversation
Signed-off-by: Gagan H R <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 71.52% 71.68% +0.15%
==========================================
Files 77 77
Lines 2255 2299 +44
==========================================
+ Hits 1613 1648 +35
- Misses 526 530 +4
- Partials 116 121 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3 tasks
Contributor
Author
|
Hi @eddycharly @fjogeleit can you please review this PR when you get a chance. The issue attached with the PR has more details about why I thought about this particular feature. Thanks ! |
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.
Explanation
This PR adds HTTP PUT method support to the Kyverno SDK CEL HTTP library. Currently, the library only supports GET and POST operations. The PUT method is essential for updating existing resources on remote HTTP endpoints and is a fundamental part of RESTful API interactions. This enhancement allows users to make PUT requests with custom headers and request bodies from within CEL expressions, enabling full resource update capabilities in policy expressions.
Related issue
Fixes kyverno/kyverno#15470
Proposed Changes
The PUT implementation mirrors the existing POST method pattern to maintain consistency across the codebase. These changes will add support to the put method (say, for example http.Put() being used in the CEL expressions)
Checklist
Further Comments