Skip to content

fix: implement spec propagation as rolling upgrade#2412

Open
rugggger wants to merge 1 commit into03-30-fix_create_pod-rotation_by_specversion_for_wekacontainersfrom
03-30-fix_implement_spec_propagation_as_rolling_upgrade
Open

fix: implement spec propagation as rolling upgrade#2412
rugggger wants to merge 1 commit into03-30-fix_create_pod-rotation_by_specversion_for_wekacontainersfrom
03-30-fix_implement_spec_propagation_as_rolling_upgrade

Conversation

@rugggger
Copy link
Copy Markdown
Contributor

@rugggger rugggger commented Mar 31, 2026

TL;DR

Extended the upgrade system to support spec-based upgrades in addition to image-based upgrades, allowing coordinated rolling updates when any cluster specification changes.

What changed?

  • Added TargetSpecVersion field to UpgradeController alongside the existing TargetImage field
  • Introduced isContainerAligned() and isContainerApplied() methods to check upgrade status based on either spec version or image
  • Modified NewUpgradeController() constructor to accept both target image and target spec version parameters
  • Enhanced CalcClusterSpecVersion() to include additional cluster specification fields like CPU policy, IPv6 settings, network configuration, and encryption settings
  • Updated cluster upgrade logic to track LastAppliedSpec status field and handle both image and non-image specification changes
  • Modified container reconciler to rotate pods with explicit SpecVersion even when allowRotateNonAnnotated is disabled
  • Restructured upgrade flow to use spec version tracking while maintaining backward compatibility with image-based upgrades

Why make this change?

This change enables the operator to perform coordinated rolling updates when any cluster specification changes, not just image updates. Previously, changes to CPU policy, network configuration, or other cluster settings would not trigger proper rolling upgrades, potentially leaving the cluster in an inconsistent state. The new spec version system ensures all containers are updated consistently when any tracked specification field changes.

@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA a024650.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

Copy link
Copy Markdown
Contributor Author

rugggger commented Mar 31, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label main-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 31, 2026

Graphite Automations

"Add anton/matt/sergey/kristina as reviwers on operator PRs" took an action on this PR • (03/31/26)

3 reviewers were added to this PR based on Anton Bykov's automation.

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.

1 participant