fix: deletion defects and resource orphans - #17
Merged
Merged
Conversation
tuunit
requested changes
Aug 20, 2026
tuunit
requested changes
Aug 20, 2026
tuunit
requested changes
Aug 20, 2026
tuunit
requested changes
Aug 20, 2026
tuunit
reviewed
Aug 20, 2026
…lers (cherry picked from commit bbb2711)
tuunit
force-pushed
the
fix/deletion-defects
branch
from
September 15, 2026 08:45
6fab208 to
5524458
Compare
tuunit
previously approved these changes
Sep 15, 2026
tuunit
approved these changes
Sep 16, 2026
Collaborator
|
LGTM feel free to merge :) |
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.
Summary
Fixes deletion defects in the cluster and machine reconcilers where deletion could
hang and leave STACKIT resources orphaned.
Fixes #8
Changes
StackitClusterkeeps its finalizer and requeues whileMachines for thecluster still exist, so those machines can still resolve credentials and delete
their servers. The cluster reconciler's RBAC gains
get;list;watchonmachines.StackitMachinedeletion resolves the server by tags whenstatus.instanceIDis empty, instead of treating an empty status as proof thatno VM exists.
cannot leave a running server or load balancer behind an object that carries no
finalizer to clean it up.
StackitMachinedeletion finalizes with aCleanupSkippedwarning eventwhen the credentials Secret is gone, matching what the cluster reconciler
already does.
StackitCluster→StackitMachinewatch resolves the owningClusterbefore matching
Machine.spec.clusterName, and label-selects server-side.Matching against the
StackitClustername breaks for ClusterClass-generatedinfrastructure refs, where the two names always differ.
effect without another event.
README compatibility table corrected to the v1beta2 contract, which is what
metadata.yaml, the CRD labels and every import already declare.Notes
machines.verified to fail when its fix is reverted.
go build ./...,go test ./...andgolangci-lint run ./...pass;make manifestsproduces no diff. The e2e suitewas not run.