feat: k8s version drift corrective UpgradePolicy in DriftSignalReconciler#27
Open
ontave wants to merge 2 commits into
Open
feat: k8s version drift corrective UpgradePolicy in DriftSignalReconciler#27ontave wants to merge 2 commits into
ontave wants to merge 2 commits into
Conversation
When a drift-k8s-version-{cluster} DriftSignal arrives (emitted by
KubernetesVersionDriftLoop on the tenant conductor), create a corrective
UpgradePolicy (type=kubernetes, targetKubernetesVersion=spec.kubernetesVersion)
in seam-tenant-{cluster}. UpgradePolicyReconciler picks it up and submits
a kube-upgrade executor Job to bring the cluster back to declared state.
Routing: InfrastructureTalosCluster signals are now distinguished by name
prefix -- drift-k8s-version-* routes to handleKubernetesVersionDrift,
all others continue to handleTalosVersionDrift.
1 unit test: TestDriftSignalReconciler_K8sVersionDrift_CreatesUpgradePolicy.
All 7 DriftSignal unit tests pass.
…paths reconcileVersionUpgrade now derives UpgradePolicy type from which version fields are set: talosVersion only -> UpgradeTypeTalos (existing), kubernetesVersion only -> UpgradeTypeKubernetes, both -> UpgradeTypeStack. Two new unit tests: TestTalosCluster_VersionUpgrade_KubernetesOnly_CreatesKubePolicy and TestTalosCluster_VersionUpgrade_Stack_CreatesBothVersions. All 8 version upgrade tests pass.
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
handleKubernetesVersionDriftadded toDriftSignalReconciler: when adrift-k8s-version-{cluster}DriftSignal arrives, creates a correctiveUpgradePolicy(type=kubernetes, targetKubernetesVersion=spec.kubernetesVersion) inseam-tenant-{cluster}ensureCorrectiveKubeUpgradePolicymirrors the existingensureCorrectiveUpgradePolicypattern for Talos version driftReconcile:InfrastructureTalosClustersignals now dispatched by name prefix --drift-k8s-version-*→handleKubernetesVersionDrift, others →handleTalosVersionDriftUpgradePolicyReconcilerpicks up the new UpgradePolicy and submits akube-upgradeexecutor JobTest plan
TestDriftSignalReconciler_K8sVersionDrift_CreatesUpgradePolicy: verifies UpgradePolicy (type=kubernetes, targetKubernetesVersion=1.32.2) created and DriftSignal advanced to queuedgo build ./...cleanCloses K8S-DRIFT-CONFIRM remediation gap found in session/25b.