switch kubelet to use external (client-go) object references for events

This commit is contained in:
deads2k
2017-01-31 15:59:22 -05:00
committed by David Eads
parent 8a12000402
commit a106d9f848
16 changed files with 65 additions and 19 deletions

View File

@@ -25,6 +25,7 @@ import (
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
clientv1 "k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/clock"
utiltesting "k8s.io/client-go/util/testing"
@@ -114,7 +115,7 @@ func TestRunOnce(t *testing.T) {
// TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency
volumeStatsAggPeriod := time.Second * 10
kb.resourceAnalyzer = stats.NewResourceAnalyzer(kb, volumeStatsAggPeriod, kb.containerRuntime)
nodeRef := &v1.ObjectReference{
nodeRef := &clientv1.ObjectReference{
Kind: "Node",
Name: string(kb.nodeName),
UID: types.UID(kb.nodeName),