fix: envoy-gateway migration

This commit is contained in:
auricom
2025-08-19 09:08:41 +02:00
parent 539ec1b7db
commit 6db214c211
81 changed files with 554 additions and 299 deletions

View File

@@ -3,18 +3,30 @@ events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include mime.types;
server {
listen 8080;
listen 8080 default_server;
listen [::]:8080 default_server;
server_name _;
client_max_body_size 128M;
# serve media files
location /media/ {
alias /media/;
}
# serve static files
location /static/ {
alias /static/;
}
# serve media files
location /media/ {
alias /media//;
}
# pass requests for dynamic content to gunicorn
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:8888;
}
}
}

View File

@@ -46,7 +46,6 @@ spec:
source /opt/recipes/venv/bin/activate
echo "Updating database"
python3 /opt/recipes/manage.py migrate
python3 /opt/recipes/manage.py collectstatic_js_reverse
python3 /opt/recipes/manage.py collectstatic --noinput
containers:
app:
@@ -59,7 +58,7 @@ spec:
ALLOWED_HOSTS: "*"
GUNICORN_MEDIA: "0"
TZ: ${TIMEZONE}
TANDOOR_PORT: &port 8888
TANDOOR_PORT: &tandoorPort 8888
FRACTION_PREF_DEFAULT: "0"
COMMENT_PREF_DEFAULT: "1"
SHOPPING_MIN_AUTOSYNC_INTERVAL: "5"
@@ -74,6 +73,28 @@ spec:
- --log-level
- INFO
- recipes.wsgi
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /accounts/login/
port: *tandoorPort
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: true
custom: true
spec:
httpGet:
path: /accounts/login/
port: *tandoorPort
failureThreshold: 30
periodSeconds: 10
resources:
requests:
cpu: 100m
@@ -89,41 +110,21 @@ spec:
controller: *app
ports:
http:
port: *port
port: *tandoorPort
nginx:
port: &port2 8080
ingress:
port: &nginxPort 8080
route:
app:
enabled: true
className: internal
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/name: Tandoor
gethomepage.dev/description: Managing recipes, planned meals, shopping lists.
gethomepage.dev/group: Applications
gethomepage.dev/icon: tandoor.png
gethomepage.dev/pod-selector: >-
app in (
tandoor
)
hosts:
- host: &host "{{ .Release.Name }}.${SECRET_EXTERNAL_DOMAIN}"
paths:
- path: /
service:
identifier: app
port: http
- path: /media
service:
identifier: app
port: *port2
- path: /static
service:
identifier: app
port: *port2
tls:
- hosts:
- *host
hostnames:
- "{{ .Release.Name }}.${SECRET_EXTERNAL_DOMAIN}"
parentRefs:
- name: internal
namespace: network
sectionName: https
rules:
- backendRefs:
- name: *app
port: *nginxPort
persistence:
config:
existingClaim: *app