fix: proxy dashboard visual api compatibility paths
This commit is contained in:
parent
6b4414e4be
commit
c145e396d1
@ -1,3 +1,64 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: imes-basic-dashboard-nginx-conf
|
||||
namespace: prd
|
||||
data:
|
||||
web.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 4;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/xml text/css application/json application/javascript;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
||||
client_max_body_size "100M";
|
||||
|
||||
root /app/www;
|
||||
|
||||
location / {
|
||||
root /app/www;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /api/visual-global/list {
|
||||
proxy_redirect off;
|
||||
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_pass http://mom-gateway:9999/rpt/dashboard/visual/list;
|
||||
}
|
||||
|
||||
location = /api/visual/detail {
|
||||
proxy_redirect off;
|
||||
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_pass http://mom-gateway:9999/rpt/dashboard/visual/detail;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_redirect off;
|
||||
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_pass http://192.168.100.7:10002/;
|
||||
}
|
||||
|
||||
location /oss/ {
|
||||
proxy_redirect off;
|
||||
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_pass http://192.168.100.7:10002/oss/;
|
||||
}
|
||||
}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@ -61,6 +122,22 @@ spec:
|
||||
ports:
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
for i in $(seq 1 30); do
|
||||
if [ -d /app/nginx/conf.d ]; then
|
||||
cp /dashboard-nginx-conf/web.conf /app/nginx/conf.d/web.conf
|
||||
/app/nginx/sbin/nginx -s reload -c /app/nginx/conf/nginx.conf || true
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
exit 1
|
||||
resources:
|
||||
limits:
|
||||
memory: 1Gi
|
||||
@ -68,9 +145,20 @@ spec:
|
||||
memory: 256Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- mountPath: /dashboard-nginx-conf
|
||||
name: dashboard-nginx-conf
|
||||
readOnly: true
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext: {}
|
||||
terminationGracePeriodSeconds: 10
|
||||
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: web.conf
|
||||
path: web.conf
|
||||
name: imes-basic-dashboard-nginx-conf
|
||||
name: dashboard-nginx-conf
|
||||
|
||||
Loading…
Reference in New Issue
Block a user