remove dependency on apimachinery from gvk package

This commit is contained in:
Jingfang Liu
2018-10-09 16:25:15 -07:00
parent 1e04a0e943
commit 4c7b63a215
3 changed files with 19 additions and 22 deletions

View File

@@ -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"