Skip to content

Commit

Permalink
Add fix to remove the job labels from helper pod (#665) (#669)
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Chaudhary <[email protected]>
Co-authored-by: Shubham Chaudhary <[email protected]>
  • Loading branch information
ksatchit and ispeakc0de authored Sep 21, 2023
1 parent 4b771b2 commit ed4d0f5
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 @@ -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 ed4d0f5

Please sign in to comment.