Skip to content

Relax cluster tag requirement on subnets during auto-discovery #1773

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
merged 2 commits into from
Feb 8, 2021

Conversation

kishorj
Copy link
Collaborator

@kishorj kishorj commented Jan 23, 2021

Relax the kubernetes cluster tag requirement on subnets during auto-discovery. The prior behavior was to discover only those subnets with the tag kubernetes.io/cluster/<clustername> and values {owned, shared}. If there are subnets with the cluster tag, those still get choosen. In case there are multiple subnets per AZ, auto-discovery will break the tie in the following order

  1. prefer subnets with the cluster tag kubernetes.io/cluster/
  2. prefer the subnet that is first in lexicographic order

If the subnet has tag for a different cluster, auto-discovery will ignore such subnets.

Tests done

  • subnets with cluster tag got choosen during auto discovery
  • subnets got sorted in lexicographic order if there were ties
  • subnets without cluster tags were also considered by auto-discovery
  • subnets with tag for different cluster did not get auto-discovered

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 23, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @kishorj. 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 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 Jan 23, 2021
@codecov-io
Copy link

codecov-io commented Jan 23, 2021

Codecov Report

Merging #1773 (0a1a724) into main (67494bd) will increase coverage by 0.15%.
The diff coverage is 96.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1773      +/-   ##
==========================================
+ Coverage   46.76%   46.91%   +0.15%     
==========================================
  Files         110      110              
  Lines        5988     6007      +19     
==========================================
+ Hits         2800     2818      +18     
- Misses       2925     2926       +1     
  Partials      263      263              
Impacted Files Coverage Δ
pkg/networking/subnet_resolver.go 93.28% <96.00%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67494bd...0a1a724. Read the comment docs.

@kishorj
Copy link
Collaborator Author

kishorj commented Jan 23, 2021

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 23, 2021
@M00nF1sh
Copy link
Collaborator

M00nF1sh commented Feb 5, 2021

/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 Feb 5, 2021
Copy link
Collaborator

@M00nF1sh M00nF1sh left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2021
@M00nF1sh
Copy link
Collaborator

M00nF1sh commented Feb 5, 2021

/test pull-aws-load-balancer-controller-e2e-test

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2021
@M00nF1sh
Copy link
Collaborator

M00nF1sh commented Feb 5, 2021

/test pull-aws-load-balancer-controller-e2e-test

@M00nF1sh
Copy link
Collaborator

M00nF1sh commented Feb 6, 2021

/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 Feb 6, 2021
@M00nF1sh M00nF1sh added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

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

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:

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 fb86d3f into kubernetes-sigs:main Feb 8, 2021
@kishorj kishorj deleted the subnet-tags branch February 25, 2021 21:46
kreempuff added a commit to kreempuff/aws-alb-ingress-controller that referenced this pull request Apr 21, 2021
Release 2.1.2 included changes that relaxed requirements on subnet [tagging](kubernetes-sigs#1773) 
with the cluster name.
k8s-ci-robot pushed a commit that referenced this pull request Apr 21, 2021
* docs: update Subnet discovery with optional tag

Release 2.1.2 included changes that relaxed requirements on subnet [tagging](#1773) 
with the cluster name.

* docs: update based of PR feedback
errm added a commit to cookpad/terraform-aws-eks that referenced this pull request Nov 2, 2021
* These tags were previously required by aws-load-balancer-controller/alb-ingress-controller
* We no longer ship a ingress controller with the module since #225
* aws-load-balancer-controller doesn't need those tags anyway since v2.1.2 - kubernetes-sigs/aws-load-balancer-controller#1773
errm added a commit to cookpad/terraform-aws-eks that referenced this pull request Nov 2, 2021
* These tags were previously required by aws-load-balancer-controller/alb-ingress-controller
* We no longer ship a ingress controller with the module since #225
* aws-load-balancer-controller doesn't need those tags anyway since v2.1.2 - kubernetes-sigs/aws-load-balancer-controller#1773
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
…netes-sigs#1773)

* relax cluster tag requirement on subnets

* handle subnets with multiple cluster tags
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
* docs: update Subnet discovery with optional tag

Release 2.1.2 included changes that relaxed requirements on subnet [tagging](kubernetes-sigs#1773) 
with the cluster name.

* docs: update based of PR feedback
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. 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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants