add --skip-charts for destroy for disable prepare charts (#637)

* add --skip-charts for destroy for disable prepare charts

Signed-off-by: yxxhero <aiopsclub@163.com>

* add --skip-charts for delete subcmd

Signed-off-by: yxxhero <aiopsclub@163.com>

* add docs and e2e test

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-01-21 11:54:59 +09:00
committed by GitHub
parent f3a24dd99a
commit 1664edd0b9
9 changed files with 63 additions and 20 deletions
+13
View File
@@ -70,6 +70,19 @@ ${helm} status --namespace=${test_ns} httpbin &> /dev/null && fail "release shou
info "Ensuring \"helmfile destroy\" doesn't fail when no releases installed"
${helmfile} -f ${happypath_case_input_dir}/${config_file} destroy || fail "\"helmfile delete\" shouldn't fail when there are no installed releases"
info "Re-applying ${happypath_case_input_dir}/${config_file} with locked dependencies"
${helmfile} -f ${happypath_case_input_dir}/${config_file} apply
code=$?
[ ${code} -eq 0 ] || fail "unexpected exit code returned by helmfile apply: ${code}"
${helm} list --namespace=${test_ns} || fail "unable to list releases"
info "Deleting release with --skip-charts"
${helmfile} -f ${happypath_case_input_dir}/${config_file} destroy --skip-charts
${helm} status --namespace=${test_ns} httpbin &> /dev/null && fail "release should not exist anymore after a delete"
info "Ensuring \"helmfile destroy --skip-charts\" doesn't fail when no releases installed"
${helmfile} -f ${happypath_case_input_dir}/${config_file} destroy --skip-charts || fail "\"helmfile delete\" shouldn't fail when there are no installed releases"
info "Ensuring \"helmfile template\" output does contain only YAML docs"
(${helmfile} -f ${happypath_case_input_dir}/${config_file} template | kubectl apply -f -) || fail "\"helmfile template | kubectl apply -f -\" shouldn't fail"