Skip to content

Support NLBSecurityGroupMode for AWS Cloud Controller Manager#18211

Open
mfbonfigli wants to merge 2 commits intokubernetes:masterfrom
mfbonfigli:nlb_security_group_mode
Open

Support NLBSecurityGroupMode for AWS Cloud Controller Manager#18211
mfbonfigli wants to merge 2 commits intokubernetes:masterfrom
mfbonfigli:nlb_security_group_mode

Conversation

@mfbonfigli
Copy link
Copy Markdown

@mfbonfigli mfbonfigli commented Apr 17, 2026

What this PR does / why we need it:

This PR adds support for the NLBSecurityGroupMode cloud configuration setting and the SetSecurityGroups IAM permission for AWS Cloud Controller Manager.

When nlbSecurityGroupMode: Managed is set in the cluster spec, kops writes NLBSecurityGroupMode = Managed to the cloud config file, enabling CCM to create and manage dedicated security groups for each Network Load Balancer instead of provisioning NLBs without security groups.

The SetSecurityGroups IAM permission allows CCM to attach/detach security groups from cluster-owned NLBs, bringing CCM to parity with the AWS Load Balancer Controller which already has this permission and enabling the BYO Security Groups feature for NLBs in AWS CCM.

Please refer to issue #18210 for more details on why this change is needed.

Changes:

  • API fields: Added NLBSecurityGroupMode to AWSSpec and CloudConfiguration with bidirectional conversion
  • Validation: Only accepts "Managed" value (case-sensitive) or omitted/nil.
  • IAM permissions: Added elasticloadbalancing:SetSecurityGroups to CCM role in clusterTaggedAction block.
  • Cloud config generation: Writes NLBSecurityGroupMode = Managed to /etc/kubernetes/cloud.config on master nodes
  • Tests: Added validation tests, cloud config tests, and conversion tests
  • Regenerated artifacts: Regenerated code/crds/test data.

Which issue(s) this PR fixes:
Fixes #18210

Special notes for your reviewer:

Large number of changed files: many auto-generated IAM policy golden test files were updated via hack/update-expected.sh to include the new SetSecurityGroups permission.

Related upstream work:

Adds nlbSecurityGroupMode field to cluster spec and elasticloadbalancing:SetSecurityGroups
IAM permission for AWS Cloud Controller Manager to support managed security groups for AWS
Network Load Balancers.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 17, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @mfbonfigli!

It looks like this is your first PR to kubernetes/kops 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kops has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 17, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @mfbonfigli. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign olemarkus for approval. For more information see the Code Review Process.

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

Details Needs approval from an approver in each of these files:

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

@hakman
Copy link
Copy Markdown
Member

hakman commented Apr 19, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 19, 2026
@hakman
Copy link
Copy Markdown
Member

hakman commented Apr 19, 2026

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api area/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support NLBSecurityGroupMode for AWS Cloud Controller Manager

3 participants