Skip to content

Conversation

@LorcanMcVeigh
Copy link
Contributor

@LorcanMcVeigh LorcanMcVeigh commented Aug 28, 2025

  • Start a test for new behaviour

  • Use privileged PSS for tigera-gateway ns

  • Enable EnvoyPatchPolicy

  • Deploy and configure waf-http-filter

  • Fix codegen

  • Fix capitalisation

  • Support custom envoy proxy

  • Add comment for PSSPrivileged

  • Check volumes are set as expected


Description

Release Note

Deploy the WAF HTTP Filter alongside the Envoy Proxy when running in Calico Enterprise.

For PR author

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

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@gantony
Copy link
Contributor

gantony commented Aug 28, 2025

Might be good to edit the default title to include 032) (1 more character 😅) and fill in the release note section (hopefully we can copy from the other PR, or maybe better the bullet from the release notes in the docs)

@LorcanMcVeigh LorcanMcVeigh changed the title [RS-2546] Update operator to deploy waf-http-filter in Enterprise (#4… [RS-2546] Update operator to deploy waf-http-filter in Enterprise (#4032) Aug 28, 2025
…gera#4032)

* Start a test for new behaviour

* Use privileged PSS for tigera-gateway ns

* Enable EnvoyPatchPolicy

* Deploy and configure waf-http-filter

* Fix codegen

* Fix capitalisation

* Support custom envoy proxy

* Add comment for PSSPrivileged

* Check volumes are set as expected

---------

Co-authored-by: Antony Guinard <[email protected]>
@LorcanMcVeigh LorcanMcVeigh force-pushed the lorcan/waf-http-filter branch from 60c65b2 to 8399c8b Compare August 28, 2025 09:39
@nelljerram
Copy link
Member

@LorcanMcVeigh With this cherry pick, have you checked for any remaining differences (for Gateway API code) between the release-v1.39 and master branches? Just in case there are any further PRs on master that will also need to be picked.

Copy link
Member

@nelljerram nelljerram left a comment

Choose a reason for hiding this comment

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

I've commented a few things. If you agree, they'll need to be made in master first and then those changes added to this PR.


// Setup WAF HTTP Filter on Enterprise.
if pr.cfg.Installation.Variant == operatorv1.TigeraSecureEnterprise {
// The WAF HTTP filter is not supported when the envoy proxy is deployed as a DaemonSet
Copy link
Member

Choose a reason for hiding this comment

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

This restriction needs to be documented.

@LorcanMcVeigh Do you have tickets tracking this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Gateway WAF is currently documented in https://docs.tigera.io/calico-enterprise/3.22/threat/deploying-waf-ingress-gateway. Agree we need to add a note under GatewayKind.

if initContainer.Name == wafHTTPFilter.Name {
hasWAFHTTPFilter = true
// Handle update
if initContainer.Image != wafHTTPFilter.Image {
Copy link
Member

Choose a reason for hiding this comment

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

Why only check the image? We may in future want to update the WAF sidecar in other ways, so it might be better for this code to support that.

Copy link
Member

Choose a reason for hiding this comment

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

I think the operator should just update the whole container spec that it wants, without checking for image change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's address this in a follow up PR to keep changes minimal for the cherry-pick.

if volume.Name == logsVolume.Name {
hasLogsVolume = true
// Handle update
if volume.VolumeSource.HostPath.Path != logsVolume.VolumeSource.HostPath.Path || volume.VolumeSource.HostPath.Type != logsVolume.VolumeSource.HostPath.Type {
Copy link
Member

Choose a reason for hiding this comment

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

As above, I don't think we need this check. Usual operator behaviour is just to blat the complete thing that it wants.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's address this in a follow up PR to keep changes minimal for the cherry-pick.

@LorcanMcVeigh
Copy link
Contributor Author

@nelljerram At this point, this PR is simply to get the feature into the release it was meant to be apart of. These changes don't need to be in this release. We can make the changes to master and they can be picked up in the next release but I don't see the need for them to be in this cherry-pick or any follow-up cherry-pick.

@danudey danudey modified the milestones: v1.39.2, v1.39.3, v1.39.4 Sep 17, 2025
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.

5 participants