Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace event related code with Kube's EventRecorder #115

Merged
merged 1 commit into from
Nov 27, 2018
Merged

Conversation

linki
Copy link
Owner

@linki linki commented Nov 27, 2018

Replaces the feature of exporting events from #105 to use Kubernetes' EventRecorder.

With this:

  • exporting events is enabled by default and cannot be turned off
  • events are attached to the Pod being killed as opposed to the namespace it's in
    • kubectl get events can be used to show the events, see line four below.
$ kubectl get events
LAST SEEN   FIRST SEEN   COUNT     NAME                                              KIND         SUBOBJECT                 TYPE      REASON             SOURCE                                            MESSAGE
2m          2m           1         tiller-deploy-557f85548b-7x9dj.156afef7a3d9f6ef   Pod                                    Normal    Scheduled          default-scheduler                                 Successfully assigned tiller/tiller-deploy-557f85548b-7x9dj to gke-kube-1-standard-2-f6b46c2f-rgdc
2m          2m           1         tiller-deploy-557f85548b.156afef7a2c8b563         ReplicaSet                             Normal    SuccessfulCreate   replicaset-controller                             Created pod: tiller-deploy-557f85548b-7x9dj
2m          2m           1         tiller-deploy-557f85548b-g959l.156afef79c8e201e   Pod                                    Normal    Killing            chaoskube                                         Pod was deleted by chaoskube to introduce chaos.
2m          2m           1         tiller-deploy-557f85548b-g959l.156afef7ae0fa311   Pod          spec.containers{tiller}   Normal    Killing            kubelet, gke-kube-1-preemptible-1-00495950-m0rn   Killing container with id containerd://tiller:Need to kill Pod
2m          2m           1         tiller-deploy-557f85548b-7x9dj.156afef7c9b8e373   Pod          spec.containers{tiller}   Normal    Pulling            kubelet, gke-kube-1-standard-2-f6b46c2f-rgdc      pulling image "gcr.io/kubernetes-helm/tiller:v2.11.0"
2m          2m           1         tiller-deploy-557f85548b-7x9dj.156afef8baf24730   Pod          spec.containers{tiller}   Normal    Pulled             kubelet, gke-kube-1-standard-2-f6b46c2f-rgdc      Successfully pulled image "gcr.io/kubernetes-helm/tiller:v2.11.0"
2m          2m           1         tiller-deploy-557f85548b-7x9dj.156afef8bd854438   Pod          spec.containers{tiller}   Normal    Created            kubelet, gke-kube-1-standard-2-f6b46c2f-rgdc      Created container
2m          2m           1         tiller-deploy-557f85548b-7x9dj.156afef93f11e4ec   Pod          spec.containers{tiller}   Normal    Started            kubelet, gke-kube-1-standard-2-f6b46c2f-rgdc      Started container

@linki
Copy link
Owner Author

linki commented Nov 27, 2018

@djboris9 @ghouscht @se7enack This changes #105 to enable exporting events by default and changes where they are attached to (the source). Let me know what you think about it.

@linki linki merged commit e26dbd6 into master Nov 27, 2018
@linki linki deleted the event-recorder branch November 27, 2018 21:16
@djboris9
Copy link
Contributor

@linki Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants