Skip to content

keep LB addons' settings unchanged unless explicitly specified #3800

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

Merged

Conversation

M00nF1sh
Copy link
Collaborator

@M00nF1sh M00nF1sh commented Aug 9, 2024

Issue

resolves #3780

Description

This PR changes the behavior of annotations related to Application LoadBalancer add-ons:

  • WAFClassic: alb.ingress.kubernetes.io/waf-acl-id
  • WAFv2: alb.ingress.kubernetes.io/wafv2-acl-arn
  • ShieldProtection: alb.ingress.kubernetes.io/shield-advanced-protection

Previous, when those annotations is not specified, the controller will make sure those add-ons don't exists on loadBalancer, i.e. delete all existing WAFClassic/WAFv2/ShieldProtection.
We have decided to change the behavior such that if those annotations is not specified or empty, the controller will keep the existing add-ons(if any) unchanged. And users have to explicitly disable add-ons via annotations:

  • To disable WAFClassic: alb.ingress.kubernetes.io/waf-acl-id: none
  • To disable WAFv2: alb.ingress.kubernetes.io/wafv2-acl-arn: none
  • To disable ShieldProtection: alb.ingress.kubernetes.io/shield-advanced-protection: false

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 9, 2024
@M00nF1sh M00nF1sh force-pushed the lb_addon_explicitly_disable branch from e708278 to b8ffe02 Compare August 9, 2024 00:34
@M00nF1sh M00nF1sh force-pushed the lb_addon_explicitly_disable branch from b8ffe02 to e0dc87d Compare August 9, 2024 17:05
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 9, 2024
Copy link

@tzneal tzneal left a comment

Choose a reason for hiding this comment

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

LGTM

@oliviassss
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: M00nF1sh, oliviassss, tzneal

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [M00nF1sh,oliviassss]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@M00nF1sh M00nF1sh merged commit 7cd06f1 into kubernetes-sigs:main Aug 9, 2024
7 of 9 checks passed
M00nF1sh added a commit to M00nF1sh/aws-load-balancer-controller that referenced this pull request Aug 9, 2024
M00nF1sh added a commit that referenced this pull request Aug 9, 2024
* bump up go to 1.22.5 (#3798)

* keep LB addons' settings unchanged unless explicitly specified (#3800)

add UTs for related components

---------

Co-authored-by: Olivia Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] AWS WAF WebACL should not be disassociated from ALB if there is no 'alb.ingress.kubernetes.io/wafv2-acl-arn' annotation
4 participants