mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #39116 from caesarxuchao/fix-event-expansion
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240) core/v1/event_expansion.go use v1.GetReference Fix https://github.com/kubernetes/client-go/issues/47.
This commit is contained in:
		@@ -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
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user