Skip to content

Commit

Permalink
fix:add volumes used by initContainers
Browse files Browse the repository at this point in the history
Signed-off-by: wangchongyang.yangtuo <wangchongyang.yangtuo@bytedance.com>
  • Loading branch information
wangchongyang.yangtuo committed Mar 21, 2022
1 parent 3f415af commit 9b1e6ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/webhook/pod/mutating/sidecarset.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func buildSidecars(isUpdated bool, pod *corev1.Pod, oldPod *corev1.Pod, matchedS
transferEnvs := sidecarcontrol.GetSidecarTransferEnvs(initContainer, pod)
initContainer.Env = append(initContainer.Env, transferEnvs...)
sidecarInitContainers = append(sidecarInitContainers, initContainer)
// insert volumes that initContainers used
for _, mount := range initContainer.VolumeMounts {
volumesInSidecars = append(volumesInSidecars, *volumesMap[mount.Name])
}
}

//process imagePullSecrets
Expand Down

0 comments on commit 9b1e6ef

Please sign in to comment.