Skip to content

Conversation

kishorj
Copy link
Contributor

@kishorj kishorj commented Mar 10, 2021

Add support for target node labels for ingress resources. This label will allow the user to register the matching nodes in the target group. The labels are specified via the following StringMap annotation -

alb.ingress.kubernetes.io/target-node-labels

This annotation can be specified in the ingress or the service resources. The annotation on the service resource has preference over ingress. This annotation is significant in case of instance targets, and is ignored for ip targets.

Testing done

  • Without this annotation, the default filter gets applied
  • When ingress/service has this annotation, only the matching nodes get registered
  • The annotation on service has preference over the one on the ingress
  • On ingress/service edit, any nodes not matching the labels get de-registered from the target group
  • When a node resource gets modified, the target group gets reconciled as expected

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 10, 2021
@k8s-ci-robot k8s-ci-robot requested a review from M00nF1sh March 10, 2021 22:01
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2021
@codecov-io
Copy link

Codecov Report

Merging #1874 (2603b2c) into main (436c3d2) will increase coverage by 0.09%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1874      +/-   ##
==========================================
+ Coverage   48.07%   48.16%   +0.09%     
==========================================
  Files         112      112              
  Lines        6232     6247      +15     
==========================================
+ Hits         2996     3009      +13     
- Misses       2961     2962       +1     
- Partials      275      276       +1     
Impacted Files Coverage Δ
pkg/ingress/model_build_target_group.go 73.28% <88.88%> (+0.81%) ⬆️

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 436c3d2...2603b2c. Read the comment docs.

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
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

@k8s-ci-robot k8s-ci-robot merged commit fea1a84 into kubernetes-sigs:main Mar 17, 2021
@kishorj kishorj deleted the alb-node-selector branch May 5, 2021 16:59
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. 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.

4 participants