Commit 966d0fe8 authored by zmartins's avatar zmartins

Add atomic and cleanup-on-fail parameters

To help when dealing with upgrades and failed
states in Helm
parent 536d66aa
---
title: Add atomic and cleanup-on-fail parameters for Helm
merge_request: 27721
author:
type: changed
......@@ -44,6 +44,7 @@ module Gitlab
def install_command
command = ['helm', 'upgrade', name, chart] +
install_flag +
rollback_support_flag +
reset_values_flag +
tls_flags_if_remote_tiller +
optional_version_flag +
......@@ -83,6 +84,10 @@ module Gitlab
['--version', version]
end
def rollback_support_flag
['--atomic', '--cleanup-on-fail']
end
end
end
end
......
......@@ -41,6 +41,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--version 1.2.3
--set rbac.create\\=false,rbac.enabled\\=false
......@@ -79,6 +81,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
#{tls_flags}
--version 1.2.3
......@@ -109,6 +113,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--version 1.2.3
--set rbac.create\\=true,rbac.enabled\\=true
......@@ -140,6 +146,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--version 1.2.3
--set rbac.create\\=false,rbac.enabled\\=false
......@@ -171,6 +179,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--version 1.2.3
--set rbac.create\\=false,rbac.enabled\\=false
......@@ -200,6 +210,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--version 1.2.3
--set rbac.create\\=false,rbac.enabled\\=false
......@@ -229,6 +241,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
<<~EOS.squish
helm upgrade app-name chart-name
--install
--atomic
--cleanup-on-fail
--reset-values
--set rbac.create\\=false,rbac.enabled\\=false
--namespace gitlab-managed-apps
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment