mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
job controller: don't mutate shared cache object
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
This commit is contained in:
parent
4118dff509
commit
0a21157c96
@ -462,7 +462,8 @@ func (jm *Controller) syncJob(key string) (bool, error) {
|
|||||||
}
|
}
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
job := *sharedJob
|
// make a copy so we don't mutate the shared cache
|
||||||
|
job := *sharedJob.DeepCopy()
|
||||||
|
|
||||||
// if job was finished previously, we don't want to redo the termination
|
// if job was finished previously, we don't want to redo the termination
|
||||||
if IsJobFinished(&job) {
|
if IsJobFinished(&job) {
|
||||||
|
Loading…
Reference in New Issue
Block a user