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 support for custom protocol for ELB health checks #3124

Merged
merged 1 commit into from Mar 1, 2022

Conversation

Ankitasw
Copy link
Member

@Ankitasw Ankitasw commented Feb 1, 2022

What type of PR is this?
/kind bug

What this PR does / why we need it:
This PR adds support for providing the custom protocol for Classic ELB health checks so as to support different ciphers.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1657

Checklist:

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

Release note:

Add support for custom protocol for ELB health checks

@k8s-ci-robot k8s-ci-robot added 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. needs-priority labels Feb 1, 2022
@k8s-ci-robot
Copy link
Contributor

@Ankitasw: This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 1, 2022
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 1, 2022
@sedefsavas
Copy link
Contributor

I think we should not change the existing default behaviour, could let users to specify what protocol should be used during health checks.

I would check:

HealthCheck *ClassicELBHealthCheck field in ELB struct.

It has Target string field. We might use that field.

@Ankitasw
Copy link
Member Author

Ankitasw commented Feb 1, 2022

HealthCheck *ClassicELBHealthCheck field in ELB struct.

@sedefsavas since ClassicELB is present in NetworkStatus, so user can't modify it. In order to modify the Target of the HealthCheck, we need to add healthcheck field to AWSLoadBalancerSpec right?

@Ankitasw Ankitasw changed the title Use TCP instead of SSL for ELB health checks [WIP] Use TCP instead of SSL for ELB health checks Feb 1, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 1, 2022
@sedefsavas
Copy link
Contributor

In that case, we can just add a field to controlPlaneLoadbalancer in spec for selecting the protocol to be used in health checks and default to SSL if not provided.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 2, 2022
@Ankitasw Ankitasw changed the title [WIP] Use TCP instead of SSL for ELB health checks Use TCP instead of SSL for ELB health checks Feb 2, 2022
@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 Feb 2, 2022
@Ankitasw Ankitasw changed the title Use TCP instead of SSL for ELB health checks Add support for custom protocol for ELB health checks Feb 2, 2022
Copy link
Contributor

@sedefsavas sedefsavas left a comment

Choose a reason for hiding this comment

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

Also, adding TCP check to one of the e2e tests would be good.

api/v1beta1/awscluster_types.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
api/v1beta1/awscluster_types.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer_test.go Outdated Show resolved Hide resolved
api/v1alpha4/awscluster_conversion.go Outdated Show resolved Hide resolved
@Ankitasw Ankitasw force-pushed the elb-health-check branch 2 times, most recently from 62fc8e7 to f2f7a76 Compare February 2, 2022 08:21
@Ankitasw
Copy link
Member Author

Ankitasw commented Feb 2, 2022

@sedefsavas Manual testing is still pending, I will get that checked first, and then we can get this merged

@Ankitasw
Copy link
Member Author

Ankitasw commented Feb 2, 2022

@sedefsavas Manual testing is still pending, I will get that checked first, and then we can get this merged

Added healthcheckprotocol as TCP, the cluster including control plane node has come up successfully.

@sedefsavas
Copy link
Contributor

Forgot to mention, we should add update validations to block changing the protocol once set.

@sedefsavas sedefsavas added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Feb 2, 2022
@sedefsavas
Copy link
Contributor

Just to confirm that manual upgrade tests below are done:

  1. from v1beta1 without this change to v1beta1 with this change (This is important as there won't be conversion webhooks for this scenario)
  2. from v1alpha3 to v1beta1 with this change

@Ankitasw
Copy link
Member Author

from v1beta1 without this change to v1beta1 with this change (This is important as there won't be conversion webhooks for this scenario)
from v1alpha3 to v1beta1 with this change

1st test is done, I will check the 2nd test manually tomorrow

@sedefsavas
Copy link
Contributor

from v1beta1 without this change to v1beta1 with this change (This is important as there won't be conversion webhooks for this scenario)
from v1alpha3 to v1beta1 with this change

1st test is done, I will check the 2nd test manually tomorrow

Rethinking, regular upgrade tests cover this one. So, we are good.

@Ankitasw
Copy link
Member Author

Triggering final e2e test with all changes
/test pull-cluster-api-provider-aws-e2e

@sedefsavas
Copy link
Contributor

/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 1, 2022
@sedefsavas
Copy link
Contributor

/hold

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sedefsavas

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 do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 1, 2022
@sedefsavas
Copy link
Contributor

sedefsavas commented Mar 1, 2022

I just saw a force push after the last e2e test so triggering test one last time.

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

Feel free to unhold when tests pass.

@Ankitasw
Copy link
Member Author

Ankitasw commented Mar 1, 2022

/hold cancel

@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 1, 2022
@k8s-ci-robot k8s-ci-robot merged commit 2d87f07 into kubernetes-sigs:main Mar 1, 2022
@k8s-ci-robot k8s-ci-robot modified the milestones: v1.4.0, v1.x Mar 1, 2022
@Ankitasw Ankitasw deleted the elb-health-check branch March 1, 2022 09:24
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

Use naive TCP instead of SSL for ELB health checks
4 participants