Record event of kubelet restart re: minion obj.

pull/6/head
Eric Tune 2014-11-10 13:13:57 -08:00
parent 4a21dbbb0a
commit 08c8f2cde1
2 changed files with 16 additions and 0 deletions

View File

@ -188,6 +188,9 @@ func main() {
*registryBurst,
*minimumGCAge,
*maxContainerCount)
k.BirthCry()
go func() {
util.Forever(func() {
err := k.GarbageCollectContainers()

View File

@ -998,3 +998,16 @@ func (kl *Kubelet) RunInContainer(podFullName, uuid, container string, cmd []str
}
return kl.runner.RunInContainer(dockerContainer.ID, cmd)
}
// 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,
// and use the real minion name and UID.
ref := &api.ObjectReference{
Kind: "Minion",
Name: kl.hostname,
UID: kl.hostname,
}
record.Eventf(ref, "", "starting", "Starting kubelet.")
}