Skip to content

Fix behaivour of aws-load-balancer-security-groups annotation#83446

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Elias481:fix-pr-49445
Feb 27, 2020
Merged

Fix behaivour of aws-load-balancer-security-groups annotation#83446
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Elias481:fix-pr-49445

Conversation

@Elias481
Copy link
Copy Markdown

@Elias481 Elias481 commented Oct 3, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
The intention of users utilizing the specified by aws-load-balancer-security-groups annotation is typically, that they want to assign an externally managed security to the load balancer and do not want Kubernetes to modify the group.
(Also see summary/fixed issues)

Which issue(s) this PR fixes:
Ensures that Security Group specified by aws-load-balancer-security-groups is not modified on setup of Load Balancer anymore.
Fixes #79723, kubernetes/cloud-provider-aws/issues/65
Redesign implementation from PR #62774
Also addresses #49445, #79279

Special notes for your reviewer:
If changing return signature of buildELBSecurityGroupList is an issue I would suggest to rename the function and add a wrapper with the old name.

Release Note

Fix handling of aws-load-balancer-security-groups annotation. Security-Groups assigned with this annotation are no longer modified by kubernetes which is the expected behaviour of most users. Also no unnecessary Security-Groups are created anymore if this annotation is used.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @Elias481!

It looks like this is your first PR to kubernetes/kubernetes 🎉. 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/kubernetes 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 kind/bug Categorizes issue or PR as related to a bug. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 3, 2019
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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

@k8s-ci-robot k8s-ci-robot added area/cloudprovider sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 3, 2019
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 3, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Oct 3, 2019
@Elias481
Copy link
Copy Markdown
Author

Elias481 commented Oct 3, 2019

/assign @micahhausler

@nckturner
Copy link
Copy Markdown
Contributor

/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 Oct 4, 2019
@Elias481
Copy link
Copy Markdown
Author

Elias481 commented Oct 5, 2019

/test pull-kubernetes-e2e-gce-100-performance

@redradrat
Copy link
Copy Markdown

redradrat commented Nov 6, 2019

This actually addresses a quite heavy impact issue, as I understand it? It fixes the override of a loadbalancer's sg to allow incoming traffic from 0.0.0.0.

Is there anything that can be done to help move this along from the outside?

@rmt
Copy link
Copy Markdown

rmt commented Dec 9, 2019

Ping? We are also affected by this issue. Who can approve this?

/sig aws

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@rmt: The label(s) sig/aws cannot be applied, because the repository doesn't have them

Details

In response to this:

Ping? We are also affected by this issue. Who can approve this?

/sig aws

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.

@M00nF1sh
Copy link
Copy Markdown
Member

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Elias481, M00nF1sh

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 27, 2020
@M00nF1sh
Copy link
Copy Markdown
Member

/test pull-kubernetes-e2e-gce

@k8s-ci-robot k8s-ci-robot merged commit 6b13bef into kubernetes:master Feb 27, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Feb 27, 2020
@Elias481
Copy link
Copy Markdown
Author

OK fine, I updated the description a bit. So hopefully we can get the fixed version soon in our live enviroment.

@bhks
Copy link
Copy Markdown
Contributor

bhks commented Feb 27, 2020

@Elias481

We should update the release notes so that it can be added in next release.

@Elias481
Copy link
Copy Markdown
Author

@bhagwat070919 shall I do another PR for that or how? I think it's just a short note that the behaviour that was probably expected/desired is now in place.

@ivan-sukhomlyn
Copy link
Copy Markdown

@Elias481 @bhagwat070919 Hi guys,
After this PR merging, will Kubernetes continue to create its own Security Group in case if aws-load-balancer-security-groups defined in the annotations list with custom SG?
More details are available by the link kubernetes/cloud-provider-aws#65
Thanks

@Elias481
Copy link
Copy Markdown
Author

@ivan-sukhomlyn You are right, I forgot to mention and possibly worth to adding to description of PR und Release notes explicitly. This is of course also fixed in this turn.

@ivan-sukhomlyn
Copy link
Copy Markdown

Thanks for clarifying and your work 👍
@bhagwat070919 Maybe you have some ETA of Kubernetes 1.18 at the AWS EKS service?

var err error
var securityGroupID string
// We do not want to make changes to a Global defined SG
var setupSg = false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/setupSg/setUpSG/

@bhks
Copy link
Copy Markdown
Contributor

bhks commented Feb 27, 2020

@bhagwat070919 shall I do another PR for that or how? I think it's just a short note that the behaviour that was probably expected/desired is now in place.

@Elias481 you can just update this PR Release note and it would be taken when release note is being made.

@bhks
Copy link
Copy Markdown
Contributor

bhks commented Feb 27, 2020

@Elias481 ,

Do you mind creating Cherry-pick of this PR for k8s 1.17, 1.16, 1.15 and 1.14 ?

@Elias481
Copy link
Copy Markdown
Author

@bhagwat070919 I can do so, I think I will find some time till monday morning..

@ivan-sukhomlyn
Copy link
Copy Markdown

@Elias481 @bhagwat070919 It would be nice to have this fix in other K8S versions.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Feb 29, 2020
bnutt added a commit to bnutt/website that referenced this pull request Oct 1, 2020
…e.md

Annotation `service.beta.kubernetes.io/aws-load-balancer-security-groups` is missing from the list of annotations that can be applied to an ELB. This annotation was introduced in kubernetes/kubernetes#62774 and refactored kubernetes/kubernetes#83446 to allow users to specify a set of existing security groups to attach to the ELB instead of using any precreated security groups.
@vampirismtrueblood
Copy link
Copy Markdown

I think this issue needs to be re-opened, issue still exists with EKS v1.25,
loadBalancerSourceRanges works when creating the NLB, but updating still does not work.
Can we have this re-opened please

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. area/cloudprovider area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. 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.

Still unable to manage all SGs outside K8S after PR #49445