{"repo":"xing/kubernetes-oom-event-generator","free":true,"listed":false,"github":"https://github.com/xing/kubernetes-oom-event-generator","clone":"git clone https://github.com/xing/kubernetes-oom-event-generator.git","description":"Generate a Kubernetes Event when a Pod's container has been OOMKilled","language":"Go","stars":171,"topics":["kubernetes","k8s","events","monitoring","prometheus-metrics","prometheus","olympus"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"kubernetes-oom-event-generator Generates Kubernetes Event when a container is starting and indicates that it was previously out-of-memory killed. Design The Controller listens to the Kubernetes API for new Events and changes to Events. Every time a notification regarding an Event is received it checks whether this Event refers to a \"ContainerStarted\" event, based on the Reason for the Event and the Kind of the involved object. If this is the case and the Event constitutes a change (meaning it is not a not-changing update, which happens when the resync, that is executed every two minutes, is run) it checks the underlying Pod resource. Should the LastTerminationState of the Pod refer to an OOM kill the controller will emit a Kubernetes Event with a level of Warning and a reason of PreviousContainerWasOOMKilled . Usage Usage: kubernetes-oom-event-generator [OPTIONS] Application Options: -v, --verbose= Show verbose debug information [$VERBOSE] --version Print version information Help Options: -h, --help Show this help message Run the pre-built image [ ghcr.io/xing/kubernetes-oom-event-generator ] locally (with local permission): echo VERBOSE=2 .env docker run --env-file=.env -v $HOME/.kube/config:/root/.kube/config ghcr.io/xing/kubernetes-oom-event-generator Deployment Example ClusterRole: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: xing:controller:kubernetes-oom-event-generator rules: - apiGroups: - \"\" resources: - pods - pods/status verbs: - g","default_branch":null,"files":null,"tree":[],"storefront":"/r/xing","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xing/kubernetes-oom-event-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}