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

🌱 hack/observability: add capi_machine_status_certificatesexpirydate metric #9084

Merged

Conversation

chrischdi
Copy link
Member

What this PR does / why we need it:

Adds a gauge metric to our kube-state-metrics configuration for exposing a machines .status.certificatesExpiryDate.

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 #9019

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 27, 2023
@chrischdi chrischdi changed the title hack/observability: add capi_machine_status_certificatesexpirydate metric 🌱 hack/observability: add capi_machine_status_certificatesexpirydate metric Jul 27, 2023
@@ -87,6 +87,14 @@
address:
- address
type: Info
- name: status_certificatesexpirydate
help: Information about the node reference of a machine.
Copy link
Member

@sbueringer sbueringer Aug 3, 2023

Choose a reason for hiding this comment

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

the help text sounds a bit wrong

@sbueringer
Copy link
Member

Let me know if I should take another look / it works :D

@chrischdi
Copy link
Member Author

Jep, should work now:

# HELP capi_machine_status_certificatesexpirydate Information about certificate exporation date of a control plane node.
# TYPE capi_machine_status_certificatesexpirydate gauge
capi_machine_status_certificatesexpirydate{cluster_name="development-4779",customresource_group="cluster.x-k8s.io",customresource_kind="Machine",customresource_version="v1beta1",name="development-4779-65zw4-pw7qp",namespace="default",uid="3a3065d9-30fd-4b04-ad21-9c76cf1b8932"} 1.722674676e+09

@sbueringer
Copy link
Member

Thx! one nit

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: be07ed50dfef1f75fe441fad00e6da8fa21206c0

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit 50ecbae into kubernetes-sigs:main Aug 7, 2023
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Aug 7, 2023
@g-gaston
Copy link
Contributor

/area metrics

@k8s-ci-robot k8s-ci-robot added the area/metrics Issues or PRs related to metrics label Oct 23, 2023
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/metrics Issues or PRs related to metrics 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend kube-state-metrics configuration to expose a metrics for certificate expiry
4 participants