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

feat: add KongUpstreamPolicy CRD validation rules #4955

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

czeslavo
Copy link
Contributor

What this PR does / why we need it:

Adds KongUpstreamPolicy CRD validations (both CEL rules as well as regular min/max for HTTP status codes). It will allow us to make assumptions on data validity in the controller.

Which issue this PR fixes:

Closes #4951.

@czeslavo czeslavo self-assigned this Oct 24, 2023
@czeslavo czeslavo added area/feature New feature or request and removed size/L labels Oct 24, 2023
@czeslavo czeslavo added this to the KIC v3.0.0 milestone Oct 24, 2023
@czeslavo czeslavo force-pushed the feat/kongupstreampolicy-validations branch from ff23b3f to a342fd6 Compare October 24, 2023 14:26
@czeslavo czeslavo marked this pull request as ready for review October 24, 2023 14:27
@czeslavo czeslavo requested a review from a team as a code owner October 24, 2023 14:27
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e3186f6) 77.8% compared to head (a342fd6) 77.8%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4955   +/-   ##
=====================================
  Coverage   77.8%   77.8%           
=====================================
  Files        166     166           
  Lines      18591   18591           
=====================================
+ Hits       14470   14476    +6     
+ Misses      3295    3289    -6     
  Partials     826     826           
Files Coverage Δ
...dataplane/parser/translators/kongupstreampolicy.go 87.9% <100.0%> (+0.5%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving before all of the tests finish since dbless integration succeeded and this shouldn't differ across modes.

@czeslavo czeslavo enabled auto-merge (squash) October 24, 2023 15:30
@czeslavo czeslavo merged commit 47b4d24 into main Oct 24, 2023
45 checks passed
@czeslavo czeslavo deleted the feat/kongupstreampolicy-validations branch October 24, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add KongUpstreamPolicy CRD validation rules
3 participants