File tree 1 file changed +9
-0
lines changed
pkg/deploy/strategy/recreate
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ func (s *RecreateDeploymentStrategy) DeployWithAcceptor(from *kapi.ReplicationCo
142
142
return strat .NewConditionReachedErr ("mid hook succeeded" )
143
143
}
144
144
145
+ accepted := false
146
+
145
147
// Scale up the to deployment.
146
148
if desiredReplicas > 0 {
147
149
if from != nil {
@@ -155,6 +157,7 @@ func (s *RecreateDeploymentStrategy) DeployWithAcceptor(from *kapi.ReplicationCo
155
157
if err := updateAcceptor .Accept (updatedTo ); err != nil {
156
158
return fmt .Errorf ("update acceptor rejected %s: %v" , to .Name , err )
157
159
}
160
+ accepted = true
158
161
to = updatedTo
159
162
160
163
if strat .PercentageBetween (s .until , 1 , 99 ) {
@@ -171,6 +174,12 @@ func (s *RecreateDeploymentStrategy) DeployWithAcceptor(from *kapi.ReplicationCo
171
174
}
172
175
to = updatedTo
173
176
}
177
+
178
+ if ! accepted {
179
+ if err := updateAcceptor .Accept (to ); err != nil {
180
+ return fmt .Errorf ("update acceptor rejected %s: %v" , to .Name , err )
181
+ }
182
+ }
174
183
}
175
184
176
185
if (from == nil && strat .PercentageBetween (s .until , 1 , 100 )) || (from != nil && s .until == "100%" ) {
You can’t perform that action at this time.
0 commit comments