mirror of https://github.com/k3s-io/k3s
Record event of kubelet restart re: minion obj.
parent
4a21dbbb0a
commit
08c8f2cde1
|
@ -188,6 +188,9 @@ func main() {
|
|||
*registryBurst,
|
||||
*minimumGCAge,
|
||||
*maxContainerCount)
|
||||
|
||||
k.BirthCry()
|
||||
|
||||
go func() {
|
||||
util.Forever(func() {
|
||||
err := k.GarbageCollectContainers()
|
||||
|
|
|
@ -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.")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue