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

✨ (go/v3-alpha) Add the liveness and readiness probe in the manager deployment #1856

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

prafull01
Copy link
Contributor

@prafull01 prafull01 commented Nov 21, 2020

Description
Cherry-pick of #1795

Motivation
Re-introduce the change to close the #1761
Note that it was reverted because the CI was not doing tthe e2e tests with the v3-alpha plugin which is done now.

Fixes: #1761

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 21, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 21, 2020
@prafull01
Copy link
Contributor Author

/cc @estroz

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Just a a few nits

Otherwise:

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2020
@prafull01 prafull01 changed the title ✨ Add the liveness and readiness probe in the manager deployment ✨ (go/v3-alpha) Add the liveness and readiness probe in the manager deployment Nov 22, 2020
Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

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

In addition to the suggested changes, there also needs to be an addition to the manager config:

apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
+health:
+  healthProbeBindAddress: :8081
metrics:
  bindAddress: 127.0.0.1:8080
webhook:
  port: 9443
leaderElection:
  leaderElect: true
  resourceName: {{ hashFNV .Repo }}.{{ .Domain }}

@estroz
Copy link
Contributor

estroz commented Dec 1, 2020

/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 Dec 1, 2020
@prafull01 prafull01 requested a review from estroz December 2, 2020 20:38
@prafull01
Copy link
Contributor Author

Addressed all the comments. @estroz @camilamacedo86

Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

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

Since these are on by default, can you add an e2e test component for both /healthz and /readyz? Pinging these endpoints for 200 codes using the curl pod should be sufficient (preferably in their own test functions, ex. func TestHealthz(), that can be called from the main Describe() block.

@camilamacedo86
Copy link
Member

camilamacedo86 commented Dec 4, 2020

Since these are on by default, can you add an e2e test component for both /healthz and /readyz? Pinging these endpoints for 200 codes using the curl pod should be sufficient (preferably in their own test functions, ex. func TestHealthz(), that can be called from the main Describe() block.

I am fine with add the test but it shows redundant since these endpoints are added as probes in the manager (https://github.com/kubernetes-sigs/kubebuilder/pull/1856/files#diff-bc87394b1d397b640fbef5f4b6e769a5d86df1048978b080a0e274749ed3ed4cR86-R92) they are called by the k8s api which means that the pod would not deploy successfully with they did not work. Please let me know if I am missing something.

c/c @estroz @prafull01

@estroz
Copy link
Contributor

estroz commented Dec 4, 2020

@camilamacedo86 ah yeah duh. @prafull01 you can revert your e2e changes, apologies.

@prafull01
Copy link
Contributor Author

@estroz Reverted my e2e changes.

@camilamacedo86 Good catcher 👍

Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, estroz, prafull01

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:
  • OWNERS [camilamacedo86,estroz]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@prafull01
Copy link
Contributor Author

prafull01 commented Dec 4, 2020

@estroz Need to unhold PR, for this to get merged.

@estroz
Copy link
Contributor

estroz commented Dec 4, 2020

/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 Dec 4, 2020
@k8s-ci-robot k8s-ci-robot merged commit 6b775b8 into kubernetes-sigs:master Dec 4, 2020
@prafull01 prafull01 deleted the liveness branch December 4, 2020 18:31
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. 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.

liveness/readiness probe scaffolded by default
4 participants