mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #2267 from erictune/kubelet_events
Kubelet event on restart.
This commit is contained in:
commit
b6f68988ed
@ -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
Block a user