Skip to content
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

Enforce one target group per target group binding #2098

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

fawadkhaliq
Copy link
Contributor

Issue

#2092

Description

Prevent creation of TargetGroupBinding if its already referenced by an existing TargetGroup

TargetGroupBinding has a one-to-one mapping with TargetGroup as per the data model, however, the controller does not enforce this behavior. This can lead to two TargetGroupBinding resources point to the same TargetGroup.

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, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @fawadkhaliq. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 24, 2021
@fawadkhaliq
Copy link
Contributor Author

/assign @M00nF1sh

@codecov-commenter
Copy link

Codecov Report

Merging #2098 (eb3de77) into main (ed92ddf) will increase coverage by 0.00%.
The diff coverage is 45.45%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2098   +/-   ##
=======================================
  Coverage   49.23%   49.23%           
=======================================
  Files         130      130           
  Lines        7036     7046   +10     
=======================================
+ Hits         3464     3469    +5     
- Misses       3294     3297    +3     
- Partials      278      280    +2     
Impacted Files Coverage Δ
webhooks/elbv2/targetgroupbinding_validator.go 79.59% <45.45%> (-7.59%) ⬇️

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 ed92ddf...eb3de77. 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 Jun 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fawadkhaliq, 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2021
@kishorj kishorj added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jun 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit 27803e3 into kubernetes-sigs:main Jun 25, 2021
@fawadkhaliq fawadkhaliq deleted the tgb-validate branch June 25, 2021 00:12
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
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. 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. 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.

5 participants