Skip to content

add information on load balancer lifecycle #2703

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

Closed
wants to merge 2 commits into from

Conversation

geoffcline
Copy link
Contributor

Issue

Description

Customers may be confused or surprised when an annotation on a service is updated, and the configuration of the corresponding load balancer is not updated. Customers may also be surprised when the controller deletes and recreates a load balancer instead of attempting an in place update.

This new section on load balancer lifecycle raises awareness of this issue, and offers some best practice reccommendations.

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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 24, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @geoffcline. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: geoffcline
To complete the pull request process, please assign m00nf1sh after the PR has been reviewed.
You can assign the PR to them by writing /assign @m00nf1sh in a comment when ready.

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 requested review from kishorj and M00nF1sh June 24, 2022 01:35
@geoffcline
Copy link
Contributor Author

/ok-to-test

I'm an org member now?

@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 Jun 24, 2022
@@ -12,6 +12,7 @@ You can add annotations to kubernetes Ingress and Service objects to customize t
- Annotations that configures LoadBalancer / Listener behaviors have different merge behavior when IngressGroup feature is been used. `MergeBehavior` column below indicates how such annotation will be merged.
- Exclusive: such annotation should only be specified on a single Ingress within IngressGroup or specified with same value across all Ingresses within IngressGroup.
- Merge: such annotation can be specified on all Ingresses within IngressGroup, and will be merged together.
- The controller may not update the configuration of an *existing* load balancer if an annotation is added/updated. New load balancers will be have an appropriate configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This controller should update the existing load balancer. In certain case, for example when the load balancer scheme gets modified from internal to internet-facing or vice-versa, controller deletes existing lb and recreates a new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I commented my issue on the other PR (#2680 (comment)) -- let's discuss there

@@ -7,6 +7,7 @@
- stringList: `"s1,s2,s3"`
- stringMap: `"k1=v1,k2=v2"`
- json: `"{ \"key\": \"value\" }"`
- The controller may not update the configuration of an *existing* load balancer if an annotation is added/updated. New load balancers will be have an appropriate configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Barring some limitations, controller does update the existing load balancer. There are some issues with the kube-controller-manager provisioned load balancer, but this controller should be able to update most of the configuration.

Limitations:

  • modifying/adding the annotation service.beta.kubernetes.io/aws-load-balancer-type after service creation is not recommended as there is a potential for leaking the AWS LB resource in case both kcm and this controller act on the service
  • if user modifies the lb scheme, controller deletes and creates a new lb with the new scheme
  • updating subnets may not work - this is due to any temporary limitation put in by the AWS

## Lifecycle of AWS Load Balancers

!!! warning
The controller, generally, does not update load balancers after creation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

load balancer does get updated, this warning is not accurate.

@geoffcline geoffcline marked this pull request as draft July 27, 2022 22:23
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2022
@geoffcline geoffcline closed this Sep 17, 2022
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants