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

kube-ovn-controller: fix workqueue metrics #3011

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Jul 4, 2023

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

Do not import k8s.io/component-base/metrics since it sets the default workqueue metrics provider.

$ go mod why k8s.io/component-base/metrics                                                                            ✔  02:33:49 PM 
# k8s.io/component-base/metrics
github.com/kubeovn/kube-ovn/cmd/controller
k8s.io/apiserver/pkg/server
k8s.io/apiserver/pkg/audit
k8s.io/component-base/metrics

WHAT

🤖 Generated by Copilot at a09280e

Refactor workqueue creation in the controller. Extract common logic to a new function newNamedRateLimitingQueue in pkg/controller/controller.go.

🤖 Generated by Copilot at a09280e

Oh, we're the brave controllers of the Kubernetes fleet
We manage all the workqueues with our code so neat
We've refactored and improved the newNamedRateLimitingQueue
So pull the line and sing along, we'll make it run like new

HOW

🤖 Generated by Copilot at a09280e

  • Add a new function newNamedRateLimitingQueue to create workqueues with custom names, rate limiters, and metrics providers (link)
  • Refactor the Run function to use newNamedRateLimitingQueue instead of workqueue.NewNamedRateLimitingQueue for creating the podQueue, subnetQueue, ipQueue, vpcQueue, serviceQueue, and endpointQueue workqueues (link)

@zhangzujian zhangzujian added bug Something isn't working need backport labels Jul 4, 2023
@zhangzujian zhangzujian removed the request for review from oilbeater July 4, 2023 11:09
@zhangzujian zhangzujian marked this pull request as draft July 4, 2023 11:09
@zhangzujian zhangzujian changed the title kube-ovn-controller: fix missing workqueue metrics kube-ovn-controller: fix workqueue metrics Jul 5, 2023
@zhangzujian zhangzujian marked this pull request as ready for review July 5, 2023 07:17
@zhangzujian zhangzujian merged commit 9304ae5 into kubeovn:master Jul 7, 2023
58 checks passed
@zhangzujian zhangzujian deleted the fix-metrics branch July 7, 2023 09:10
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants