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

🌱 improves the existing capi metrics #7886

Conversation

bavarianbidi
Copy link
Contributor

@bavarianbidi bavarianbidi commented Jan 10, 2023

What this PR does / why we need it:

This PR is intentionally split into three commits to make the review more easier for now:

  1. add control plane and infra ref labels to cluster
    add the following labels from the cluster cr spec to the cluster_info
    metric:

    • control_plane_reference_kind
    • control_plane_reference_name
    • infrastructure_reference_kind
    • infrastructure_reference_name
  2. introduce new capi_machine_addresses metric
    to represent the different kind of addresses in an own metric.

    containerRuntimeVersion label got also renamed to
    container_runtime_version

  3. add initial capi_machinepool metrics

Regarding 2.
With the discussion in this slack thread in #kube-state-metrics i will change the metric implementation again.

Signed-off-by: Mario Constanti mario@constanti.de

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 #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 10, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 10, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @bavarianbidi. Thanks for your PR.

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

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/test-infra repository.

@chrischdi
Copy link
Member

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 10, 2023
@bavarianbidi bavarianbidi force-pushed the improve_custom_resource_metrics_configuration branch from 59cd2e6 to 1aefe55 Compare January 11, 2023 06:25
@bavarianbidi bavarianbidi requested review from chrischdi and removed request for vincepri and JoelSpeed January 11, 2023 06:25
@bavarianbidi bavarianbidi force-pushed the improve_custom_resource_metrics_configuration branch from 1aefe55 to 67e9cb3 Compare January 11, 2023 06:33
- status
- phase
type: StateSet
- name: created
Copy link
Member

@chrischdi chrischdi Jan 11, 2023

Choose a reason for hiding this comment

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

wrong indent beginning here (or above)?! or tabs vs spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"wrong" is relative ;-)

i use the YAML plugin in vscode which auto-format the yaml file. but anyhow - i fixed the format to allign with the existing generated yamls.

Copy link
Member

Choose a reason for hiding this comment

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

uh, then the others may be wrong :-) happy to get it auto-formatted but also okay to keep as is :-)

Sad that there is not the only formatter for yaml, like there is gofmt for go 😂

@fabriziopandini
Copy link
Member

@bavarianbidi thanks for this PR!
lgtm pending addressing @chrischdi comments.

Also, @bavarianbidi it will be great to have your opinion on #7158 which will hopefully replace these manually maintained files soon.

@chrischdi
Copy link
Member

/ok-to-test
/test pull-cluster-api-test-main

(potential flake?)

/lgtm but pending squash

* add control_plane and infrastructure reference information as label to
  cluster_info
* introduce new capi_machine_addresses metric
* rename containerRuntimeVersion label from cluster_machine_info to container_runtime_version
* gen. changes due machine addresses comment update
* add initial capi_machinepool metrics

Signed-off-by: Mario Constanti <mario@constanti.de>
@sbueringer
Copy link
Member

Thank you very much!!

Very nice to see contributions in this area :)

/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 Jan 13, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b3061e4cb6a854a3fc18eaa9257ce3f6c852ceec

@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 Jan 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit 48f268a into kubernetes-sigs:main Jan 13, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.4 milestone Jan 13, 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. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants