feat(health): add health check for Longhorn Volume#28662
Conversation
Add a health check for longhorn.io/Volume based on status.state and status.robustness: faulted -> Degraded; attached+degraded or any transitional state -> Progressing; attached+healthy or cleanly detached -> Healthy. Includes fixtures for each case. Signed-off-by: Aman Raj <aman.yug@gmail.com>
❗ Preview Environment stop on Bunnyshell failedSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #28662 +/- ##
==========================================
+ Coverage 65.10% 65.22% +0.11%
==========================================
Files 426 426
Lines 59623 59736 +113
==========================================
+ Hits 38818 38961 +143
+ Misses 17228 17186 -42
- Partials 3577 3589 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
Thanks for the PR! Could you please provide real manifests exported from your cluster where Longhorn is installed for each of the health statuses, along with reference to Longhorn docs describing the statuses, if such docs exist?
https://argo-cd.readthedocs.io/en/latest/developer-guide/#contributing-to-argo-cd-custom-health-checks
What
Adds a health check for the
longhorn.io/VolumeCRD, which had no health check.Behavior
Maps
status.state+status.robustness:robustness: faulted(data unavailable).attached+robustness: degraded(rebuilding replicas), or a transitionalstate(creating/attaching/detaching/deleting).attached+robustness: healthy, or cleanlydetached(idle).Values verified against the Longhorn v1beta2 API (
VolumeRobustnesshealthy/degraded/faulted/unknown;VolumeStatecreating/attached/detached/attaching/detaching/deleting).Tests
attached_healthy/detached/degraded/faulted/attachingfixtures;TestLuaHealthScriptpasses.