Compare commits

..
3 Commits
Author SHA1 Message Date
pi-ux-ce dd4b8df134 remove random.conf as not sure why it's there in the first place
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 40s
2026-03-13 10:24:41 +00:00
pi-ux-ce ffb076cf47 removing geoip as built inside the image 2026-03-13 10:23:49 +00:00
pi-ux-ce ceb7fb6479 building a sidecar to watch the blacklisted file 2026-03-13 10:21:51 +00:00
2 changed files with 19 additions and 6 deletions
+19 -5
View File
@@ -21,6 +21,8 @@ spec:
app: reverse-proxy app: reverse-proxy
spec: spec:
nodeName: kube-master nodeName: kube-master
# Allows the sidecar to see and signal the Nginx process
shareProcessNamespace: true
containers: containers:
#- image: nginx:alpine #- image: nginx:alpine
- image: gitea.tryton.geeraert.eu/pi-ux-ce/geoip2-nginx:1.29.6 - image: gitea.tryton.geeraert.eu/pi-ux-ce/geoip2-nginx:1.29.6
@@ -42,8 +44,6 @@ spec:
mountPath: /etc/nginx/deny.d/ mountPath: /etc/nginx/deny.d/
- name: blacklisted-sessions-map - name: blacklisted-sessions-map
mountPath: /etc/nginx/blacklisted.d/ mountPath: /etc/nginx/blacklisted.d/
- name: reverse-proxy-geoip
mountPath: /etc/nginx/geoip.d/
- name: reverse-proxy-ssl - name: reverse-proxy-ssl
mountPath: /etc/nginx/ssl/ mountPath: /etc/nginx/ssl/
- mountPath: /etc/nginx/ - mountPath: /etc/nginx/
@@ -56,6 +56,23 @@ spec:
limits: limits:
cpu: 250m cpu: 250m
memory: 250Mi memory: 250Mi
- name: sidecar-watcher
image: alpine:latest
command: ["/bin/sh", "-c"]
args:
- |
apk add --no-cache inotify-tools;
echo "Watcher started..."
while inotifywait -e close_write /etc/nginx/blacklisted.d/blacklisted-sessions.conf; do
echo "Change detected in deny.conf, reloading Nginx..."
# Find the Nginx master process and send SIGHUP (reload)
pkill -HUP nginx
done
volumeMounts:
- name: blacklisted-sessions-map
mountPath: /etc/nginx/blacklisted.d/
volumes: volumes:
- name: reverse-proxy-log - name: reverse-proxy-log
persistentVolumeClaim: persistentVolumeClaim:
@@ -63,9 +80,6 @@ spec:
- name: reverse-proxy-ssl - name: reverse-proxy-ssl
hostPath: hostPath:
path: /opt/kubernetes/Reverse_proxy_Nginx/certbot/conf/ path: /opt/kubernetes/Reverse_proxy_Nginx/certbot/conf/
- name: reverse-proxy-geoip
hostPath:
path: /opt/kubernetes/Reverse_proxy_Nginx/geoip
- name: nginx-configfile - name: nginx-configfile
configMap: configMap:
name: nginx-config name: nginx-config
-1
View File
@@ -1 +0,0 @@
#