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

Add --default-target-type flag #2840

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

johngmyers
Copy link
Contributor

Issue

Closes #2690

Description

Adds a --default-target-type flag which sets the default target type of both Services and Ingresses.

The desired target type of an ALB or NLB is almost always determined by the the cluster's CNI. If a cluster's CNI uses ENIs (like AWS VPC CNI does) then the desired target type is ip. If a cluster's CNI uses masquerading, then the desired target type is instance.

When a cluster's CNI uses ENIs, it is a burden to require each workload's Ingress and Service resources to include an LBC-specific annotation in order to function.

This allows clusters with ENI-based CNIs to set the default target type to ip, allowing Ingress and Service resources to work correctly without having to set a target-type annotation on each one.

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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 20, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2022

Codecov Report

Base: 54.07% // Head: 54.01% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (851a7d0) compared to base (a92e689).
Patch coverage: 28.57% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2840      +/-   ##
==========================================
- Coverage   54.07%   54.01%   -0.06%     
==========================================
  Files         144      144              
  Lines        8301     8312      +11     
==========================================
+ Hits         4489     4490       +1     
- Misses       3484     3494      +10     
  Partials      328      328              
Impacted Files Coverage Δ
pkg/config/controller_config.go 15.38% <0.00%> (-2.48%) ⬇️
pkg/ingress/model_builder.go 63.90% <50.00%> (-0.32%) ⬇️
pkg/service/model_builder.go 88.29% <100.00%> (+0.12%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@johngmyers
Copy link
Contributor Author

One question would be how to document the default value of annotations whose default value depend on flags.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 18, 2023
Copy link
Collaborator

@kishorj kishorj left a comment

Choose a reason for hiding this comment

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

nit: default value in the configurations.md
Changes look good to me.

docs/deploy/configurations.md Outdated Show resolved Hide resolved
@kishorj kishorj added tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 20, 2023
@kishorj
Copy link
Collaborator

kishorj commented Jan 20, 2023

/lgtm
/approve

Thanks a lot for the contribution

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jan 20, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2023
@kishorj
Copy link
Collaborator

kishorj commented Jan 20, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit 14dda07 into kubernetes-sigs:main Jan 20, 2023
@johngmyers johngmyers deleted the target-type branch January 20, 2023 20:29
@johngmyers johngmyers mentioned this pull request Aug 23, 2023
12 tasks
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. 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.

Support flag to change the default target-type
5 participants