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(consumer group): add validation admission webhook #4437

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented Jul 31, 2023

What this PR does / why we need it:

Adds validation webhook for consumer groups that work this way

  • With an Enterprise Gateway with a license -> OK
  • With a Gateway that is too old to support consumer groups -> Error + block
  • With a Free mode Gateway -> Error (info about invalid/missing license) + block
  • With an OSS gateway -> Error + block

Which issue this PR fixes:

This is part of #3728

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@programmer04 programmer04 added area/feature New feature or request work in progress Work In Progress labels Jul 31, 2023
@programmer04 programmer04 added this to the KIC v2.11.0 milestone Jul 31, 2023
@programmer04 programmer04 self-assigned this Jul 31, 2023
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch coverage: 57.3% and project coverage change: -1.8% ⚠️

Comparison is base (e686d34) 67.6% compared to head (22e7789) 65.8%.

❗ Current head 22e7789 differs from pull request most recent head b1e9b3d. Consider uploading reports for the commit b1e9b3d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4437     +/-   ##
=======================================
- Coverage   67.6%   65.8%   -1.8%     
=======================================
  Files        160     155      -5     
  Lines      18742   18670     -72     
=======================================
- Hits       12670   12298    -372     
- Misses      5309    5654    +345     
+ Partials     763     718     -45     
Files Changed Coverage Δ
internal/admission/handler.go 35.2% <0.0%> (-2.7%) ⬇️
internal/admission/validator.go 36.4% <64.8%> (+0.2%) ⬆️
internal/admission/adminapi_provider.go 96.8% <91.6%> (-3.2%) ⬇️

... and 35 files with indirect coverage changes

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

@programmer04 programmer04 force-pushed the add-consumergroup-validation branch 2 times, most recently from b642b95 to 83e3890 Compare August 1, 2023 12:17
@programmer04 programmer04 removed the work in progress Work In Progress label Aug 1, 2023
@programmer04 programmer04 marked this pull request as ready for review August 1, 2023 12:20
@programmer04 programmer04 requested a review from a team as a code owner August 1, 2023 12:20
@programmer04 programmer04 enabled auto-merge (squash) August 1, 2023 12:21
internal/admission/validator_test.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
@programmer04 programmer04 merged commit 3b02665 into main Aug 1, 2023
29 checks passed
@programmer04 programmer04 deleted the add-consumergroup-validation branch August 1, 2023 13:23
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.

None yet

4 participants