[addon-operator] drop hooks and standalone CRDs from nelm render output - #815
Merged
Conversation
- `Render` keeps only `StoreAs == regular` resources, same as helm3 `rs.Manifest`. - The absent-resources monitor no longer waits for hook objects that never exist in the cluster. - Fixes false `AbsentHelmResourcesDetected` firing every ~5 minutes and forcing endless release upgrades. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- `fakeNelmActions` feeds canned `ChartRender` results, no cluster needed. - Checks that hooks and standalone CRDs stay out of `Render` output. - Two regular resources keep a single `---` separator after filtering. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Merged
4 tasks
Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Glitchy-Sheep
marked this pull request as ready for review
August 3, 2026 13:02
ldmonster
approved these changes
Aug 3, 2026
This was referenced Aug 3, 2026
4 tasks
4 tasks
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.
Overview
Fixes the false
AbsentHelmResourcesDetectedloop:NelmClient.Rendernow returns only regular release resources, same as helm3rs.Manifest.What this PR does / why we need it
Problem
Renderoutput feeds two consumers: the release checksum (moduleChecksum) and the absent-resources monitor.rs.Manifest- regular resources only. The nelm client returns every object fromchartRenderResult.Resources, including helm hooks and standalone CRDs.pre-deletehook Job exists in the cluster only while the release is being deleted. The monitor saw it "missing" on every tick and firedAbsentHelmResourcesDetected.shouldRunHelmUpgraderuns the absent check on the same list, so every such ModuleRun forced a real upgrade.Fix
NelmClient.Renderkeeps only resources withStoreAs == regular.StoreAs == hook) and standalone CRDs (StoreAs == none) stay out of the checksum and the monitor list.Before / After
Before: a chart with a
pre-deletehook loops forever: absent event -> forced upgrade -> new revision every ~5 minutes.After: the monitor tracks only objects that must exist in the cluster; with unchanged values and manifests there are no events, no upgrades, no new revisions.
Special notes for your reviewer
Tests
Test_NelmClient_Render_KeepsOnlyRegularResources- hooks and standalone CRDs stay out ofRenderoutput; two regular resources keep a single---separator. The test fails without the filter (verified).Rollout notes
moduleChecksumno longer covers hook manifests.deckhouse-controller module renderno longer prints hooks and standalone CRDs - same as it was with helm3.internal/nelm/client.go) has the same unfiltered loop - separate issue.