https://github.com/zachomedia/kubernetes-sidecar-terminator
Monitor Kubernetes pods created by jobs and terminate the sidecars when the job completes
https://github.com/zachomedia/kubernetes-sidecar-terminator
Last synced: 11 months ago
JSON representation
Monitor Kubernetes pods created by jobs and terminate the sidecars when the job completes
- Host: GitHub
- URL: https://github.com/zachomedia/kubernetes-sidecar-terminator
- Owner: zachomedia
- License: mit
- Created: 2019-08-03T23:08:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-26T21:35:55.000Z (over 2 years ago)
- Last Synced: 2025-04-22T12:29:18.874Z (about 1 year ago)
- Language: Go
- Size: 52.7 KB
- Stars: 16
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Why does this exist?
Currently there is an issue when using sidecars (like istio-proxy)
with jobs - they don't exit when the job has completed.
This project will monitor those pods and then send a `kill` signal to the
sidecar containers causing them to exit and the job to be marked
as succeeded.
## How does it work?
It will monitor all pods in the cluster, and terminate the sidecars
if the following criteria has been met:
1. The pod was created by a job
2. The pod's non-sidecar containers have exited with exit code 0
Terminate occurs by executing into the sidecar container and
running `kill 1`.
## Getting started
1. `git clone https://github.com/zachomedia/kubernetes-sidecar-terminator.git`
2. `kubectl apply -f manifests/`