Skip to content

Conversation

1ms-ms
Copy link
Contributor

@1ms-ms 1ms-ms commented Aug 4, 2025

Issue

Entry point to #2311. If accepted, we will need to add WAF arn/name to IngressClassParams spec as well.

Description

Currently, to provision load balancer with a hard coded name (that is a name which isnt generated from group.name), we need to use alb.ingress.kubernetes.io/load-balancer-name annotation, added to at least one ingress resource. When I create an IngressClass, I wish I could specify the load balancer name as part of IngressClassParams spec and not care about the lifecycle of the load-balancer-name annotation.

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 4, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @1ms-ms. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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 k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 4, 2025
@zac-nixon
Copy link
Collaborator

Hey, thanks for the contribution. I don't quite follow what problem this is solving though. A load balancer name is unique within a region / account, meaning that that the ingress class param would be a 1:1 mapping to ingress resources. I don't think it makes sense to add the LB name to the ingress class params.

@1ms-ms
Copy link
Contributor Author

1ms-ms commented Aug 4, 2025

Hi @zac-nixon, thanks for the quick reply. This PR is motivated by the fact that I couldn't find a satisfactory way to provision an ALB with a specific name using this controller.

A load balancer name is unique within a region/account, meaning that the IngressClassParam would be a 1:1 mapping to ingress resources.

This is exactly the reason for this PR. I manage 30 ingresses and want to logically group and bind them to a single ALB. The best option currently is using IngressClassParams since there is no IngressGroup or similar CRD. Other than that, out of all the ideas I had, only two made it to a somewhat standard approach:

  • Create an init Ingress, which will act as a placeholder for common settings like the ALB name, WAF ARN, etc. With this solution, I wouldn’t need to specify annotations in the other ingresses.

  • Use the same load-balancer-name annotation for each ingress I create, which leverages the same ALB.

I don’t like either of these options. I have reviewed other issues like #2600 and the one I linked earlier (#2311), and the approach I propose seems to be mentioned by other users as well.

In the end, I believe this PR wont change anything for people who use the annotation for ALB name, but introduces flexibility for people like me, who try to group ingresses and have cleaner setup with IngressClassParams/IngressClass.

EDIT: doesnt spec.group imply a singular ALB as well?

@zac-nixon
Copy link
Collaborator

hmm, great point about the existing ingress group name logic. I honestly can't think of a use-case to specify that, but since we have a precedence already set and this will help your use-case, I am happy to approve it :D

@zac-nixon
Copy link
Collaborator

/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 Aug 4, 2025
@zac-nixon
Copy link
Collaborator

/lgtm
/approved

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2025
@zac-nixon zac-nixon merged commit 4844275 into kubernetes-sigs:main Aug 11, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants