• Kubernetes Submit Queue's avatar
    Merge pull request #68151 from ddebroy/ddebroy-fix67852 · cdfbb01d
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.
    
    Implement semantic comparison of VolumeNodeAffinity for unit tests
    
    **What this PR does / why we need it**:
    Implements a semantic comparison function for VolumeNodeAffinity that is not sensitive to ordering of various members. Previous reflect.DeepEqual was sensitive to ordering causing it to be flaky.
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Fixes # https://github.com/kubernetes/kubernetes/issues/67852
    
    **Special notes for your reviewer**:
    We want to able to successfully match `VolumeNodeAffinity{Required:&NodeSelector{NodeSelectorTerms:[{[{a In [1]} {b In [2 3]}] []}],},}` and `VolumeNodeAffinity{Required:&NodeSelector{NodeSelectorTerms:[{[{b In [3 2]} {a In [1]}] []}],},}` without being sensitive to the ordering of requirements with key `a` and `b` or the order of values with key `b`. This fix enables such semantic comparison of VolumeNodeAffinity
    
    We can move `volumeNodeAffinitiesEqual` to volume/utils post code freeze
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    
    /sig storage
    cc @msau42
    cdfbb01d
Name
Last commit
Last update
..
apis/config Loading commit data...
bootstrap Loading commit data...
certificates Loading commit data...
cloud Loading commit data...
clusterroleaggregation Loading commit data...
cronjob Loading commit data...
daemon Loading commit data...
deployment Loading commit data...
disruption Loading commit data...
endpoint Loading commit data...
garbagecollector Loading commit data...
history Loading commit data...
job Loading commit data...
namespace Loading commit data...
nodeipam Loading commit data...
nodelifecycle Loading commit data...
podautoscaler Loading commit data...
podgc Loading commit data...
replicaset Loading commit data...
replication Loading commit data...
resourcequota Loading commit data...
route Loading commit data...
service Loading commit data...
serviceaccount Loading commit data...
statefulset Loading commit data...
testutil Loading commit data...
ttl Loading commit data...
ttlafterfinished Loading commit data...
util/node Loading commit data...
volume Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
client_builder.go Loading commit data...
controller_ref_manager.go Loading commit data...
controller_ref_manager_test.go Loading commit data...
controller_utils.go Loading commit data...
controller_utils_test.go Loading commit data...
doc.go Loading commit data...
lookup_cache.go Loading commit data...