mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
When explicitly converting two objects, allow names to differ
This commit is contained in:
parent
f3ad102fa6
commit
ad92ff6952
@ -208,7 +208,7 @@ func (s *Scheme) Convert(in, out interface{}) error {
|
|||||||
if v, _, err := s.ObjectVersionAndKind(out); err == nil {
|
if v, _, err := s.ObjectVersionAndKind(out); err == nil {
|
||||||
outVersion = v
|
outVersion = v
|
||||||
}
|
}
|
||||||
return s.converter.Convert(in, out, 0, s.generateConvertMeta(inVersion, outVersion))
|
return s.converter.Convert(in, out, AllowDifferentFieldTypeNames, s.generateConvertMeta(inVersion, outVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConvertToVersion attempts to convert an input object to its matching Kind in another
|
// ConvertToVersion attempts to convert an input object to its matching Kind in another
|
||||||
|
Loading…
Reference in New Issue
Block a user