Skip to content

Add statusz endpoint for kube-controller-manager#128991

Merged
k8s-ci-robot merged 2 commits intokubernetes:masterfrom
Henrywu573:cm-statuz
Feb 5, 2025
Merged

Add statusz endpoint for kube-controller-manager#128991
k8s-ci-robot merged 2 commits intokubernetes:masterfrom
Henrywu573:cm-statuz

Conversation

@Henrywu573
Copy link
Copy Markdown
Contributor

@Henrywu573 Henrywu573 commented Nov 27, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Added a /statusz endpoint to kube-controller-manager

Which issue(s) this PR fixes:

Fixes #128750 and kubernetes/enhancements#4828

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Added a `/statusz` endpoint for kube-controller-manager

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP] : https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/4828-component-flagz/README.md

Example request:
root@kind-control-plane:/etc/kubernetes/manifests# curl -k --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt --key /etc/kubernetes/pki/apiserver-kubelet-client.key https://localhost:10257/statusz 
Example response
controller-manager statusz
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.

Started:  Wed Nov 27 22:09:26 UTC 2024
Up:  0 hr 01 min 50 sec
Go version:  go1.23.3
Binary version:  1.32.0-beta.0.529+ee503d2e89a129-dirty
Emulation version:  1.32.0-beta.0.529

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 27, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Please note that we're already in Test Freeze for the release-1.32 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.32.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Nov 26 22:37:32 UTC 2024.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 27, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @Henrywu573. Thanks for your PR.

I'm waiting for a kubernetes 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.

Details

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-sigs/prow 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 27, 2024
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 27, 2024
@Henrywu573
Copy link
Copy Markdown
Contributor Author

/sig instrumentation
cc @richabanker

@k8s-ci-robot k8s-ci-robot added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Nov 27, 2024
@Henrywu573
Copy link
Copy Markdown
Contributor Author

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Nov 27, 2024
Comment thread staging/src/k8s.io/controller-manager/app/serve.go Outdated
@richabanker
Copy link
Copy Markdown
Contributor

/triage accepted
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 28, 2024
@Henrywu573
Copy link
Copy Markdown
Contributor Author

/retest-required

configz.InstallHandler(mux)
mux.Handle("/metrics", legacyregistry.Handler())
if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) {
statusz.Install(mux, "controller-manager", statusz.NewRegistry())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: "kube-controller-manager" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@richabanker
Copy link
Copy Markdown
Contributor

/lgtm
Would be great of we could have some tests for this too.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 5, 2024

cmd := &cobra.Command{
Use: "kube-controller-manager",
Use: kubeControllerManager,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be better to display the string explicitly here to demonstrate the command usage.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@Henrywu573: GitHub didn't allow me to assign the following users: for, testing, directory, approval.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @aojea for testing directory approval

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-sigs/prow repository.

@Henrywu573
Copy link
Copy Markdown
Contributor Author

add @aojea or @liggitt since for testing directory approval since andrewsykim@ no longer does Kubernetes reviews anymore

@Henrywu573
Copy link
Copy Markdown
Contributor Author

/assign @liggitt

@sftim
Copy link
Copy Markdown
Contributor

sftim commented Dec 10, 2024

/release-note-edit

Added a `/statusz` endpoint for kube-controller-manager

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@sftim: /release-note-edit must be used with a release note block.

Details

In response to this:

/release-note-edit

Added a `/statusz` endpoint for kube-controller-manager

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-sigs/prow repository.

@sftim
Copy link
Copy Markdown
Contributor

sftim commented Dec 10, 2024

/release-note-edit

Added a `/statusz` endpoint for kube-controller-manager

@richabanker
Copy link
Copy Markdown
Contributor

/retest

@richabanker
Copy link
Copy Markdown
Contributor

/ok-to-test

Comment thread test/integration/serving/serving_test.go Outdated
Comment thread test/integration/serving/serving_test.go Outdated
@Henrywu573
Copy link
Copy Markdown
Contributor Author

/retest-required

@aojea
Copy link
Copy Markdown
Member

aojea commented Feb 5, 2025

/lgtm
/approve

Thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: f6e9887106ec23c3470bdb28b406c7883501f8b1

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, Henrywu573, jpbetz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Feb 5, 2025
@k8s-ci-robot k8s-ci-robot merged commit 22f25ef into kubernetes:master Feb 5, 2025
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 5, 2025
@Henrywu573 Henrywu573 deleted the cm-statuz branch February 5, 2025 23:55
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. area/cloudprovider area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. 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. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add statusz endpoint for kube-controller-manager

9 participants