Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

enable workqueue metrics for all controllers #1371

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

mars1024
Copy link
Contributor

@mars1024 mars1024 commented Mar 8, 2021

Signed-off-by: Bruce Ma [email protected]

What this PR does / why we need it:
This PR will help to enable workqueue metrics for all controllers.
Client-go has implemented a built-in metrics, but it will be disabled when created workqueue is nameless https://github.com/kubernetes/client-go/blob/fa8f4cc307b81b125f6beb2cea6f093ed9e3c069/util/workqueue/metrics.go#L231 .
So this pr is trying to assign a unique name for each controller(workqueue), and this name is usually the lowercase singular kind which is being reconciled by this controller.

Special notes for your reviewer:
NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 8, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 8, 2021
Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

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

lgtm, good catch!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2021
@hectorj2f
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hectorj2f, mars1024

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

@hectorj2f
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2021
@k8s-ci-robot k8s-ci-robot merged commit 16b2f5c into kubernetes-retired:master Mar 10, 2021
@tehlers320
Copy link
Contributor

This still doesnt expose worker queue. They are using a noop provider and not prometheus.

@tehlers320
Copy link
Contributor

tehlers320 commented Mar 12, 2021

I figured this out. There is some ordering issue going on where the do-once here https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go#L217-L227 is preventing the worker queues from showing up. I dont know how you fix this.

#1372

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 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.

4 participants