diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-14 12:38:08 +0000 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-16 10:22:40 +0000 |
commit | fe1469e12f7a1895cbf534f9ab17fd32af0e954c (patch) | |
tree | 223011a04778a848c7d38e33384fe6b664c3c3b6 /lib/gitlab | |
parent | f5e3ce5ed612c9b247e362ed7c667557331e5bfd (diff) | |
download | gitlab-ce-fe1469e12f7a1895cbf534f9ab17fd32af0e954c.tar.gz |
Upgrade helm to 2.11.0 and upgrade on every install
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/kubernetes/helm.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/kubernetes/helm/install_command.rb | 10 | ||||
-rw-r--r-- | lib/gitlab/kubernetes/helm/upgrade_command.rb | 10 |
3 files changed, 19 insertions, 3 deletions
diff --git a/lib/gitlab/kubernetes/helm.rb b/lib/gitlab/kubernetes/helm.rb index 1cd4f9e17b7..5a22b5e3364 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.7.2'.freeze + HELM_VERSION = '2.11.0'.freeze KUBECTL_VERSION = '1.11.0'.freeze NAMESPACE = 'gitlab-managed-apps'.freeze SERVICE_ACCOUNT = 'tiller'.freeze diff --git a/lib/gitlab/kubernetes/helm/install_command.rb b/lib/gitlab/kubernetes/helm/install_command.rb index ff1c1657b98..5c7b6d6cb75 100644 --- a/lib/gitlab/kubernetes/helm/install_command.rb +++ b/lib/gitlab/kubernetes/helm/install_command.rb @@ -20,6 +20,10 @@ module Gitlab def generate_script super + [ init_command, + # Sleep is necessary to give Tiller time to restart after upgrade. + # Ideally we'd be able to use --wait but cannot because of + # https://github.com/helm/helm/issues/4855 + sleep_command, repository_command, repository_update_command, preinstall_command, @@ -35,7 +39,11 @@ module Gitlab private def init_command - 'helm init --client-only' + 'helm init --upgrade --tiller-namespace gitlab-managed-apps' + end + + def sleep_command + 'sleep 30' end def repository_command diff --git a/lib/gitlab/kubernetes/helm/upgrade_command.rb b/lib/gitlab/kubernetes/helm/upgrade_command.rb index b36315f7a82..5b47944e5e6 100644 --- a/lib/gitlab/kubernetes/helm/upgrade_command.rb +++ b/lib/gitlab/kubernetes/helm/upgrade_command.rb @@ -20,6 +20,10 @@ module Gitlab def generate_script super + [ init_command, + # Sleep is necessary to give Tiller time to restart after upgrade. + # Ideally we'd be able to use --wait but cannot because of + # https://github.com/helm/helm/issues/4855 + sleep_command, repository_command, script_command ].compact.join("\n") @@ -36,7 +40,11 @@ module Gitlab private def init_command - 'helm init --client-only' + 'helm init --upgrade --tiller-namespace gitlab-managed-apps' + end + + def sleep_command + 'sleep 30' end def repository_command |