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 continue
} }
} }
if spec.Containers[i].Image != resolved {
spec.Containers[i].Image = resolved spec.Containers[i].Image = resolved
// Perform updates // Perform updates
transformed = true transformed = true
} }
} }
}
// Add a new container if not found // Add a new container if not found
if !containerFound { if !containerFound {
allErrs = append(allErrs, fmt.Errorf("error: unable to find container named %q", name)) allErrs = append(allErrs, fmt.Errorf("error: unable to find container named %q", name))