diff --git a/examples/in-cluster/main.go b/examples/in-cluster/main.go index 04b0798e..1c14c65e 100644 --- a/examples/in-cluster/main.go +++ b/examples/in-cluster/main.go @@ -20,8 +20,8 @@ import ( "fmt" "time" + "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/rest" ) diff --git a/examples/out-of-cluster/main.go b/examples/out-of-cluster/main.go index 7919d927..354fa57c 100644 --- a/examples/out-of-cluster/main.go +++ b/examples/out-of-cluster/main.go @@ -21,8 +21,8 @@ import ( "fmt" "time" + "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/tools/clientcmd" ) diff --git a/examples/third-party-resources/main.go b/examples/third-party-resources/main.go index 6222dd68..63d0897c 100644 --- a/examples/third-party-resources/main.go +++ b/examples/third-party-resources/main.go @@ -4,15 +4,14 @@ import ( "flag" "fmt" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/client-go/kubernetes" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/pkg/apis/extensions/v1beta1" - metav1 "k8s.io/client-go/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/runtime" - "k8s.io/client-go/pkg/runtime/schema" - "k8s.io/client-go/pkg/runtime/serializer" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -44,7 +43,7 @@ func main() { if err != nil { if errors.IsNotFound(err) { tpr := &v1beta1.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "example.k8s.io", }, Versions: []v1beta1.APIVersion{ diff --git a/examples/third-party-resources/types.go b/examples/third-party-resources/types.go index f4e75b67..8545ee93 100644 --- a/examples/third-party-resources/types.go +++ b/examples/third-party-resources/types.go @@ -3,10 +3,9 @@ package main import ( "encoding/json" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/meta" - metav1 "k8s.io/client-go/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/runtime/schema" ) type ExampleSpec struct { @@ -34,7 +33,7 @@ func (e *Example) GetObjectKind() schema.ObjectKind { } // Required to satisfy ObjectMetaAccessor interface -func (e *Example) GetObjectMeta() meta.Object { +func (e *Example) GetObjectMeta() *api.ObjectMeta { return &e.Metadata }