Skip to content

Commit

Permalink
Add fix to remove the job labels from helper pod (litmuschaos#665)
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Chaudhary <shubham.chaudhary@harness.io>
  • Loading branch information
ispeakc0de authored and ksatchit committed Sep 21, 2023
1 parent 4b771b2 commit 5eec1ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/utils/common/pods.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 5eec1ab

Please sign in to comment.