Skip to content

Commit

Permalink
Add fix to remove the job labels from helper pod (#665)
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Chaudhary <[email protected]>
  • Loading branch information
ispeakc0de authored Jul 24, 2023
1 parent d737281 commit db13d05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/utils/common/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,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 db13d05

Please sign in to comment.