Skip to content

Commit b52e05e

Browse files
Cr 15222 (#661)
* make sure git integration secret is deleted even if app-proxy is not available during uninstall * bump
1 parent b8be1fd commit b52e05e

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

Makefile

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

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

cmd/commands/runtime.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,12 +595,19 @@ func runRuntimeUninstall(ctx context.Context, opts *RuntimeUninstallOptions) err
595595
}
596596

597597
func runPostUninstallCleanup(ctx context.Context, kubeFactory kube.Factory, namespace string) error {
598-
secrets, err := kubeutil.GetSecretsWithLabel(ctx, kubeFactory, namespace, store.Get().LabelSelectorSealedSecret)
598+
sealedSecrets, err := kubeutil.GetSecretsWithLabel(ctx, kubeFactory, namespace, store.Get().LabelSelectorSealedSecret)
599599
if err != nil {
600600
return err
601601
}
602602

603-
for _, secret := range secrets.Items {
603+
gitIntegrationSecrets, err := kubeutil.GetSecretsWithLabel(ctx, kubeFactory, namespace, store.Get().LabelSelectorGitIntegrationSecret)
604+
if err != nil {
605+
return err
606+
}
607+
608+
secrets := append(sealedSecrets.Items, gitIntegrationSecrets.Items...)
609+
610+
for _, secret := range secrets {
604611
err = kubeutil.DeleteSecretWithFinalizer(ctx, kubeFactory, &secret)
605612
if err != nil {
606613
log.G().Warnf("failed to delete secret: %w", err)

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.1.22/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.23/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.1.22/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.23/cf-darwin-amd64.tar.gz | tar zx
4040

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

pkg/store/store.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ type Store struct {
8686
LabelKeyCFType string
8787
LabelKeyCFInternal string
8888
LabelSelectorSealedSecret string
89+
LabelSelectorGitIntegrationSecret string
8990
AnnotationKeySyncWave string
9091
MarketplaceGitSourceName string
9192
MarketplaceRepo string
@@ -210,6 +211,7 @@ func init() {
210211
s.LabelKeyCFType = "codefresh.io/entity"
211212
s.LabelKeyCFInternal = "codefresh.io/internal"
212213
s.LabelSelectorSealedSecret = "codefresh.io/sealing-key=true"
214+
s.LabelSelectorGitIntegrationSecret = "io.codefresh.integration-type=git"
213215
s.AnnotationKeySyncWave = "argocd.argoproj.io/sync-wave"
214216
s.MaxDefVersion = semver.MustParse(maxDefVersion)
215217
s.LastRuntimeVersionInCLI = semver.MustParse(lastRuntimeVersionInCLI)

0 commit comments

Comments
 (0)