Skip to content

Deduplicate Admission Webhooks - #497

Merged
scothis merged 2 commits into
servicebinding:mainfrom
scothis:dedup-webhooks
Sep 26, 2025
Merged

scothis merged 2 commits into
servicebinding:mainfrom
scothis:dedup-webhooks

Conversation

@scothis

@scothis scothis commented Sep 18, 2025

Copy link
Copy Markdown
Member

Defining admission webhooks for each version of the same resource results in duplicate webhook calls for the same admission request. The resource is converted to each version as that version's webhook is called. Fortunately these calls were made in parallel, so there was minimal latency added for users, but the extra calls are just wasting resources.

We now only register admission webhooks for the v1 version of the resources. API requests using the v1beta1 or v1alpha3 versions are converted to the v1 by the API server and then called using the v1 webhook endpoint.

Defining admission webhooks for each version of the same resource
results in duplicate webhook calls for the same admission request. The
resource is converted to each version as that version's webhook is
called. Fortunately these calls were made in parallel, so there was
minimal latency added for users, but the extra calls are just wasting
resources.

We now only register admission webhooks for the v1 version of the
resources. API requests using the v1beta1 or v1alpha3 versions are
converted to the v1 by the API server and then called using the v1
webhook endpoint.

Signed-off-by: Scott Andrews <[email protected]>
@codecov

codecov Bot commented Sep 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.06%. Comparing base (51c066f) to head (c07f504).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #497      +/-   ##
==========================================
+ Coverage   65.27%   72.06%   +6.78%     
==========================================
  Files          32       28       -4     
  Lines        2039     1872     -167     
==========================================
+ Hits         1331     1349      +18     
+ Misses        637      452     -185     
  Partials       71       71              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Scott Andrews <[email protected]>
@scothis
scothis merged commit 525efd4 into servicebinding:main Sep 26, 2025
16 checks passed
@scothis
scothis deleted the dedup-webhooks branch September 26, 2025 01:02
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.

1 participant