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

🐛 Allow overriding health check endpoint protocol #4846

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

mtulio
Copy link
Contributor

@mtulio mtulio commented Mar 4, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

This change intents to synchronize w/ CLB the health check attributes for
API LB, and use the correct health check path when using HTTP or HTTPS.

The following target group health check attributes for ELBv2
are setting based in the CLB configuration for all protocols:

  • interval: current(30) want(10)
  • timeout: current(10) want(5)
  • health threshold count: current(5) want(5)
  • unhealthy threshold count: current(2) want(3)

When using HTTP or HTTPS, the following attributes will be fixed:

  • path: current("/") want("/readyz")

*'current' is the default values set by AWS, 'want' is the value set
in the CLB.

Which issue(s) this PR fixes
N/A

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fixes in the health check probe configuration for API target group on ELBv2. The correct health check path now is set to `/readyz` when `AWSLoadBalancerSpec.HealthCheckProtocol` is `HTTP` or `HTTPS`.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Mar 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mtulio. 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 Mar 4, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 4, 2024
@mtulio mtulio force-pushed the CORS-3289-lb-fix-api-hc branch 5 times, most recently from f98eed3 to 3c2778e Compare March 4, 2024 20:44
@mtulio mtulio changed the title 🐛 fix: Control plane NLB health check when using the protocol HTTP or HTTPS 🐛 fix: Fixes in the health check probe configuration for API target group on ELBv2 Mar 4, 2024
@mtulio mtulio changed the title 🐛 fix: Fixes in the health check probe configuration for API target group on ELBv2 🐛 fix: Fixes in the health check probe config for ELBv2 of API Mar 4, 2024
api/v1beta2/network_types.go Outdated Show resolved Hide resolved
@mtulio mtulio marked this pull request as ready for review March 4, 2024 21:20
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 4, 2024
@mtulio
Copy link
Contributor Author

mtulio commented Mar 4, 2024

Holding while more tests is done.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2024
@mtulio mtulio changed the title 🐛 fix: Fixes in the health check probe config for ELBv2 of API 🐛 Fixes in the health check probe config for ELBv2 of API Mar 5, 2024
@faiq
Copy link
Contributor

faiq commented Mar 14, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 14, 2024
api/v1beta2/network_types.go Outdated Show resolved Hide resolved
@faiq
Copy link
Contributor

faiq commented Mar 14, 2024

/hold

is there an API change?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 14, 2024
This change intents to synchronize w/ CLB the health check attributes for
API LB, and use the correct health check path when using HTTP or HTTPS.

The following target group health check attributes for ELBv2
are setting based in the CLB configuration for all protocols:

- interval: current(30) want(10)
- timeout: current(10) want(5)
- health threshold count: current(5) want(5)
- unhealthy threshold count: current(2) want(3)

When using HTTP or HTTPS, the following attributes will be fixed:

- path: current("/") want("/readyz")

*'current' is the default values set by AWS, 'want' is the value set
in the CLB.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2024
@faiq
Copy link
Contributor

faiq commented Mar 15, 2024

/test pull-cluster-api-provider-aws-test

@faiq
Copy link
Contributor

faiq commented Mar 15, 2024

/retest

@mtulio
Copy link
Contributor Author

mtulio commented Mar 15, 2024

/retest

@faiq three[1] unit were failing, just fixed it adding the Unhealthy threshold to the mock &elbv2.CreateTargetGroupInput

[1]
"main create flow"
"created with ipv6 vpc"
"load balancer is not an NLB scope security groups will be added"

@faiq
Copy link
Contributor

faiq commented Mar 15, 2024

/lgtm

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

faiq commented Mar 15, 2024

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 15, 2024
@mtulio
Copy link
Contributor Author

mtulio commented Mar 15, 2024

PTAL @nrb ? cc @vincepri

@faiq
Copy link
Contributor

faiq commented Mar 18, 2024

/approve

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@vincepri
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: faiq, vincepri

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 Mar 18, 2024
@vincepri
Copy link
Member

/hold

@mtulio mind renaming the PR title with a more descriptive one?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 18, 2024
@nrb
Copy link
Contributor

nrb commented Mar 18, 2024

/retitle 🐛 Allow overriding health check endpoint protocol
/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 18, 2024
@k8s-ci-robot k8s-ci-robot changed the title 🐛 Fixes in the health check probe config for ELBv2 of API 🐛 Allow overriding health check endpoint protocol Mar 18, 2024
@k8s-ci-robot k8s-ci-robot merged commit cbf5317 into kubernetes-sigs:main Mar 18, 2024
23 checks passed
@mtulio mtulio deleted the CORS-3289-lb-fix-api-hc branch March 18, 2024 16:53
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. 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 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. 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.

5 participants