Files
ircs-prod-config/ircs-prod/core/manifests/frontend-portal-admin.yaml
T
2026-06-15 12:00:07 +00:00

536 lines
13 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: ircs-frontend-gateway-nginx
namespace: ircs-prod
labels:
app.kubernetes.io/part-of: ircs
environment: prod
data:
default.conf: |
upstream portal_frontend {
server ircs-portal-frontend.ircs-prod.svc.cluster.local:3000;
}
upstream admin_frontend {
server ircs-admin-frontend.ircs-prod.svc.cluster.local:80;
}
upstream portal_bff {
server ircs-portal-bff.ircs-prod.svc.cluster.local:8080;
}
upstream admin_bff {
server ircs-admin-bff.ircs-prod.svc.cluster.local:8080;
}
server {
listen 80;
listen [::]:80;
server_name _;
client_max_body_size 50m;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
location = /gateway-health {
access_log off;
return 204;
}
location ^~ /api/backend {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal/auth {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal/profile {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal/interaction {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal/feedback {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal/search {
proxy_pass http://portal_bff;
}
location ^~ /api/backend/api/portal {
proxy_pass http://portal_bff;
}
location ^~ /api/portal/auth {
proxy_pass http://portal_bff;
}
location ^~ /api/portal/profile {
proxy_pass http://portal_bff;
}
location ^~ /api/portal/interaction {
proxy_pass http://portal_bff;
}
location ^~ /api/portal/feedback {
proxy_pass http://portal_bff;
}
location ^~ /api/portal/search {
proxy_pass http://portal_bff;
}
location ^~ /api/portal {
proxy_pass http://portal_bff;
}
location ^~ /media {
proxy_pass http://portal_bff;
}
location / {
proxy_pass http://portal_frontend;
}
}
server {
listen 8080;
listen [::]:8080;
server_name _;
client_max_body_size 50m;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
location = /gateway-health {
access_log off;
return 204;
}
location ^~ /api/v1 {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/auth {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/members {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/dashboard {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/ops {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/raw-videos {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/unified-videos {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/playlists {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/cover-images {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/collection-tasks {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/catalog {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/standard- {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/raw- {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/data-sources {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/configs {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/common {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/credentials {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/magnet-providers {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/magnets {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/scraper/manual {
proxy_pass http://admin_bff;
}
location ^~ /api/v1/messages {
proxy_pass http://admin_bff;
}
location ^~ /media {
proxy_pass http://admin_bff;
}
location / {
proxy_pass http://admin_frontend;
}
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ircs-admin-frontend-nginx
namespace: ircs-prod
labels:
app.kubernetes.io/part-of: ircs
environment: prod
data:
default.conf: |
server {
listen 80;
listen [::]:80;
server_name localhost;
gzip on;
gzip_min_length 1k;
gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/json;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://ircs-admin-bff.ircs-prod.svc.cluster.local:8080/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
location /media/ {
proxy_pass http://ircs-admin-bff.ircs-prod.svc.cluster.local:8080/media/;
}
}
---
apiVersion: v1
kind: Service
metadata:
name: ircs-portal-frontend
namespace: ircs-prod
labels:
app: ircs-portal-frontend
app.kubernetes.io/part-of: ircs
environment: prod
spec:
type: ClusterIP
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
selector:
app: ircs-portal-frontend
ports:
- name: http
protocol: TCP
port: 3000
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: ircs-admin-frontend
namespace: ircs-prod
labels:
app: ircs-admin-frontend
app.kubernetes.io/part-of: ircs
environment: prod
spec:
type: ClusterIP
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
selector:
app: ircs-admin-frontend
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: ircs-frontend-gateway
namespace: ircs-prod
labels:
app: ircs-frontend-gateway
app.kubernetes.io/part-of: ircs
environment: prod
spec:
type: ClusterIP
selector:
app: ircs-frontend-gateway
ports:
- name: portal
protocol: TCP
port: 80
targetPort: portal
- name: admin
protocol: TCP
port: 8080
targetPort: admin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-portal-frontend
namespace: ircs-prod
labels:
app: ircs-portal-frontend
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-portal-frontend
template:
metadata:
labels:
app: ircs-portal-frontend
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
ircs.prodigalgal.com/config-version: "ipv6-listen-20260615-1"
spec:
imagePullSecrets:
- name: registry-secret
containers:
- name: huawai
image: registry.mnnu.eu.org/ircs/ircs-huawai-frontend:sha-2a6e6abf77b2
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
env:
- name: BACKEND_URL
value: http://ircs-frontend-gateway.ircs-prod.svc.cluster.local:80
- name: HOSTNAME
value: "::"
resources:
requests:
cpu: 25m
memory: 192Mi
limits:
cpu: 250m
memory: 512Mi
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 3
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-admin-frontend
namespace: ircs-prod
labels:
app: ircs-admin-frontend
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-admin-frontend
template:
metadata:
labels:
app: ircs-admin-frontend
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
spec:
imagePullSecrets:
- name: registry-secret
containers:
- name: ircs-admin-frontend
image: registry.mnnu.eu.org/ircs/ircs-admin-frontend:sha-1bdd25fee772
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
readinessProbe:
httpGet:
path: /login
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 20
periodSeconds: 20
timeoutSeconds: 3
volumes:
- name: nginx-config
configMap:
name: ircs-admin-frontend-nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-frontend-gateway
namespace: ircs-prod
labels:
app: ircs-frontend-gateway
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-frontend-gateway
template:
metadata:
labels:
app: ircs-frontend-gateway
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
ircs.prodigalgal.com/config-version: "ipv6-listen-20260615-1"
spec:
containers:
- name: nginx
image: nginx:1.25-alpine
imagePullPolicy: IfNotPresent
ports:
- name: portal
containerPort: 80
- name: admin
containerPort: 8080
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d
readOnly: true
readinessProbe:
httpGet:
path: /gateway-health
port: portal
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /gateway-health
port: portal
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
volumes:
- name: nginx-config
configMap:
name: ircs-frontend-gateway-nginx