mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-13 11:34:54 +00:00
Avoid duplicated InitContainer names generated in velero install CLI.
Add random string at the end when there is name collision detected. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -532,7 +532,7 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1api.Deployme
|
||||
|
||||
if len(c.plugins) > 0 {
|
||||
for _, image := range c.plugins {
|
||||
container := *builder.ForPluginContainer(image, pullPolicy).Result()
|
||||
container := *builder.ForPluginContainer(image, pullPolicy, deployment.Spec.Template.Spec.InitContainers).Result()
|
||||
deployment.Spec.Template.Spec.InitContainers = append(deployment.Spec.Template.Spec.InitContainers, container)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user