mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update kubernetes dep to 1.24.0
As kubernetes 1.24.0 is released, updating kubernetes dependencies to 1.24.0 updates: #3086 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
fc1529f268
commit
c4f79d455f
19
vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
generated
vendored
19
vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
generated
vendored
@ -166,7 +166,20 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
|
||||
strictErrs, err := s.unmarshal(into, data, originalData)
|
||||
if err != nil {
|
||||
return nil, actual, err
|
||||
} else if len(strictErrs) > 0 {
|
||||
}
|
||||
|
||||
// when decoding directly into a provided unstructured object,
|
||||
// extract the actual gvk decoded from the provided data,
|
||||
// and ensure it is non-empty.
|
||||
if isUnstructured {
|
||||
*actual = into.GetObjectKind().GroupVersionKind()
|
||||
if len(actual.Kind) == 0 {
|
||||
return nil, actual, runtime.NewMissingKindErr(string(originalData))
|
||||
}
|
||||
// TODO(109023): require apiVersion here as well once unstructuredJSONScheme#Decode does
|
||||
}
|
||||
|
||||
if len(strictErrs) > 0 {
|
||||
return into, actual, runtime.NewStrictDecodingError(strictErrs)
|
||||
}
|
||||
return into, actual, nil
|
||||
@ -261,9 +274,9 @@ func (s *Serializer) unmarshal(into runtime.Object, data, originalData []byte) (
|
||||
var strictJSONErrs []error
|
||||
if u, isUnstructured := into.(runtime.Unstructured); isUnstructured {
|
||||
// Unstructured is a custom unmarshaler that gets delegated
|
||||
// to, so inorder to detect strict JSON errors we need
|
||||
// to, so in order to detect strict JSON errors we need
|
||||
// to unmarshal directly into the object.
|
||||
m := u.UnstructuredContent()
|
||||
m := map[string]interface{}{}
|
||||
strictJSONErrs, err = kjson.UnmarshalStrict(data, &m)
|
||||
u.SetUnstructuredContent(m)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user