175 lines
4.9 KiB
YAML
175 lines
4.9 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: imes-custom-nlv-ui-nginx-conf
|
|
namespace: prd
|
|
data:
|
|
default.conf: |
|
|
server {
|
|
listen 80;
|
|
root /app/www;
|
|
index index.html index.htm;
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_min_length 1k;
|
|
gzip_comp_level 4;
|
|
gzip_proxied any;
|
|
gzip_types text/plain text/css application/json application/javascript application/xml image/svg+xml;
|
|
gzip_vary on;
|
|
client_max_body_size 100M;
|
|
|
|
location = /api/visual-global/list {
|
|
proxy_pass http://imes-basic-mom-report-dashboard:6071/dashboard/visual/list;
|
|
proxy_connect_timeout 240s;
|
|
proxy_send_timeout 240s;
|
|
proxy_read_timeout 240s;
|
|
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 http;
|
|
proxy_http_version 1.0;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
location = /api/visual/detail {
|
|
proxy_pass http://imes-basic-mom-report-dashboard:6071/dashboard/visual/detail;
|
|
proxy_connect_timeout 240s;
|
|
proxy_send_timeout 240s;
|
|
proxy_read_timeout 240s;
|
|
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 http;
|
|
proxy_http_version 1.0;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
location ~* ^/(code|auth|admin|monitor|actuator|gen|job|tx|act|mp|pay|jimu|aj|rpt|iep-app|iep-pms|iep-tms|iep-tap|iep-qms|iep-alm|tqm-lims|iep-oem|iep-tds|iep-wms|iep-flow|iep-dcc|iMES-jxls|nlv-wms|nlv-print|mom-xxl-job-admin|iep-int|mom-wms|mom-pms) {
|
|
proxy_pass http://mom-gateway:9999;
|
|
proxy_connect_timeout 240s;
|
|
proxy_send_timeout 240s;
|
|
proxy_read_timeout 240s;
|
|
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 http;
|
|
|
|
proxy_http_version 1.0;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: imes-custom-nlv-ui
|
|
name: imes-custom-nlv-ui
|
|
namespace: prd
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app: imes-custom-nlv-ui
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 25%
|
|
maxUnavailable: 25%
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: imes-custom-nlv-ui
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: kubernetes.io/arch
|
|
operator: In
|
|
values:
|
|
- amd64
|
|
containers:
|
|
- env:
|
|
- name: PORT
|
|
value: '80'
|
|
- name: GR2740169999_HOST
|
|
value: mom-gateway
|
|
- name: GR2740169999_PORT
|
|
value: '9999'
|
|
- name: GATEWAY_HOST
|
|
value: mom-gateway
|
|
- name: GATEWAY_PORT
|
|
value: '9999'
|
|
- name: HOST_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: status.hostIP
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: status.podIP
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
image: 192.168.100.49:30002/prd/imes-custom-nlv-ui:20260831102400
|
|
imagePullPolicy: IfNotPresent
|
|
name: nlv-ui
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /etc/nginx/conf.d/default.conf
|
|
name: nginx-default-conf
|
|
readOnly: true
|
|
subPath: default.conf
|
|
resources:
|
|
limits:
|
|
memory: 2Gi
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumes:
|
|
- configMap:
|
|
items:
|
|
- key: default.conf
|
|
path: default.conf
|
|
name: imes-custom-nlv-ui-nginx-conf
|
|
name: nginx-default-conf
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext: {}
|
|
terminationGracePeriodSeconds: 10
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: imes-custom-nlv-ui
|
|
name: imes-custom-nlv-ui
|
|
namespace: prd
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: imes-custom-nlv-ui
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
protocol: TCP
|
|
targetPort: 80
|
|
nodePort: 31080
|