diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2019-07-12 15:45:43 +1000 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2019-07-15 11:38:40 +1000 |
commit | c9b0ac5fc45c6e42db193b967cbeb98ed4168d62 (patch) | |
tree | 682b88a6d2b9e047cfb698493b1ee151ea535c1f /spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb | |
parent | ecffca5d92353d55aaf8f984737fa617782310e0 (diff) | |
download | gitlab-ce-c9b0ac5fc45c6e42db193b967cbeb98ed4168d62.tar.gz |
GitLab Managed App ensure helm version uses tls opts63694-tls-opts-for-helm-wait
The TLS opts were missing from helm version command which meant that it
was just perpetually failing and hence wasting 30s of time waiting for a
command to be successful that was never going to be successful. This
never actually caused any errors because this loop will happily just
fail 30 times without breaking the overall script but it was just a
waste of installation time so now installing apps should be ~30s faster.
Diffstat (limited to 'spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb')
-rw-r--r-- | spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb b/spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb index cae92305b19..39a46f9bc6d 100644 --- a/spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb +++ b/spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb @@ -20,6 +20,15 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do end end + let(:tls_flags) do + <<~EOS.squish + --tls + --tls-ca-cert /data/helm/app-name/config/ca.pem + --tls-cert /data/helm/app-name/config/cert.pem + --tls-key /data/helm/app-name/config/key.pem + EOS + end + context 'when there is a ca.pem file' do let(:files) { { 'ca.pem': 'some file content' } } @@ -27,7 +36,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do let(:commands) do <<~EOS helm init --upgrade - for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done + for i in $(seq 1 30); do helm version #{tls_flags} && break; sleep 1s; echo "Retrying ($i)..."; done #{helm_delete_command} EOS end @@ -35,10 +44,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do let(:helm_delete_command) do <<~EOS.squish helm delete --purge app-name - --tls - --tls-ca-cert /data/helm/app-name/config/ca.pem - --tls-cert /data/helm/app-name/config/cert.pem - --tls-key /data/helm/app-name/config/key.pem + #{tls_flags} EOS end end |