Merge pull request #50823 from zjj2wry/set-image

Automatic merge from submit-queue (batch tested with PRs 50277, 50823, 50376, 50867)

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

**What this PR does / why we need it**:
closes #50821 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-08-17 22:24:23 -07:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -196,9 +196,11 @@ func (o *ImageOptions) Run() error {
continue
}
}
spec.Containers[i].Image = resolved
// Perform updates
transformed = true
if spec.Containers[i].Image != resolved {
spec.Containers[i].Image = resolved
// Perform updates
transformed = true
}
}
}
// Add a new container if not found