mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
update scheme to use GroupVersion
This commit is contained in:
@@ -77,7 +77,7 @@ func (s *Scheme) EncodeToVersionStream(obj interface{}, destVersion string, stre
|
||||
return err
|
||||
}
|
||||
|
||||
if _, registered := s.typeToVersion[v.Type()]; !registered {
|
||||
if _, registered := s.typeToGVK[v.Type()]; !registered {
|
||||
return fmt.Errorf("type %v is not registered for %q and it will be impossible to Decode it, therefore Encode will refuse to encode it.", v.Type(), destVersion)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user