Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kostiantyn-matsebora/helm-k8s-deployment-restarter
Restarts kubernetes deployment resource by schedule.
https://github.com/kostiantyn-matsebora/helm-k8s-deployment-restarter
cron cronjob cronjobs crontab deployments helm helm-chart kuberentes restart statefulset
Last synced: about 1 month ago
JSON representation
Restarts kubernetes deployment resource by schedule.
- Host: GitHub
- URL: https://github.com/kostiantyn-matsebora/helm-k8s-deployment-restarter
- Owner: kostiantyn-matsebora
- License: mit
- Created: 2024-01-31T15:35:03.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-09-16T15:04:47.000Z (3 months ago)
- Last Synced: 2024-09-17T17:35:29.724Z (3 months ago)
- Topics: cron, cronjob, cronjobs, crontab, deployments, helm, helm-chart, kuberentes, restart, statefulset
- Language: Smarty
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k8s deployment restarter
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kostiantyn-matsebora_helm-k8s-deployment-restarter&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kostiantyn-matsebora_helm-k8s-deployment-restarter)
Helm chart for restarting kubernetes deployment resource by schedule.
Supports two strategies:
* `restart` - using `kubectl` command `kubectl rollout restart deployment/daemonset`, supports deployments and daemonsets.
* `scaleDownUp` - scales down to zero and up to particular number of replicas, could be useful when destroying pod also requires release of some resources (for instance mounted volumes), supports deployments only.## Configuration
```yaml
restart:
- name: deployments-to-restart # name of batch
schedule: "7 */3 * * *" # cron schedule definition
deployments: # list of deployments needs to be restarted
- nginx-ingress
- oauth2-proxy
daemonSets: [] # list of daemonSets needs to be restartedscaleDownUp:
- name: deployments-to-scaledownup # name of batch
schedule: "7 */3 * * *" # cron schedule definition
sleepPeriodInSeconds: 30 # sleep period in seconds between scaling down and scaling up
deployments: # list of deployments needs to be restarted
- name: nginx-ingress # name of deployment resource
replicas: 1 # replicas number
- name: oauth2-proxy
replicas: 2
```## Usage
Add helm [repository](https://kostiantyn-matsebora.github.io/helm-charts/) first:
```bash
helm repo add kostiantyn-matsebora https://kostiantyn-matsebora.github.io/helm-charts/
```Install/upgrade helm chart using your custom values:
```bash
helm upgrade oauth2-proxy kostiantyn-matsebora/k8-deployment-restarter --install --values ./custom-values.yaml```
## Contributing
If you experience any issues, have a question or a suggestion, or if you wish
to contribute, feel free to [open an issue][issues] or
[start a discussion][discussions].[issues]: https://github.com/kostiantyn-matsebora/helm-k8s-deployment-restarter/issues
[discussions]: https://github.com/helm-k8s-deployment-restarter/discussions## License