rebase: update kubernetes to v1.21.2

Updated kubernetes packages to latest release.
resizefs package has been included into k8s.io/mount-utils
package. updated code to use the same.

Updates: #1968

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2021-06-25 10:29:51 +05:30
committed by mergify[bot]
parent 8ce5ae16c1
commit 1b23d78113
1115 changed files with 98825 additions and 12365 deletions

View File

@ -120,7 +120,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil {
*intoUnknown = unk
if ok, _, _ := s.RecognizesData(bytes.NewBuffer(unk.Raw)); ok {
if ok, _, _ := s.RecognizesData(unk.Raw); ok {
intoUnknown.ContentType = runtime.ContentTypeProtobuf
}
return intoUnknown, &actual, nil
@ -245,19 +245,8 @@ func (s *Serializer) Identifier() runtime.Identifier {
}
// RecognizesData implements the RecognizingDecoder interface.
func (s *Serializer) RecognizesData(peek io.Reader) (bool, bool, error) {
prefix := make([]byte, 4)
n, err := peek.Read(prefix)
if err != nil {
if err == io.EOF {
return false, false, nil
}
return false, false, err
}
if n != 4 {
return false, false, nil
}
return bytes.Equal(s.prefix, prefix), false, nil
func (s *Serializer) RecognizesData(data []byte) (bool, bool, error) {
return bytes.HasPrefix(data, s.prefix), false, nil
}
// copyKindDefaults defaults dst to the value in src if dst does not have a value set.