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

Automated cherry pick of #5972: fix the issue of missing workqueue metrics in the Karmada controller #5980

Conversation

XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang commented Dec 26, 2024

Cherry pick of #5972 on release-1.12.
#5972: remove apiserver dependency in resourceinterpreter
For details on the cherry pick process, see the cherry pick requests page.

`karmada-controller-manager`: Fixed the issue of missing work queue metrics.

Signed-off-by: changzhen <changzhen5@huawei.com>
@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 26, 2024
@XiShanYongYe-Chang XiShanYongYe-Chang changed the title Automated cherry pick of #5972: remove apiserver dependency in resourceinterpreter Automated cherry pick of #5972: fix the issue of missing workqueue metrics in the Karmada controlle Dec 26, 2024
@XiShanYongYe-Chang XiShanYongYe-Chang changed the title Automated cherry pick of #5972: fix the issue of missing workqueue metrics in the Karmada controlle Automated cherry pick of #5972: fix the issue of missing workqueue metrics in the Karmada controller Dec 26, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 65.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 46.51%. Comparing base (92f5bde) to head (04799b1).

Files with missing lines Patch % Lines
...interpreter/customized/webhook/serviceresolvers.go 66.66% 13 Missing ⚠️
...sourceinterpreter/customized/webhook/customized.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-1.12    #5980   +/-   ##
=============================================
  Coverage         46.50%   46.51%           
=============================================
  Files               663      664    +1     
  Lines             54748    54787   +39     
=============================================
+ Hits              25463    25484   +21     
- Misses            27658    27676   +18     
  Partials           1627     1627           
Flag Coverage Δ
unittests 46.51% <65.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@XiShanYongYe-Chang
Copy link
Member Author

test metrics in the karmada-controller-manager pod:

# curl http://127.0.0.1:8080/metrics | grep workqueue_depth
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0# HELP workqueue_depth Current depth of workqueue
# TYPE workqueue_depth gauge
workqueue_depth{controller="agent-csr-approving-controller",name="agent-csr-approving-controller"} 0
workqueue_depth{controller="binding-controller",name="binding-controller"} 0
workqueue_depth{controller="binding-eviction",name="binding-eviction"} 0
workqueue_depth{controller="cluster-binding-eviction",name="cluster-binding-eviction"} 0
workqueue_depth{controller="cluster-controller",name="cluster-controller"} 0
workqueue_depth{controller="cluster-resource-binding-application-failover-controller",name="cluster-resource-binding-application-failover-controller"} 0
workqueue_depth{controller="cluster-resource-binding-controller",name="cluster-resource-binding-controller"} 0
workqueue_depth{controller="cluster-resource-binding-graceful-eviction-controller",name="cluster-resource-binding-graceful-eviction-controller"} 0
workqueue_depth{controller="cluster-resource-binding-status-controller",name="cluster-resource-binding-status-controller"} 0
workqueue_depth{controller="cluster-status-controller",name="cluster-status-controller"} 0
workqueue_depth{controller="clusterPropagationPolicy reconciler",name="clusterPropagationPolicy reconciler"} 0
workqueue_depth{controller="cronfederatedhpa-controller",name="cronfederatedhpa-controller"} 0
workqueue_depth{controller="dependencies resource detector",name="dependencies resource detector"} 0
workqueue_depth{controller="dependencies-distributor",name="dependencies-distributor"} 0
workqueue_depth{controller="deployment-replicas-syncer",name="deployment-replicas-syncer"} 0
workqueue_depth{controller="endpointslice-collect",name="endpointslice-collect"} 0
workqueue_depth{controller="endpointslice-collect-controller",name="endpointslice-collect-controller"} 0
workqueue_depth{controller="endpointslice-controller",name="endpointslice-controller"} 0
workqueue_depth{controller="endpointslice-dispatch-controller",name="endpointslice-dispatch-controller"} 0
workqueue_depth{controller="execution-controller",name="execution-controller"} 0
workqueue_depth{controller="federated-resource-quota-status-controller",name="federated-resource-quota-status-controller"} 0
workqueue_depth{controller="federated-resource-quota-sync-controller",name="federated-resource-quota-sync-controller"} 0
workqueue_depth{controller="federatedHPA-controller",name="federatedHPA-controller"} 0
workqueue_depth{controller="hpa-scale-target-marker",name="hpa-scale-target-marker"} 0
workqueue_depth{controller="multiclusterservice-controller",name="multiclusterservice-controller"} 0
workqueue_depth{controller="namespace-sync-controller",name="namespace-sync-controller"} 0
workqueue_depth{controller="propagationPolicy reconciler",name="propagationPolicy reconciler"} 0
workqueue_depth{controller="remedy-controller",name="remedy-controller"} 0
workqueue_depth{controller="resource detector",name="resource detector"} 0
workqueue_depth{controller="resource-binding-application-failover-controller",name="resource-binding-application-failover-controller"} 0
workqueue_depth{controller="resource-binding-graceful-eviction-controller",name="resource-binding-graceful-eviction-controller"} 0
workqueue_depth{controller="resource-binding-status-controller",name="resource-binding-status-controller"} 0
workqueue_depth{controller="scale target worker",name="scale target worker"} 0
workqueue_depth{controller="service-export",name="service-export"} 0
workqueue_depth{controller="service-export-controller",name="service-export-controller"} 0
workqueue_depth{controller="service-import-controller",name="service-import-controller"} 0
workqueue_depth{controller="taint-manager",name="taint-manager"} 0
workqueue_depth{controller="unified-auth-controller",name="unified-auth-controller"} 0
workqueue_depth{controller="work-status",name="work-status"} 0
workqueue_depth{controller="work-status-controller",name="work-status-controller"} 0
workqueue_depth{controller="workload-rebalancer",name="workload-rebalancer"} 0
100  260k    0  260k    0     0  4868k      0 --:--:-- --:--:-- --:--:-- 4914k

@RainbowMango
Copy link
Member

How about the karmada-agent?

@XiShanYongYe-Chang
Copy link
Member Author

Curl metrics in the karmada-agent pod:

# curl http://127.0.0.1:8080/metrics | grep workqueue_depth
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18842    0 18842    0     0  9735k      0 --:--:-- --:--:-- --# HELP workqueue_depth Current depth of workqueue
:# TYPE workqueue_depth gauge
workqueue_depth{controller="endpointslice-collect",name="endpointslice-collect"} 0
workqueue_depth{controller="service-export",name="service-export"} 0
workqueue_depth{controller="work-status",name="work-status"} 0

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 26, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 26, 2024
@karmada-bot karmada-bot merged commit 42fafd7 into karmada-io:release-1.12 Dec 26, 2024
18 checks passed
@XiShanYongYe-Chang XiShanYongYe-Chang deleted the automated-cherry-pick-of-#5972-upstream-release-1.12 branch December 27, 2024 01:28
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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants