Class: Clusters::Applications::CheckUpgradeProgressService

Inherits:
BaseHelmService
  • Object
show all
Defined in:
app/services/clusters/applications/check_upgrade_progress_service.rb

Instance Attribute Summary

Attributes inherited from BaseHelmService

#app

Instance Method Summary collapse

Methods inherited from BaseHelmService

#initialize

Constructor Details

This class inherits a constructor from Clusters::Applications::BaseHelmService

Instance Method Details

#executeObject


6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/services/clusters/applications/check_upgrade_progress_service.rb', line 6

def execute
  return unless app.updating?

  case phase
  when ::Gitlab::Kubernetes::Pod::SUCCEEDED
    on_success
  when ::Gitlab::Kubernetes::Pod::FAILED
    on_failed
  else
    check_timeout
  end
rescue ::Kubeclient::HttpError => e
  app.make_update_errored!("Kubernetes error: #{e.message}") unless app.update_errored?
end