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 ready check for cert-controller #2359

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

forsaken628
Copy link
Contributor

What this PR does / why we need it:
#2357 (comment)

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 #

Checklist:

  • Docs included if any changes are user facing

Signed-off-by: forsaken628 <forsaken628@gmail.com>
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you for adding this and sorry for the late review @forsaken628!
/assign @tenzen-y


// The setupControllers will register controllers to the manager
// after generated certs for the admission webhooks.
go setupControllers(mgr, certsReady, hookServer)

if initConfig.CertGeneratorConfig.Enable {
err := mgr.AddReadyzCheck("cert", func(_ *http.Request) error {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@forsaken628 @tenzen-y Just for user visibility, maybe we should explicitly call out them in the controller Deployment ? It might be hard for user to check code to understand all probs.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the late reply, @forsaken628 what do you think about above comment ? Do we want to make that change and merge this PR ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the vast majority of case users only care about aggregation probes. We could add a comment somewhere.

Copy link
Member

Choose a reason for hiding this comment

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

I just want to keep it consistent between Training Operator: https://github.com/kubeflow/training-operator/blob/master/manifests/base/deployment.yaml#L53 and Katib controller.

Copy link
Member

Choose a reason for hiding this comment

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

@tenzen-y Any thoughts ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need to modify deployment.yaml. The individual check is not a new feature for controller-runtime, and usually users don't need to know it exists.

cmd/katib-controller/v1beta1/main.go Outdated Show resolved Hide resolved
cmd/katib-controller/v1beta1/main.go Outdated Show resolved Hide resolved
Signed-off-by: forsaken628 <forsaken628@gmail.com>
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from tenzen-y. For more information see the Kubernetes Code Review Process.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants