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 healthz check to agent #903

Closed

Conversation

learner0810
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 2, 2021
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rainbowmango after the PR has been reviewed.
You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

The full list of commands accepted by this bot can be found 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

Signed-off-by: zhongjun.li <zhongjun.li@daocloud.io>
@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 2, 2021
@learner0810
Copy link
Member Author

/retest

@karmada-bot
Copy link
Collaborator

@learner0810: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@RainbowMango
Copy link
Member

Sorry, I missed this PR. Please cc me to trigger the test or by another push.

@RainbowMango
Copy link
Member

Hi @learner0810
Can you also add the helthz to https://github.com/karmada-io/karmada/blob/master/artifacts/agent/karmada-agent.yaml, so it could be covered by our test?

@learner0810
Copy link
Member Author

Hi @learner0810 Can you also add the helthz to https://github.com/karmada-io/karmada/blob/master/artifacts/agent/karmada-agent.yaml, so it could be covered by our test?

My pr is to solve this problem kubernetes-sigs/controller-runtime#297.

If the agent needs to add a health check, then it needs to bind a port. does karmada have a port plan?

https://github.com/kubernetes-sigs/controller-runtime/blob/4d10a0615b11507451ecb58bfd59f0f6ef313a29/pkg/manager/manager.go#L362

@RainbowMango
Copy link
Member

I wonder how to use the HealthzCheck? If we didn't make use of it, then how to know if it works?

@learner0810
Copy link
Member Author

I wonder how to use the HealthzCheck? If we didn't make use of it, then how to know if it works?

There is no way to confirm, if the agent pod does not add HealthzCheck, then this pr is not necessary and I will close this pr

@RainbowMango
Copy link
Member

I haven't looked into the code.

controllerManager.AddHealthzCheck("ping", healthz.Ping)

What's this used for? What's the benefit? Can you give a simple description?

@RainbowMango
Copy link
Member

@Garrybest Do you think this is needed for karmada-agent?

@Garrybest
Copy link
Member

I suppose this check is duplicated, see

// ...default a check if none is present...
if len(h.Checks) == 0 {
parts = append(parts, checkStatus{name: "ping", healthy: true})
}

@RainbowMango
Copy link
Member

I suppose this check is duplicated, see

Good to know. Yeah, I agree. So, let's close it. @learner0810 Thanks for doing this all the same.

/close

@karmada-bot
Copy link
Collaborator

@RainbowMango: Closed this PR.

In response to this:

I suppose this check is duplicated, see

Good to know. Yeah, I agree. So, let's close it. @learner0810 Thanks for doing this all the same.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. 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.

None yet

4 participants