Class: Clusters::Applications::PrometheusUpdateService
- Inherits:
-
BaseHelmService
- Object
- BaseHelmService
- Clusters::Applications::PrometheusUpdateService
- Defined in:
- app/services/clusters/applications/prometheus_update_service.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
Returns the value of attribute project.
Attributes inherited from BaseHelmService
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(app, project) ⇒ PrometheusUpdateService
constructor
A new instance of PrometheusUpdateService.
Constructor Details
#initialize(app, project) ⇒ PrometheusUpdateService
Returns a new instance of PrometheusUpdateService.
8 9 10 11 |
# File 'app/services/clusters/applications/prometheus_update_service.rb', line 8 def initialize(app, project) super(app) @project = project end |
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project
6 7 8 |
# File 'app/services/clusters/applications/prometheus_update_service.rb', line 6 def project @project end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/services/clusters/applications/prometheus_update_service.rb', line 13 def execute app.make_updating! helm_api.update(patch_command(values)) ::ClusterWaitForAppUpdateWorker.perform_in(::ClusterWaitForAppUpdateWorker::INTERVAL, app.name, app.id) rescue ::Kubeclient::HttpError => ke app.make_update_errored!("Kubernetes error: #{ke.}") rescue StandardError => e app.make_update_errored!(e.) end |