feat: add explicit uninstall to support uninstalls that require the config information#200
Open
ayuskauskas wants to merge 7 commits intomainfrom
Open
feat: add explicit uninstall to support uninstalls that require the config information#200ayuskauskas wants to merge 7 commits intomainfrom
ayuskauskas wants to merge 7 commits intomainfrom
Conversation
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>
4c39a6d to
d2dfe07
Compare
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>
Coverage Report for CI Build 24735743343Warning No base build found for commit Coverage: 81.395%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
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.
Description
Closes: https://github.com/NVIDIA/nodewright/issues/186Closes: #186
Checklist
git commit -s) per the DCO.