summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Baumbauer <cab@cabnetworks.net>2018-10-29 10:56:46 -0700
committerChris Baumbauer <cab@cabnetworks.net>2018-10-29 10:56:46 -0700
commit0ddff09385fa74760fdbeff3e29d5ff7f7e94ebb (patch)
tree3cb27be14563e19f450f2c33452b6a1548137262 /lib
parent623940bfa11b7b35613645bf3c4264605f0d33c0 (diff)
downloadgitlab-ce-0ddff09385fa74760fdbeff3e29d5ff7f7e94ebb.tar.gz
Revert Helm version bump
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/kubernetes/helm.rb2
-rw-r--r--lib/gitlab/kubernetes/helm/base_command.rb8
-rw-r--r--lib/gitlab/kubernetes/helm/install_command.rb16
3 files changed, 21 insertions, 5 deletions
diff --git a/lib/gitlab/kubernetes/helm.rb b/lib/gitlab/kubernetes/helm.rb
index a53c2c9e5cb..4a1bdf34c3e 100644
--- a/lib/gitlab/kubernetes/helm.rb
+++ b/lib/gitlab/kubernetes/helm.rb
@@ -1,7 +1,7 @@
module Gitlab
module Kubernetes
module Helm
- HELM_VERSION = '2.11.0'.freeze
+ HELM_VERSION = '2.7.2'.freeze
NAMESPACE = 'gitlab-managed-apps'.freeze
SERVICE_ACCOUNT = 'tiller'.freeze
CLUSTER_ROLE_BINDING = 'tiller-admin'.freeze
diff --git a/lib/gitlab/kubernetes/helm/base_command.rb b/lib/gitlab/kubernetes/helm/base_command.rb
index 74efe4bc8bb..1a928fb351f 100644
--- a/lib/gitlab/kubernetes/helm/base_command.rb
+++ b/lib/gitlab/kubernetes/helm/base_command.rb
@@ -17,6 +17,14 @@ module Gitlab
apk add -U wget ca-certificates openssl git >/dev/null
wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v#{Gitlab::Kubernetes::Helm::HELM_VERSION}-linux-amd64.tar.gz | tar zxC /tmp >/dev/null
mv /tmp/linux-amd64/helm /usr/bin/
+
+ wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
+ wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
+ apk add glibc-2.28-r0.apk > /dev/null
+ rm glibc-2.28-r0.apk
+ wget -q https://storage.googleapis.com/kubernetes-release/release/v1.11.0/bin/linux/amd64/kubectl
+ chmod +x kubectl
+ mv kubectl /usr/bin/
HEREDOC
end
diff --git a/lib/gitlab/kubernetes/helm/install_command.rb b/lib/gitlab/kubernetes/helm/install_command.rb
index 904bcd4470d..aa5fddf1b44 100644
--- a/lib/gitlab/kubernetes/helm/install_command.rb
+++ b/lib/gitlab/kubernetes/helm/install_command.rb
@@ -4,9 +4,9 @@ module Gitlab
class InstallCommand
include BaseCommand
- attr_reader :name, :files, :chart, :version, :repository, :setargs
+ attr_reader :name, :files, :chart, :version, :repository, :setargs, :script
- def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, setargs: nil)
+ def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, setargs: nil, script: nil)
@name = name
@chart = chart
@version = version
@@ -14,6 +14,7 @@ module Gitlab
@files = files
@repository = repository
@setargs = setargs
+ @script = script
end
def generate_script
@@ -21,7 +22,8 @@ module Gitlab
init_command,
repository_command,
repository_update_command,
- script_command
+ script_command,
+ install_command
].compact.join("\n")
end
@@ -43,12 +45,18 @@ module Gitlab
'helm repo update >/dev/null' if repository
end
- def script_command
+ def install_command
command = ['helm', 'install', chart] + install_command_flags
command.shelljoin + " >/dev/null\n"
end
+ def script_command
+ unless script.nil?
+ script.shelljoin + " >/dev/null\n"
+ end
+ end
+
def install_command_flags
name_flag = ['--name', name]
namespace_flag = ['--namespace', Gitlab::Kubernetes::Helm::NAMESPACE]