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

Wait for webhook readiness and healthy #2685

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

geetikabatra
Copy link
Contributor

@geetikabatra geetikabatra commented Aug 19, 2021

This change adds a ready and health check on the webhook server.

Release note:

Signed-off-by: Geetika Batra geetika.b@vmware.com

What type of PR is this?

What this PR does / why we need it:

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 #

Special notes for your reviewer:

Checklist:

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

Release note:

Add readiness and health checks to webhook server

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 19, 2021
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-priority labels Aug 19, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @geetikabatra!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @geetikabatra. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 19, 2021
@geetikabatra geetikabatra changed the title What this PR does / why we need it: Wait for webhook readiness and healthy Aug 19, 2021
@randomvariable
Copy link
Member

@geetikabatra looks like you haven't signed the CNCF CLA?

/assign @sedefsavas
as the last person who was touching this.

@geetikabatra
Copy link
Contributor Author

@randomvariable, I had the wrong email set in my config. If @sedefsavas wants to take it forward. I will close this PR.

main.go Outdated
setupLog.Error(err, "unable to create ready check")
os.Exit(1)
}

if err := mgr.AddHealthzCheck("ping", healthz.Ping); err != nil {
if err := mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if err := mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
if err := mgr.AddHealthzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbueringer Thanks for the review. But unfortunately closing it as @sedefsavas was already working on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbueringer Updated the suggested change. Please take a look. Thanks in advance.

Copy link
Member

Choose a reason for hiding this comment

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

@geetikabatra Looks good thx. I think you have to change your commit message: #2685 (comment) (and drop the link to the issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@randomvariable
Copy link
Member

@geetikabatra i meant @sedefsavas to look at the PR as we did previously have this and took it out and I wasn't directly involved in that decision.

@geetikabatra
Copy link
Contributor Author

@randomvariable ohh okay! I will fix it as per @sbueringer 's comments.

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 20, 2021
@sedefsavas
Copy link
Contributor

@geetikabatra We should do the same for EKS. See: #2603

@geetikabatra
Copy link
Contributor Author

geetikabatra commented Aug 23, 2021

@sedefsavas EKS has been moved out of the experimental feature. So, the change in EKS is not necessary now, I think.
I didn't see any other instance of ping being used anywhere else in the repository. I think we are good to go here. WDYT?

@sedefsavas
Copy link
Contributor

@sedefsavas EKS has been moved out of the experimental feature. So, the change in EKS is not necessary now, I think.
I didn't see any other instance of ping being used anywhere else in the repository. I think we are good to go here. WDYT?

Right! Forgot about it.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 23, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 23, 2021
@randomvariable
Copy link
Member

@geetikabatra
Please remove

Fixes: #2602

Release note:

from the commit message. In general, Prow will fail commit messages that do Fixes # etc...

In addition, please review the errors:

./main.go:39:2: imported and not used: "sigs.k8s.io/controller-runtime/pkg/healthz"

This change adds a ready and health check on the webhook server.

Signed-off-by: Geetika Batra geetika.b@vmware.com
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Aug 24, 2021
@geetikabatra
Copy link
Contributor Author

Done!

@sbueringer
Copy link
Member

Thx!
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 24, 2021
@randomvariable
Copy link
Member

/area cleanup
/approve

@k8s-ci-robot
Copy link
Contributor

@randomvariable: The label(s) area/cleanup cannot be applied, because the repository doesn't have them.

In response to this:

/area cleanup
/approve

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

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 Aug 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit a4f7010 into kubernetes-sigs:main Aug 25, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.7.0 milestone Aug 25, 2021
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-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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants