Skip to content

Commit

Permalink
Add comment and remove reason check
Browse files Browse the repository at this point in the history
  • Loading branch information
KnVerey committed Apr 10, 2018
1 parent 331c0d3 commit 9e3caf8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/kubernetes-deploy/kubernetes_resource/deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ def deploy_failing_to_progress?
return false unless Time.now.utc - @deploy_started_at >= progress_deadline.to_i
end

# This assumes that when the controller bumps the observed generation, it also updates/clears all the status
# conditions. Specifically, it assumes the progress condition is immediately set to True if a rollout is starting.
deploy_started? &&
current_generation == observed_generation &&
progress_condition["status"] == 'False' &&
progress_condition["reason"] == "ProgressDeadlineExceeded"
progress_condition["status"] == 'False'
end

def find_latest_rs(mediator)
Expand Down

0 comments on commit 9e3caf8

Please sign in to comment.