https://github.com/stenic/k8srestart
Restart pods after a set amount of time
https://github.com/stenic/k8srestart
kubernetes lifecycle pod
Last synced: 6 months ago
JSON representation
Restart pods after a set amount of time
- Host: GitHub
- URL: https://github.com/stenic/k8srestart
- Owner: stenic
- License: other
- Created: 2022-05-29T14:00:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T07:25:15.000Z (about 4 years ago)
- Last Synced: 2024-11-22T01:09:25.893Z (over 1 year ago)
- Topics: kubernetes, lifecycle, pod
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# K8sRestart
[](https://github.com/stenic/k8srestart/actions/workflows/release.yaml)
[](https://artifacthub.io/packages/search?repo=k8srestart)
k8srestart restarts pods and deployments after a set amount of time.
## Behaviour
`pods` will be deleted once the time has past.
`deployments` will be triggered as a `rollout` and will restart following the deployment specifications.
## Installation
```sh
helm repo add k8srestart https://stenic.github.io/k8srestart/
helm install k8srestart --namespace mynamespace k8srestart/k8srestart
```
## Annotations
You can add these Kubernetes annotations to specific service objects to customize k8srestart's behaviour.
`k8srestart.stenic.io/restartAfter`
(string) Amount of seconds after which the pod/deployment will restart.
## Build & run
```
docker build -t k8srestart .
docker run -ti -p 8080:8080 -v ~/.kube:/home/nonroot/.kube k8srestart --interval=5 -v=2
```