Skip to content

Commit 378a9e1

Browse files
Cr 14272 (#615)
* add a post uninstall step that deletes leftover secrets * bump * only fail post uninstall cleanup if no force * bump
1 parent e661476 commit 378a9e1

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.556
1+
VERSION=v0.0.557
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,11 @@ func runRuntimeUninstall(ctx context.Context, opts *RuntimeUninstallOptions) err
579579

580580
err = runPostUninstallCleanup(ctx, opts.KubeFactory, opts.RuntimeName)
581581
if err != nil {
582-
return fmt.Errorf("failed to do post uninstall cleanup: %w", err)
582+
errorMsg := fmt.Sprintf("failed to do post uninstall cleanup: %v", err)
583+
if !opts.Force {
584+
return fmt.Errorf(errorMsg)
585+
}
586+
log.G().Warn(errorMsg)
583587
}
584588

585589
uninstallDoneStr := fmt.Sprintf("Done uninstalling runtime \"%s\"", opts.RuntimeName)
@@ -597,7 +601,7 @@ func runPostUninstallCleanup(ctx context.Context, kubeFactory kube.Factory, name
597601
for _, secret := range secrets.Items {
598602
err = kubeutil.DeleteSecretWithFinalizer(ctx, kubeFactory, &secret)
599603
if err != nil {
600-
log.G().Warn("failed to delete secret: %w", err)
604+
log.G().Warnf("failed to delete secret: %w", err)
601605
}
602606
}
603607

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.556/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.557/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.556/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.557/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 2.1.1
8-
version: 0.0.556
8+
version: 0.0.557
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)