mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes and libraries to v1.22.0 version
Kubernetes v1.22 version has been released and this update ceph csi dependencies to use the same version. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
e077c1fdf5
commit
aa698bc3e1
18
vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go
generated
vendored
18
vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go
generated
vendored
@ -291,15 +291,19 @@ func (r *YAMLReader) Read() ([]byte, error) {
|
||||
if i := bytes.Index(line, []byte(separator)); i == 0 {
|
||||
// We have a potential document terminator
|
||||
i += sep
|
||||
after := line[i:]
|
||||
if len(strings.TrimRightFunc(string(after), unicode.IsSpace)) == 0 {
|
||||
if buffer.Len() != 0 {
|
||||
return buffer.Bytes(), nil
|
||||
}
|
||||
if err == io.EOF {
|
||||
return nil, err
|
||||
trimmed := strings.TrimSpace(string(line[i:]))
|
||||
// We only allow comments and spaces following the yaml doc separator, otherwise we'll return an error
|
||||
if len(trimmed) > 0 && string(trimmed[0]) != "#" {
|
||||
return nil, YAMLSyntaxError{
|
||||
err: fmt.Errorf("invalid Yaml document separator: %s", trimmed),
|
||||
}
|
||||
}
|
||||
if buffer.Len() != 0 {
|
||||
return buffer.Bytes(), nil
|
||||
}
|
||||
if err == io.EOF {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if err == io.EOF {
|
||||
if buffer.Len() != 0 {
|
||||
|
Reference in New Issue
Block a user