Skip to content

Only register the audit webhook on Enterprise - #5069

Merged
caseydavenport merged 1 commit into
tigera:masterfrom
caseydavenport:casey-audit-webhook-gate
Jul 21, 2026
Merged

caseydavenport merged 1 commit into
tigera:masterfrom
caseydavenport:casey-audit-webhook-gate

Conversation

@caseydavenport

Copy link
Copy Markdown
Member

Description

On Calico OSS the operator registers an audit-logging validating webhook that points at /audit, but that endpoint only exists in Calico Enterprise. The result is a steady stream of "failed calling webhook" / 404 errors in the Kubernetes API server log, as reported in projectcalico/calico#13244. This gates the audit webhook on the Enterprise variant, so it's only registered where the handler actually exists. The tiered-rbac and cluster-info webhooks (which do exist in OSS) are unchanged.

Bug fix, affects the calico-webhooks component. Covered by unit tests in pkg/render/webhooks for both the OSS and Enterprise variants.

Related: projectcalico/calico#13244

Release Note

Fixes repeated failed-webhook errors in the Kubernetes API server log on Calico (non-Enterprise) clusters, caused by registering an audit admission webhook whose endpoint only exists in Calico Enterprise.

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

The /audit handler exists only in Enterprise, so registering the
audit-logging webhook on Calico OSS points the API server at an
endpoint that isn't served, filling its log with failed webhook
calls. Gate the webhook on the Enterprise variant.
@caseydavenport
caseydavenport merged commit 662f908 into tigera:master Jul 21, 2026
10 checks passed
@caseydavenport
caseydavenport deleted the casey-audit-webhook-gate branch September 8, 2026 19:18
caseydavenport added a commit that referenced this pull request Sep 8, 2026
The /audit handler exists only in Enterprise, so registering the
audit-logging webhook on Calico OSS points the API server at an
endpoint that isn't served, filling its log with failed webhook
calls. Gate the webhook on the Enterprise variant.

(cherry picked from commit 662f908)
caseydavenport added a commit that referenced this pull request Sep 8, 2026
The /audit handler exists only in Enterprise, so registering the
audit-logging webhook on Calico OSS points the API server at an
endpoint that isn't served, filling its log with failed webhook
calls. Gate the webhook on the Enterprise variant.

(cherry picked from commit 662f908)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants