updated already contains the right value, so we can just return it

This commit is contained in:
Evgeniy Shubin 2025-08-01 13:26:11 +02:00 committed by GitHub
parent fa50d19600
commit ae50b3c287
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -270,7 +270,7 @@ func AddOrUpdateTolerationInPodSpec(spec *v1.PodSpec, toleration *v1.Toleration)
for i := range podTolerations {
if toleration.MatchToleration(&podTolerations[i]) {
if helper.Semantic.DeepEqual(*toleration, podTolerations[i]) {
return false
return updated
}
newTolerations = append(newTolerations, *toleration)
updated = true