diff --git a/pkg/utils/common/pods.go b/pkg/utils/common/pods.go index 60dd3678d..cbc812a9a 100644 --- a/pkg/utils/common/pods.go +++ b/pkg/utils/common/pods.go @@ -93,8 +93,11 @@ func SetHelperData(chaosDetails *types.ChaosDetails, setHelperData string, clien // Get Labels labels := pod.ObjectMeta.Labels - delete(labels, "controller-uid") - delete(labels, "job-name") + for label := range labels { + if strings.HasSuffix(label, "job-name") || strings.HasSuffix(label, "controller-uid") { + delete(labels, label) + } + } chaosDetails.Labels = labels switch setHelperData {