Skip to content

feat(health): add health check for Longhorn Volume#28662

Open
yugstar wants to merge 1 commit into
argoproj:masterfrom
yugstar:feat-longhorn-volume-health
Open

feat(health): add health check for Longhorn Volume#28662
yugstar wants to merge 1 commit into
argoproj:masterfrom
yugstar:feat-longhorn-volume-health

Conversation

@yugstar

@yugstar yugstar commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

Adds a health check for the longhorn.io/Volume CRD, which had no health check.

Behavior

Maps status.state + status.robustness:

  • Degradedrobustness: faulted (data unavailable).
  • Progressingattached + robustness: degraded (rebuilding replicas), or a transitional state (creating/attaching/detaching/deleting).
  • Healthyattached + robustness: healthy, or cleanly detached (idle).

Values verified against the Longhorn v1beta2 API (VolumeRobustness healthy/degraded/faulted/unknown; VolumeState creating/attached/detached/attaching/detaching/deleting).

Tests

attached_healthy / detached / degraded / faulted / attaching fixtures; TestLuaHealthScript passes.

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>
@yugstar
yugstar requested a review from a team as a code owner July 9, 2026 20:35
@bunnyshell

bunnyshell Bot commented Jul 9, 2026

Copy link
Copy Markdown

❗ Preview Environment stop on Bunnyshell failed

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop again the environment
  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.22%. Comparing base (0b9298c) to head (a2acfe8).
⚠️ Report is 79 commits behind head on master.

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     
Flag Coverage Δ
e2e 26.77% <ø> (+0.01%) ⬆️
unit-tests 60.60% <ø> (+0.14%) ⬆️

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

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

@reggie-k reggie-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

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.

2 participants