1. 拆分核心模块发布配置

This commit is contained in:
chenbowen
2026-01-12 13:00:36 +08:00
parent d56587b8fd
commit 6bdce6e9bc
4 changed files with 284 additions and 0 deletions

74
deployment-gateway.yaml Normal file
View File

@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-gateway
labels:
app: zt-gateway
annotations:
version: "VERSION_PLACEHOLDER"
description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec:
replicas: 1
selector:
matchLabels:
app: zt-gateway
template:
metadata:
labels:
app: zt-gateway
spec:
containers:
- name: zt-gateway
image: 172.16.46.66:10043/zt/zt-gateway:VERSION_PLACEHOLDER
imagePullPolicy: Always
env:
- name: TZ
value: Asia/Shanghai
lifecycle:
preStop:
exec:
command:
- "/bin/sh"
- "-c"
- "sleep 35"
ports:
- containerPort: 48080
readinessProbe:
httpGet:
path: /actuator/health
port: 48080
initialDelaySeconds: 100
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48080
initialDelaySeconds: 100
periodSeconds: 10
failureThreshold: 5
resources:
requests:
cpu: "500m"
memory: "1024Mi"
limits:
cpu: "800m"
memory: "2048Mi"
terminationGracePeriodSeconds: 40
---
apiVersion: v1
kind: Service
metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-gateway
spec:
type: NodePort
selector:
app: zt-gateway
ports:
- protocol: TCP
port: 48080
targetPort: 48080
nodePort: 30081