Merge supplementalGroups when combining pod YAML with builder spec#2850
Open
amarkdotdev wants to merge 1 commit into
Open
Merge supplementalGroups when combining pod YAML with builder spec#2850amarkdotdev wants to merge 1 commit into
amarkdotdev wants to merge 1 commit into
Conversation
6b021f9 to
1f1b028
Compare
PodTemplateUtils.combine() only copied runAsUser and runAsGroup into the merged pod securityContext. supplementalGroups configured on the pod template (UI, CasC, or pipeline) were dropped whenever raw pod YAML was present with the Override merge strategy. Add supplementalGroups resolution alongside the existing pod-level security context merge and cover the regression in unit tests. Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
1f1b028 to
c122a91
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.
Fixes #2849
Summary
supplementalGroupsinPodTemplateUtils.combine(Pod, Pod)alongside existing pod-levelrunAsUser/runAsGrouphandlingPodTemplateUtilsTestandSupplementalGroupsYamlOverrideReproTestProblem
Pod template Supplemental Groups are dropped when raw pod YAML uses Override merge strategy. Jenkins console raw YAML and the live pod both show only:
Test plan
PodTemplateUtilsTest#shouldCombinePodSupplementalGroupsFromTemplateSupplementalGroupsYamlOverrideReproTestmvn verify)