Commit 604e0ad3 authored by Federico Simoncelli's avatar Federico Simoncelli

kubelet: move getNodeReference logic into a function

parent 7bbf526a
......@@ -1996,19 +1996,22 @@ func (kl *Kubelet) PortForward(podFullName string, uid types.UID, port uint16, s
return kl.runner.PortForward(podInfraContainer.ID, port, stream)
}
// BirthCry sends an event that the kubelet has started up.
func (kl *Kubelet) BirthCry() {
// Make an event that kubelet restarted.
// TODO: get the real minion object of ourself,
func (kl *Kubelet) getNodeReference() *api.ObjectReference {
// and use the real minion name and UID.
// TODO: what is namespace for node?
ref := &api.ObjectReference{
return &api.ObjectReference{
Kind: "Node",
Name: kl.hostname,
UID: types.UID(kl.hostname),
Namespace: "",
}
kl.recorder.Eventf(ref, "starting", "Starting kubelet.")
}
// BirthCry sends an event that the kubelet has started up.
func (kl *Kubelet) BirthCry() {
// Make an event that kubelet restarted.
// TODO: get the real minion object of ourself,
kl.recorder.Eventf(kl.getNodeReference(), "starting", "Starting kubelet.")
}
func (kl *Kubelet) StreamingConnectionIdleTimeout() time.Duration {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment