<#6958 Fix duplicate VolumeMounts when merging pod...
# flyte-github
a
#6958 Fix duplicate VolumeMounts when merging pod templates Pull request opened by pingsutw Summary • Fix duplicate VolumeMounts when merging a task-level pod template with the executor's default pod template • In
MergeBasePodSpecOntoTemplate
, template containers with magic names (
"primary"
,
"default"
) were being applied twice: once as a magic template and again in the name-matching loop. With
mergo.WithAppendSlice
, this caused VolumeMounts (and other slice fields) to be appended twice, producing duplicates that Kubernetes rejects • Added guards to skip magic template containers in the name-matching loop since they are already merged earlier Test Plan • Added unit test
primary_container_template_with_volume_mounts_does_not_duplicate_when_base_container_is_also_named_primary
that reproduces the exact scenario and verifies no duplicate VolumeMounts • All existing
TestMergeBasePodSpecsOntoTemplate
tests pass Rollout Plan • Standard rollout, this is a bug fix in pod template merging logic Rollback Plan • Revert this PR •
main
• #6583 • #6958 👈 flyteorg/flyte