Fix SparkConnect pod update issue#2802
Open
Shekharrajak wants to merge 3 commits intokubeflow:masterfrom
Open
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
90cb802 to
9331bc1
Compare
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.
Purpose of this PR
Fixes #2784 - SparkConnect server/executor pods not updated when SparkConnect resource spec changes (e.g., image updates).
Proposed changes:
Add spec hash computation to detect pod spec changes using SHA256
Implement pod restart logic when spec hash differs from running pod
Add
ServerPodUpdatingstatus condition and Kubernetes events for observabilityAdd 22 unit tests for spec change detection and pod restart logic
Change Category
Bugfix (non-breaking change which fixes an issue)
Feature (non-breaking change which adds functionality)
Breaking change (fix or feature that could affect existing functionality)
Documentation update
Rationale
Kubernetes pods are immutable - spec changes cannot be applied to running pods. The reconciler now computes a hash of the desired pod spec and stores it in a pod annotation. On each reconcile, if the hash differs, the pod is deleted and recreated with the new spec. This follows cloud native patterns (declarative configuration, desired vs actual state comparison).
Checklist
I have conducted a self-review of my own code.
I have updated documentation accordingly.
I have added tests that prove my changes are effective or that my feature works.
Existing unit tests pass locally with my changes.
Additional Notes