Skip to content

feat: add explicit uninstall to support uninstalls that require the config information#200

Open
ayuskauskas wants to merge 7 commits intomainfrom
feat/uninstall-enhancement-collapsed
Open

feat: add explicit uninstall to support uninstalls that require the config information#200
ayuskauskas wants to merge 7 commits intomainfrom
feat/uninstall-enhancement-collapsed

Conversation

@ayuskauskas
Copy link
Copy Markdown
Collaborator

Description

Closes: https://github.com/NVIDIA/nodewright/issues/186Closes: #186

Checklist

  • I am familiar with the Contributing Guidelines.
  • My commits are signed off (git commit -s) per the DCO.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

ayuskauskas and others added 2 commits April 20, 2026 16:38
Adds an opt-in declarative uninstall workflow to the Skyhook CRD and
operator, replacing the prior "remove-from-spec-to-uninstall" behavior.

Packages expose a new `uninstall` block with `enabled` and `apply`
flags. Setting `apply=true` triggers an uninstall pod on every target
node with the package's full config. Packages with an `interrupt`
configured (reboot, service restart, etc.) run the interrupt after
uninstall via a new `StageUninstallInterrupt` stage, distinct from
the install-cycle `StageInterrupt`.

The webhook enforces: `apply` requires `enabled`; removing an enabled
package requires prior uninstall completion; version downgrades are
rejected unless the package is already fully uninstalled.

CR deletion drives uninstall via a finalizer that waits for all nodes
to complete before cleaning up labels, annotations, and ConfigMaps.

The legacy "downgrade auto-triggers uninstall" path is removed.
Downgrades of `enabled=false` packages are allowed but preserve the
old version's node-state entry (D2 semantics: non-absent signals
"not cleanly uninstalled").

Ships with unit tests covering every new code path and chainsaw e2e
tests for the full lifecycle, cancellation, failure recovery,
finalizer cleanup, and webhook gating. Documentation in
`docs/uninstall.md`.
…shes

BeforeSuite's k8sManager used the default metrics bind address (:8080),
which conflicts with any developer-run manager (e.g. via debugger) and
causes the whole controller test suite to hang on WaitForCacheSync.
Disable the listener entirely — the tests don't exercise metrics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>
@ayuskauskas ayuskauskas force-pushed the feat/uninstall-enhancement-collapsed branch from 4c39a6d to d2dfe07 Compare April 21, 2026 00:57
ayuskauskas and others added 3 commits April 21, 2026 09:08
Under D2 semantics the operator must signal "package files are still on
the node" via non-absent node state. The previous behavior called
RemoveState when an enabled=false package was removed from spec, which
made the node state misleadingly claim the package had been cleanly
uninstalled. Now the entry is left in place and only the skyhook-level
ConfigUpdates tracking is cleared. Test and changelog updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>
…oval

Adds a third step that removes pkg-keep (no uninstall.enabled) from
spec entirely and asserts its node-state entry is preserved — covering
the D2 semantic that a non-absent state entry signals "package files
still on the node, not cleanly uninstalled." Also switches the image
references to ghcr.io/nvidia/nodewright/agentless for consistency with
the rest of the rebranded chainsaw suite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 21, 2026

Coverage Report for CI Build 24735743343

Warning

No base build found for commit 8c5214b on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 81.395%

Details

  • Patch coverage: 53 uncovered changes across 4 files (425 of 478 lines covered, 88.91%).

Uncovered Changes

File Changed Covered %
operator/internal/controller/skyhook_controller.go 310 284 91.61%
operator/api/v1alpha1/skyhook_webhook.go 59 49 83.05%
operator/api/v1alpha1/zz_generated.deepcopy.go 15 5 33.33%
operator/internal/controller/pod_controller.go 30 23 76.67%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 9003
Covered Lines: 7328
Line Coverage: 81.4%
Coverage Strength: 3.86 hits per line

💛 - Coveralls

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