should use v1.GetReference
This commit is contained in:
parent
03837fe607
commit
ec00f67ab3
@ -23,7 +23,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
||||
@ -100,7 +99,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte)
|
||||
// object must match this event's client namespace unless the event client
|
||||
// was made with the "" namespace.
|
||||
func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
ref, err := api.GetReference(scheme, objOrRef)
|
||||
ref, err := v1.GetReference(scheme, objOrRef)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/client-go/pkg/api/v1"
|
||||
)
|
||||
|
||||
@ -100,7 +99,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte)
|
||||
// object must match this event's client namespace unless the event client
|
||||
// was made with the "" namespace.
|
||||
func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
ref, err := api.GetReference(scheme, objOrRef)
|
||||
ref, err := v1.GetReference(scheme, objOrRef)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user