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 `/livez` endpoint for liveness probing on the kube-apiserver #81969

Merged
merged 1 commit into from Aug 30, 2019

Conversation

@logicalhan
Copy link
Contributor

commented Aug 26, 2019

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR introduces a /livez endpoint as a liveness endpoint. This is a supplementary PR for #78458 which introduced /readyz.

Which issue(s) this PR fixes:

Fixes #81733

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Adds \livez for liveness health checking for kube-apiserver. Using the parameter `--maximum-startup-sequence-duration` will allow the liveness endpoint to defer boot-sequence failures for the specified duration period.
@k8s-ci-robot k8s-ci-robot requested review from apelisse and hzxuzhonghu Aug 26, 2019
@logicalhan logicalhan force-pushed the logicalhan:livez branch from 8b54ce3 to 3569781 Aug 27, 2019
@logicalhan logicalhan changed the title [WIP] Add Livez endpoint add \livez endpoint for liveness probing on the kube-apiserver Aug 27, 2019
@logicalhan logicalhan force-pushed the logicalhan:livez branch from 3569781 to c1b5764 Aug 27, 2019
@logicalhan logicalhan marked this pull request as ready for review Aug 27, 2019
@logicalhan

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

/assign @liggitt

@logicalhan

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

/cc @sttts

@k8s-ci-robot k8s-ci-robot requested a review from sttts Aug 27, 2019
@logicalhan logicalhan force-pushed the logicalhan:livez branch 2 times, most recently from 5d272ec to b674a78 Aug 27, 2019
@logicalhan

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

/retest

@liggitt liggitt changed the title add \livez endpoint for liveness probing on the kube-apiserver add `/livez` endpoint for liveness probing on the kube-apiserver Aug 28, 2019
@logicalhan logicalhan force-pushed the logicalhan:livez branch from 67fc579 to 5edf3d3 Aug 28, 2019
@logicalhan logicalhan force-pushed the logicalhan:livez branch 4 times, most recently from 443b7f4 to ff93dac Aug 28, 2019
@logicalhan

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

/priority important-soon

@liggitt

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

/milestone v1.16

important to resolve /healthz / /livez distinction before release

@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 29, 2019
@liggitt

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Aug 29, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, logicalhan

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

go fmt

make func private

refactor config_test

Two primary refactorings:

1. config test checkPath method is now each a distinct test
run (which makes it easier to see what is actually failing)

2. TestNewWithDelegate's root path check now parses the json output and
does a comparison against a list of expected paths (no more whitespace
and ordering issues when updating this test, yay).

go fmt

modify and simplify existing integration test for readyz/livez

simplify integration test

set default rbac policy rules for livez

rename a few functions and the entrypoint command line argument (and etcetera)

simplify interface for installing readyz and livez and make auto-register completion a bootstrapped check

untangle some of the nested functions, restructure the code
@logicalhan logicalhan force-pushed the logicalhan:livez branch from 50aab9f to aa1b2d6 Aug 29, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Aug 29, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

New changes are detected. LGTM label has been removed.

@liggitt liggitt added the lgtm label Aug 29, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7acb066 into kubernetes:master Aug 30, 2019
24 checks passed
24 checks passed
cla/linuxfoundation logicalhan authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-conformance-kind-ipv6 Job succeeded.
Details
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to rfranzke/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to rfranzke/gardener that referenced this pull request Sep 19, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
rfranzke added a commit to gardener/gardener that referenced this pull request Sep 20, 2019
We set the `--livez-grace-period` to `1m` which will default the livez
health checks to 'healthy' until the grace period elapses (even if it's
not healthy (yet)). This is in order to prevent the kubelet from
restarting the kube-apiserver due to long-ish boot sequences.

See kubernetes/kubernetes#81969
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.