mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
remove dependency on apimachinery from gvk package
This commit is contained in:
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package gvk
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -36,24 +35,6 @@ func FromKind(k string) Gvk {
|
||||
}
|
||||
}
|
||||
|
||||
// FromSchemaGvk converts from a schema.GroupVersionKind.
|
||||
func FromSchemaGvk(x schema.GroupVersionKind) Gvk {
|
||||
return Gvk{
|
||||
Group: x.Group,
|
||||
Version: x.Version,
|
||||
Kind: x.Kind,
|
||||
}
|
||||
}
|
||||
|
||||
// ToSchemaGvk converts to a schema.GroupVersionKind.
|
||||
func (x Gvk) ToSchemaGvk() schema.GroupVersionKind {
|
||||
return schema.GroupVersionKind{
|
||||
Group: x.Group,
|
||||
Version: x.Version,
|
||||
Kind: x.Kind,
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
noGroup = "noGroup"
|
||||
noVersion = "noVersion"
|
||||
|
||||
Reference in New Issue
Block a user