vendor: bump to Kube 1.9/master
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
7076c73172
commit
7a675ccd92
202 changed files with 8543 additions and 7270 deletions
14
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
generated
vendored
14
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
generated
vendored
|
@ -515,6 +515,9 @@ func normalizeSliceOrder(toSort, order []interface{}, mergeKey string, kind refl
|
|||
return nil, err
|
||||
}
|
||||
toSort, toDelete, err = extractToDeleteItems(toSort)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
sort.SliceStable(toSort, func(i, j int) bool {
|
||||
|
@ -554,7 +557,13 @@ func diffLists(original, modified []interface{}, t reflect.Type, mergeKey string
|
|||
switch kind {
|
||||
case reflect.Map:
|
||||
patchList, deleteList, err = diffListsOfMaps(original, modified, t, mergeKey, diffOptions)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
orderSame, err := isOrderSame(original, modified, mergeKey)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
|
@ -580,6 +589,9 @@ func diffLists(original, modified []interface{}, t reflect.Type, mergeKey string
|
|||
return nil, nil, nil, mergepatch.ErrNoListOfLists
|
||||
default:
|
||||
patchList, deleteList, err = diffListsOfScalars(original, modified, diffOptions)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
|
||||
// generate the setElementOrder list when there are content changes or order changes
|
||||
if diffOptions.SetElementOrder && ((!diffOptions.IgnoreDeletions && len(deleteList) > 0) ||
|
||||
|
@ -1054,7 +1066,7 @@ func applyRetainKeysDirective(original, patch map[string]interface{}, options Me
|
|||
// Then, sort them by the relative order in setElementOrder, patch list and live list.
|
||||
// The precedence is $setElementOrder > order in patch list > order in live list.
|
||||
// This function will delete the item after merging it to prevent process it again in the future.
|
||||
// Ref: https://git.k8s.io/community/contributors/design-proposals/preserve-order-in-strategic-merge-patch.md
|
||||
// Ref: https://git.k8s.io/community/contributors/design-proposals/cli/preserve-order-in-strategic-merge-patch.md
|
||||
func mergePatchIntoOriginal(original, patch map[string]interface{}, t reflect.Type, mergeOptions MergeOptions) error {
|
||||
for key, patchV := range patch {
|
||||
// Do nothing if there is no ordering directive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue