fix issue(#50821)Add image check, if image not changed, transform false

This commit is contained in:
zhengjiajin 2017-08-17 11:19:14 +08:00
parent da00e92f87
commit 68bd8d2584

View File

@ -196,11 +196,13 @@ func (o *ImageOptions) Run() error {
continue
}
}
if spec.Containers[i].Image != resolved {
spec.Containers[i].Image = resolved
// Perform updates
transformed = true
}
}
}
// Add a new container if not found
if !containerFound {
allErrs = append(allErrs, fmt.Errorf("error: unable to find container named %q", name))