Use NewLenientSchemeAndCodec function provided in k8s.io/component-base/codec instead of private package function.