bootstrap ircs-prod gitops config
This commit is contained in:
@@ -0,0 +1,468 @@
|
||||
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;
|
||||
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;
|
||||
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: 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
|
||||
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
|
||||
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: "bff-20260606-1"
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-secret
|
||||
containers:
|
||||
- name: huawai
|
||||
image: harbor.mnnu.eu.org/ircs/huawai@sha256:a411c3498cd2871093953b570616a6e89b3f0d1621308e175692dffd109b2751
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
env:
|
||||
- name: BACKEND_URL
|
||||
value: http://ircs-frontend-gateway.ircs-prod.svc.cluster.local:80
|
||||
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: harbor-secret
|
||||
containers:
|
||||
- name: ircs-admin-frontend
|
||||
image: harbor.mnnu.eu.org/ircs/ircs-frontend@sha256:132b7d3bb073734ab8072769521e94885b25f8e9e319253e7c1c433d87c91302
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
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
|
||||
---
|
||||
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: "bff-20260606-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
|
||||
|
||||
Reference in New Issue
Block a user