summaryrefslogtreecommitdiff
path: root/lib/gitlab/kubernetes/helm/v2/reset_command.rb
blob: 00626501a9a66fce4738ded34dce1ac0f227c15f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# frozen_string_literal: true

module Gitlab
  module Kubernetes
    module Helm
      module V2
        class ResetCommand < BaseCommand
          include ClientCommand

          def generate_script
            super + [
              init_command,
              reset_helm_command
            ].join("\n")
          end

          def pod_name
            "uninstall-#{name}"
          end

          private

          def reset_helm_command
            'helm reset --force'
          end
        end
      end
    end
  end
end