Skip to content

Commit 5987fa0

Browse files
author
lamai93
committed
Reverted deletion of force parameter - still in use.
1 parent 22a1b47 commit 5987fa0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pkg/deployment/context_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (d *Deployment) UpdateStatus(status api.DeploymentStatus, lastVersion int32
112112
}
113113
d.status.version++
114114
d.status.last = *status.DeepCopy()
115-
if err := d.updateCRStatus(); err != nil {
115+
if err := d.updateCRStatus(force); err != nil {
116116
return maskAny(err)
117117
}
118118
return nil

pkg/deployment/deployment.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,12 @@ func (d *Deployment) CreateEvent(evt *k8sutil.Event) {
343343
}
344344

345345
// Update the status of the API object from the internal status
346-
func (d *Deployment) updateCRStatus() error {
347-
348-
if d.apiObject.Status.Equal(d.status.last) {
349-
// Nothing has changed
350-
return nil
346+
func (d *Deployment) updateCRStatus(force ...bool) error {
347+
if len(force) == 0 || !force[0] {
348+
if d.apiObject.Status.Equal(d.status.last) {
349+
// Nothing has changed
350+
return nil
351+
}
351352
}
352353

353354
// Send update to API server

0 commit comments

Comments
 (0)