https://github.com/cheerego/nginx-reloader
k8s nginx hot reload k8s nginx 热更新、原地更新配置
https://github.com/cheerego/nginx-reloader
hot hot-reload hot-reloader k8s nginx reload reloader
Last synced: 7 months ago
JSON representation
k8s nginx hot reload k8s nginx 热更新、原地更新配置
- Host: GitHub
- URL: https://github.com/cheerego/nginx-reloader
- Owner: cheerego
- Created: 2025-01-22T02:54:40.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-02-10T12:15:51.000Z (8 months ago)
- Last Synced: 2025-02-10T13:25:13.577Z (8 months ago)
- Topics: hot, hot-reload, hot-reloader, k8s, nginx, reload, reloader
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# K8S Nginx Hot Reloader
## Know-Why
* [share-process-namespace](https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/)
* Processes are visible to other containers in the pod.
* Container filesystems are visible to other containers in the pod through the `/proc/$pid/root` link.
* SideCar Container
* Go program
* kill -HUP pid.
* Watch nginx config dirs.
* Event debounce.
* [configmap updated automatically](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically)## How-Use
* example [nginx-reloader.yml](https://github.com/cheerego/nginx-reloader/blob/master/nginx-reloader.yml)
* enable shareProcessNamespace
* TIME_AFTER_SECONDS, Event debounce default second.
* WATCH_DIRS, split by comma, like `/etc/nginx,/etc/nginx/conf.d`