feat: add health checks for opendatahub.io DataScienceCluster and DSCInitialization (#26543)#27158
Open
officialasishkumar wants to merge 4 commits intoargoproj:masterfrom
Open
Conversation
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds built-in Lua health checks for two opendatahub.io CRDs so Argo CD reports more accurate health based on .status.phase (e.g., Progressing vs Degraded vs Healthy).
Changes:
- Add
health.luacustomizations forDataScienceClusterandDSCInitializationthat mapphase=Ready→ Healthy,phase=Error→ Degraded (witherrorMessage), otherwise → Progressing. - Add health-check test suites (
health_test.yaml) for both kinds. - Add representative test fixtures for ready, progressing, not-ready, degraded, and missing-status scenarios.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/health.lua | Implements DSCInitialization health mapping from .status.phase (+ error message on Error). |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/health_test.yaml | Adds health check test cases for DSCInitialization. |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/testdata/healthy.yaml | Fixture: Ready/healthy DSCInitialization. |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/testdata/progressing.yaml | Fixture: Progressing DSCInitialization. |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/testdata/progressing_not_ready.yaml | Fixture: Not Ready DSCInitialization (expected Progressing). |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/testdata/degraded.yaml | Fixture: Error/degraded DSCInitialization (with errorMessage). |
| resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/testdata/no_status.yaml | Fixture: Missing status DSCInitialization (expected Progressing). |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/health.lua | Implements DataScienceCluster health mapping from .status.phase (+ error message on Error). |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/health_test.yaml | Adds health check test cases for DataScienceCluster. |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/testdata/healthy.yaml | Fixture: Ready/healthy DataScienceCluster. |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/testdata/progressing.yaml | Fixture: Progressing DataScienceCluster. |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/testdata/progressing_not_ready.yaml | Fixture: Not Ready DataScienceCluster (expected Progressing). |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/testdata/degraded.yaml | Fixture: Error/degraded DataScienceCluster (with errorMessage). |
| resource_customizations/datasciencecluster.opendatahub.io/DataScienceCluster/testdata/no_status.yaml | Fixture: Missing status DataScienceCluster (expected Progressing). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #27158 +/- ##
==========================================
- Coverage 63.37% 63.35% -0.02%
==========================================
Files 415 415
Lines 56555 56555
==========================================
- Hits 35839 35830 -9
- Misses 17338 17347 +9
Partials 3378 3378 ☔ View full report in Codecov by Sentry. |
crenshaw-dev
reviewed
Apr 7, 2026
resource_customizations/dscinitialization.opendatahub.io/DSCInitialization/health.lua
Show resolved
Hide resolved
…Initialization Add built-in Lua health checks for the DataScienceCluster and DSCInitialization CRDs from the opendatahub.io API group. These CRDs are used by OpenShift AI to manage platform lifecycle, and without native health checks Argo CD cannot accurately report their readiness. The health mapping is based on the .status.phase field: - "Ready" maps to Healthy - "Error" maps to Degraded (with errorMessage when available) - Any other phase or missing status maps to Progressing Closes argoproj#26543 Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
3f604ab to
cd9d7f6
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
cd9d7f6 to
85114ae
Compare
Add a Progressing state when the observed generation does not match the metadata generation, consistent with the DataScienceCluster health check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist:
Summary
Adds built-in Lua health checks for two CRDs from the
opendatahub.ioAPI group:datasciencecluster.opendatahub.io/DataScienceClusterdscinitialization.opendatahub.io/DSCInitializationThese CRDs are used by OpenShift AI (Red Hat's managed ML platform) to manage platform lifecycle. Without native health checks, Argo CD reports these resources as
Healthyeven when they are still reconciling or in an error state.Health Mapping
Both CRDs expose a
.status.phasefield. The mapping is:.status.phaseReadyErrorWhen phase is
Error, theerrorMessagefield from.statusis used as the health message when available, giving operators immediate visibility into the failure reason.Validation
Ready,Not Ready,Progressing,Error) verified against the opendatahub-operator source.Closes #26543