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

@@ -44,6 +44,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
utilfeature "k8s.io/apiserver/pkg/util/feature"
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
clientv1 "k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/clock"
@@ -401,7 +402,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub
// TODO: get the real node object of ourself,
// and use the real node name and UID.
// TODO: what is namespace for node?
nodeRef := &v1.ObjectReference{
nodeRef := &clientv1.ObjectReference{
Kind: "Node",
Name: string(nodeName),
UID: types.UID(nodeName),
@@ -923,7 +924,7 @@ type Kubelet struct {
autoDetectCloudProvider bool
// Reference to this node.
nodeRef *v1.ObjectReference
nodeRef *clientv1.ObjectReference
// Container runtime.
containerRuntime kubecontainer.Runtime