Skip to content

fix(crds): install applicationlayer WAF CRDs in v1-CRD mode - #4920

Merged
electricjesus merged 1 commit into
tigera:masterfrom
electricjesus:seth/operator-waf-crds-v1mode
Jun 15, 2026
Merged

electricjesus merged 1 commit into
tigera:masterfrom
electricjesus:seth/operator-waf-crds-v1mode

Conversation

@electricjesus

@electricjesus electricjesus commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

Description

Bug fix.

The applicationlayer.projectcalico.org WAF v3 CRDs (WAFPolicy, GlobalWAFPolicy, WAFPlugin, GlobalWAFPlugin, WAFValidationPolicy, GlobalWAFValidationPolicy) were bundled into the enterprise/v3.projectcalico.org/ datastore CRD source directory, so getEnterpriseCRDSource installed them only in v3-CRD mode. On a standard apiserver-backed install the operator runs in v1-CRD mode, selects the enterprise/v1.crd.projectcalico.org source dir, and skips these CRDs entirely. Because applicationlayer.projectcalico.org is a CRD-only group (the aggregated apiserver serves only projectcalico.org), the kinds are then unavailable and the kube-controllers WAF reconcilers cannot start their informers β€” so gateway WAF is unusable on any standard install.

applicationlayer.projectcalico.org is a distinct, CRD-only API group with a single v3 schema (not the crd.projectcalico.org ↔ projectcalico.org group rename), so it is now handled the same way as policy.networking.k8s.io: synced into its own CRD source directory (pkg/imports/crds/enterprise/applicationlayer.projectcalico.org/) and installed unconditionally in both v1-CRD and v3-CRD modes via a dedicated getApplicationLayerCRDSource().

  • Type: bug fix
  • Components: operator CRD management (pkg/imports/crds), CRD sync (Makefile)
  • Testing:
    • Unit test asserting the six applicationlayer.projectcalico.org CRDs are present for the Enterprise variant in both v1-CRD and v3-CRD modes.
    • Verified live on a master Calico Enterprise hashrelease running in apiserver-backed (v1-CRD) mode: with the stock operator, zero applicationlayer.projectcalico.org CRDs were installed; with this change the operator installs all six. Re-verified by deleting the CRDs and confirming the operator reinstalls all six via the new code path. Cross-checked against a --no-api-server (v3-CRD) cluster where the CRDs were already present.

Release Note

Fixed a bug where the Calico Enterprise gateway WAF CRDs (applicationlayer.projectcalico.org) were not installed on standard aggregated-apiserver installations, making the gateway WAF feature unusable. These CRDs are now installed in both CRD modes.

For PR author

  • Tests for change. β€” pkg/imports/crds/crds_test.go asserts the WAF CRDs install in both v1-CRD and v3-CRD modes.
  • If changing pkg/apis/, run make gen-files β€” N/A, no pkg/apis/ changes.
  • If changing versions, run make gen-versions β€” N/A, no version changes. (CRD sync layout updated in Makefile so update-enterprise-crds relocates these CRDs to the dedicated dir.)

For PR reviewers

  • Milestone set according to targeted release.
  • Appropriate labels: kind/bug, enterprise.

@electricjesus electricjesus added kind/bug Something isn't working enterprise Feature applies to enterprise only labels Jun 15, 2026
@electricjesus
electricjesus requested a review from a team as a code owner June 15, 2026 09:30
@marvin-tigera marvin-tigera added this to the v1.44.0 milestone Jun 15, 2026
@electricjesus
electricjesus force-pushed the seth/operator-waf-crds-v1mode branch from 2b721e2 to 19dde4d Compare June 15, 2026 09:50
The applicationlayer.projectcalico.org WAF CRDs (WAFPolicy, GlobalWAFPolicy,
WAFPlugin, GlobalWAFPlugin, WAFValidationPolicy, GlobalWAFValidationPolicy)
were bundled into the v3.projectcalico.org datastore CRD source directory, so
the operator installed them only in v3-CRD mode. On a standard apiserver-backed
install the operator runs in v1-CRD mode and skipped them entirely, and the
aggregated apiserver does not serve the applicationlayer.projectcalico.org
group, so the kinds were unavailable and the kube-controllers WAF reconcilers
could not start their informers. Gateway WAF was therefore unusable on any
standard install.

applicationlayer.projectcalico.org is a distinct, CRD-only API group with a
single v3 schema (not the crd.projectcalico.org <-> projectcalico.org rename),
so it is now handled the same way as policy.networking.k8s.io: synced into its
own CRD source directory and installed unconditionally in both v1-CRD and
v3-CRD modes via a dedicated getApplicationLayerCRDSource().
@electricjesus
electricjesus force-pushed the seth/operator-waf-crds-v1mode branch from 19dde4d to 9595dc9 Compare June 15, 2026 11:22
@electricjesus
electricjesus merged commit 7c07449 into tigera:master Jun 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-pr-required enterprise Feature applies to enterprise only kind/bug Something isn't working release-note-required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants