diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-12 18:15:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-12 18:15:44 +0300 |
commit | c1a7bcdf1bfef9455bc58b1737f52530bf681a90 (patch) | |
tree | fb683b37e3ef58bb7bd7698629796ed9c5bfbeae /app/services/clusters | |
parent | e0d7577e29dcab90623e1f38cf11b351c665ee23 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/clusters')
-rw-r--r-- | app/services/clusters/applications/base_helm_service.rb | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/app/services/clusters/applications/base_helm_service.rb b/app/services/clusters/applications/base_helm_service.rb deleted file mode 100644 index 0c9b41be8d2..00000000000 --- a/app/services/clusters/applications/base_helm_service.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -module Clusters - module Applications - class BaseHelmService - attr_accessor :app - - def initialize(app) - @app = app - end - - protected - - def log_error(error) - meta = { - error_code: error.respond_to?(:error_code) ? error.error_code : nil, - service: self.class.name, - app_id: app.id, - app_name: app.name, - project_ids: app.cluster.project_ids, - group_ids: app.cluster.group_ids - } - - Gitlab::ErrorTracking.track_exception(error, meta) - end - - def log_event(event) - meta = { - service: self.class.name, - app_id: app.id, - app_name: app.name, - project_ids: app.cluster.project_ids, - group_ids: app.cluster.group_ids, - event: event - } - - logger.info(meta) - end - - def logger - @logger ||= Gitlab::Kubernetes::Logger.build - end - - def cluster - app.cluster - end - - def kubeclient - cluster.kubeclient - end - - def helm_api - @helm_api ||= Gitlab::Kubernetes::Helm::API.new(kubeclient) - end - - def install_command - @install_command ||= app.install_command - end - - def update_command - @update_command ||= app.update_command - end - - def patch_command(new_values = "") - app.patch_command(new_values) - end - end - end -end |