mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
add fallback for GVK comparison
only return comparison of 'Kind' indices if they do not match otherwise fall back to GVK string comparison this reduces output instability
This commit is contained in:
@@ -97,7 +97,9 @@ func (x Gvk) IsLessThan(o Gvk) bool {
|
||||
indexI, foundI := typeOrders[x.Kind]
|
||||
indexJ, foundJ := typeOrders[o.Kind]
|
||||
if foundI && foundJ {
|
||||
return indexI < indexJ
|
||||
if indexI != indexJ {
|
||||
return indexI < indexJ
|
||||
}
|
||||
}
|
||||
if foundI && !foundJ {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user