Class: Clusters::Applications::CheckProgressService

Inherits:
BaseHelmService show all
Defined in:
app/services/clusters/applications/check_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
20
21
# File 'app/services/clusters/applications/check_progress_service.rb', line 6

def execute
  return unless operation_in_progress?

  case pod_phase
  when Gitlab::Kubernetes::Pod::SUCCEEDED
    on_success
  when Gitlab::Kubernetes::Pod::FAILED
    on_failed
  else
    check_timeout
  end
rescue Kubeclient::HttpError => e
  log_error(e)

  app.make_errored!(_('Kubernetes error: %{error_code}') % { error_code: e.error_code })
end