mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
23 lines
747 B
Go
23 lines
747 B
Go
package fieldmanager
|
|
|
|
/*
|
|
In order to keep maintenance as minimal as possible the borrowed
|
|
files in this package are verbatim copy from Kubernetes. The
|
|
private objects that need to be exposed are wrapped and exposed
|
|
in this file.
|
|
*/
|
|
|
|
import (
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
"k8s.io/apimachinery/pkg/util/managedfields"
|
|
"sigs.k8s.io/structured-merge-diff/v6/merge"
|
|
)
|
|
|
|
// NewVersionConverter will expose the version converter from the
|
|
// borrowed private function from k8s apiserver handler.
|
|
func NewVersionConverter(gvkParser *managedfields.GvkParser, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter {
|
|
tc := &typeConverter{parser: gvkParser}
|
|
return newVersionConverter(tc, o, h)
|
|
}
|