Repository navigation
[test] ApplyStatefulSet removes an init container dropped from the template - #563
Open
SLoeuillet wants to merge 1 commit into
Open
SLoeuillet wants to merge 1 commit into
SLoeuillet wants to merge 1 commit into
Conversation
…mplate Regression test for apache#562: enabling skipDefaultSystemInit on an existing compute group drops default-init from the rendered template, and applying it must remove the init container from the live StatefulSet. 26.0.1 patched with the desired object as a JSON merge patch, where the empty (omitempty) initContainers is absent, so default-init stayed; apache#545 fixed it on master. The test fails on 26.0.1 and passes on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
cc @morningman |
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.
What problem does this PR solve?
Issue Number: close #562
Related PR: #545
Problem Summary:
In 26.0.1, enabling
skipDefaultSystemIniton an existing compute group never removed the privilegeddefault-initfrom its StatefulSet.PatchClientObjectsent the desired object as a JSON merge patch, and the empty (omitempty)initContainerswas absent from it. #545 fixed this onmasterby patching from the live object, but nothing tests this case.This adds
TestApplyStatefulSetRemovesDroppedInitContainer: an existing StatefulSet whose template hasdefault-init, and a desired template without it (plus aSKIP_CHECK_ULIMITenv var, to check the update itself was applied). AfterApplyStatefulSet, the init container must be gone.26.0.1it fails:expected no init containers after the update, got 1: default-init.masterit passes, along with the wholepkg/common/utils/k8spackage (withKUBEBUILDER_ASSETSset for the envtest cases).Test only; no code change.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?