apimachinery
apimachinery copied to clipboard
Different order of objects in arrays deep equal check
Hey all!
I'm comparing two stateful sets where each of them have the same env vars but in a different order. Apart from that they are exactly the same. This is causing the code to update the stateful set in the cluster when it doesn't need to.
Sample code I used https://gist.github.com/EnriqueL8/c60ebb70b5bb48130707366467109c75
I want to understand why this deep equal is not checking the contents irrespective of the order? It's an easy fix on my side to just sort the values before comparing for example but want to understand if there is a reason behind this or simply a bug.
Thanks so much!