• k8s-merge-robot's avatar
    Merge pull request #25018 from smarterclayton/fast_conversion · 5c30f983
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    Reduce allocations during conversion, enable new UnsafeConvertToVersion path
    
    Cleans up the conversion path to avoid a few unnecessary allocations, then creates a new UnsafeConvertToVersion path that will allow encode/decode to bypass copying the object for performance. In that subsequent PR, ConvertToVersion will start to call Copy() and we will refactor conversions to reuse as much of the existing object as possible.
    
    Also changes the unversioned.ObjectKind signature to not require allocations - speeds up a few common paths.
    5c30f983
validation.go 123 KB