Skip to content

Commit e3f391b

Browse files
committed
Match release namespace
1 parent c96f870 commit e3f391b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/common/ciReleaseFunctions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ func DeleteOrphanedReleaseResources(kubernetesClient *kubernetes.Clientset, helm
317317
LabelSelector: selector,
318318
})
319319
for _, v := range pvList.Items {
320+
// match meta.helm.sh/release-namespace annotation, skip otherwise
321+
if v.Annotations["meta.helm.sh/release-namespace"] != namespace {
322+
continue
323+
}
320324
if dryRun {
321325
fmt.Printf("Dry run: persistentvolume/%s\n", v.Name)
322326
} else {

0 commit comments

Comments
 (0)