docs/enhancements/20231001-split-containers.md
All the NGINX files should live on one container
All the controller files should live on a different container
Inside nginx container, there should be a really small http listener just able to start, stop and reload NGINX
kind: Pod
apiVersion: v1
metadata:
name: test
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
- name: othernginx
image: alpine:latest
command: ["/bin/sh"]
args: ["-c", "while true; do date; sleep 3; done"]
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: emptysecret
volumes:
- name: emptysecret
emptyDir:
sizeLimit: 1Mi
WARNING We need to be aware of inter mount containers and inode problems. If we mount a file instead of a directory, it may take time to reflect the file value on the target container
ngx_http_auth_digest_module.so ngx_http_modsecurity_module.so
ngx_http_brotli_filter_module.so ngx_http_opentracing_module.so
ngx_http_brotli_static_module.so ngx_stream_geoip2_module.so
ngx_http_geoip2_module.so
-rw-r--r-- 1 www-data www-data 1077 Jun 23 19:44 fastcgi.conf
-rw-r--r-- 1 www-data www-data 1077 Jun 23 19:44 fastcgi.conf.default
-rw-r--r-- 1 www-data www-data 1007 Jun 23 19:44 fastcgi_params
-rw-r--r-- 1 www-data www-data 1007 Jun 23 19:44 fastcgi_params.default
drwxr-xr-x 2 www-data www-data 4096 Jun 23 19:34 geoip
-rw-r--r-- 1 www-data www-data 2837 Jun 23 19:44 koi-utf
-rw-r--r-- 1 www-data www-data 2223 Jun 23 19:44 koi-win
drwxr-xr-x 6 www-data www-data 4096 Sep 19 14:13 lua
-rw-r--r-- 1 www-data www-data 5349 Jun 23 19:44 mime.types
-rw-r--r-- 1 www-data www-data 5349 Jun 23 19:44 mime.types.default
drwxr-xr-x 2 www-data www-data 4096 Jun 23 19:44 modsecurity
drwxr-xr-x 2 www-data www-data 4096 Jun 23 19:44 modules
-rw-r--r-- 1 www-data www-data 18275 Oct 1 21:28 nginx.conf
-rw-r--r-- 1 www-data www-data 2656 Jun 23 19:44 nginx.conf.default
-rwx------ 1 www-data www-data 420 Oct 1 21:28 opentelemetry.toml
-rw-r--r-- 1 www-data www-data 2 Oct 1 21:28 opentracing.json
drwxr-xr-x 7 www-data www-data 4096 Jun 23 19:44 owasp-modsecurity-crs
-rw-r--r-- 1 www-data www-data 636 Jun 23 19:44 scgi_params
-rw-r--r-- 1 www-data www-data 636 Jun 23 19:44 scgi_params.default
drwxr-xr-x 2 www-data www-data 4096 Sep 19 14:13 template
-rw-r--r-- 1 www-data www-data 664 Jun 23 19:44 uwsgi_params
-rw-r--r-- 1 www-data www-data 664 Jun 23 19:44 uwsgi_params.default
-rw-r--r-- 1 www-data www-data 3610 Jun 23 19:44 win-utf