Skip to content

fix: create pod-rotation by specVersion for wekacontainers#2411

Open
rugggger wants to merge 1 commit intomainfrom
03-30-fix_create_pod-rotation_by_specversion_for_wekacontainers
Open

fix: create pod-rotation by specVersion for wekacontainers#2411
rugggger wants to merge 1 commit intomainfrom
03-30-fix_create_pod-rotation_by_specversion_for_wekacontainers

Conversation

@rugggger
Copy link
Copy Markdown
Contributor

@rugggger rugggger commented Mar 31, 2026

TL;DR

Adds pod spec version tracking to automatically rotate pods when their configuration changes, with configurable controls for managing pod lifecycle.

What changed?

  • Added POD_CONFIG_VERSION and ALLOW_ROTATE_NON_ANNOTATED environment variables to the weka-operator manager
  • Introduced podConfigVersion and allowRotateNonAnnotated configuration options in Helm values
  • Implemented spec version calculation using SHA256 hash of image, pod config version, and runtime version
  • Added weka.io/spec-version annotation to pods for drift detection
  • Modified container reconciliation to check for spec version mismatches and delete pods when configuration has drifted
  • Added LastAppliedSpecVersion field to container status tracking
  • Created comprehensive test coverage for spec version functionality

Why make this change?

This change enables automatic pod rotation when pod specifications change due to Helm chart updates or operator code changes. Previously, pods would continue running with outdated configurations even after upgrades. The spec version tracking ensures pods stay aligned with their desired configuration while providing granular control over when rotations occur through the allowRotateNonAnnotated flag.

@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 aa60fb2.
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


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.

@rugggger rugggger marked this pull request as ready for review March 31, 2026 08:18
@rugggger rugggger requested a review from a team as a code owner March 31, 2026 08:18
@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