Skip to content

Commit c78c428

Browse files
author
OpenShift Bot
committed
Merge pull request #9177 from kargakis/disallow-last-triggered-image-on-creation
Merged by openshift-bot
2 parents 63f6562 + e40b6f4 commit c78c428

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/deploy/registry/deployconfig/strategy.go

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ func (strategy) PrepareForCreate(obj runtime.Object) {
4444
dc := obj.(*api.DeploymentConfig)
4545
dc.Generation = 1
4646
dc.Status = api.DeploymentConfigStatus{}
47+
48+
for i := range dc.Spec.Triggers {
49+
if params := dc.Spec.Triggers[i].ImageChangeParams; params != nil {
50+
params.LastTriggeredImage = ""
51+
}
52+
}
4753
}
4854

4955
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.

0 commit comments

Comments
 (0)