An open API service indexing awesome lists of open source software.

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 热更新、原地更新配置

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`