Welcome to mirror list, hosted at ThFree Co, Russian Federation.

client_command.rb « v2 « helm « kubernetes « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 88693a28d6ce34d85d3612ec807f3dbeecb8283e (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
31
32
33
34
35
36
37
38
39
40
# frozen_string_literal: true

module Gitlab
  module Kubernetes
    module Helm
      module V2
        module ClientCommand
          def init_command
            <<~SHELL.chomp
              export HELM_HOST="localhost:44134"
              tiller -listen ${HELM_HOST} -alsologtostderr &
              helm init --client-only
            SHELL
          end

          def repository_command
            ['helm', 'repo', 'add', name, repository].shelljoin if repository
          end

          private

          def repository_update_command
            'helm repo update'
          end

          def optional_tls_flags
            return [] unless files.key?(:'ca.pem')

            [
              '--tls',
              '--tls-ca-cert', "#{files_dir}/ca.pem",
              '--tls-cert', "#{files_dir}/cert.pem",
              '--tls-key', "#{files_dir}/key.pem"
            ]
          end
        end
      end
    end
  end
end