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

optimize: add probe for cluster status #346

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

wy-lucky
Copy link
Collaborator

The cluster status may become abnormal due to a single network jitter. If this occurs while the application is in the scheduling state, it may lead to the application not being dispatched to that cluster. Therefore, we have optimized this by adding a detection mechanism for the cluster status to prevent unexpected scheduling results caused by a single network jitter.

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.

Project coverage is 33.55%. Comparing base (6bbe8ab) to head (ee09ca5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ntrollers/federatedcluster/cluster_status_cache.go 0.00% 45 Missing ⚠️
pkg/controllers/federatedcluster/clusterstatus.go 0.00% 4 Missing ⚠️
pkg/controllers/federatedcluster/controller.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
- Coverage   33.63%   33.55%   -0.08%     
==========================================
  Files         156      157       +1     
  Lines       18052    18104      +52     
==========================================
+ Hits         6071     6075       +4     
- Misses      11460    11507      +47     
- Partials      521      522       +1     
Flag Coverage Δ
unittests 33.55% <0.00%> (-0.08%) ⬇️

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.

@wy-lucky wy-lucky force-pushed the main branch 2 times, most recently from 085683e to 25814d7 Compare December 16, 2024 07:42
probeTimestamp: now,
}
}
c.update(cluster.Name, saved)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to update when saved.status == observed.Status?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's only needed when saved.status == observed.Status.The code has been updated.

@mrlihanbo mrlihanbo merged commit 92754f8 into kubewharf:main Dec 17, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants