1. 调整服务的资源限制

This commit is contained in:
chenbowen
2025-09-22 15:50:05 +08:00
parent a58f35ee0a
commit ee6afbe4bf

View File

@@ -25,13 +25,28 @@ spec:
value: Asia/Shanghai value: Asia/Shanghai
ports: ports:
- containerPort: 48080 - containerPort: 48080
readinessProbe:
httpGet:
path: /actuator/health
port: 48080
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48080
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@@ -93,10 +108,10 @@ spec:
failureThreshold: 5 failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
strategy: strategy:
@@ -111,13 +126,14 @@ metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133 namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-infra name: zt-module-infra
spec: spec:
type: ClusterIP type: NodePort
selector: selector:
app: zt-module-infra app: zt-module-infra
ports: ports:
- protocol: TCP - protocol: TCP
port: 48082 port: 48082
targetPort: 48082 targetPort: 48082
nodePort: 30092
--- ---
# zt-module-system # zt-module-system
apiVersion: apps/v1 apiVersion: apps/v1
@@ -164,10 +180,10 @@ spec:
failureThreshold: 5 failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
strategy: strategy:
@@ -182,13 +198,14 @@ metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133 namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-system name: zt-module-system
spec: spec:
type: ClusterIP type: NodePort
selector: selector:
app: zt-module-system app: zt-module-system
ports: ports:
- protocol: TCP - protocol: TCP
port: 48081 port: 48081
targetPort: 48081 targetPort: 48081
nodePort: 30091
--- ---
# zt-module-bpm # zt-module-bpm
apiVersion: apps/v1 apiVersion: apps/v1
@@ -235,10 +252,10 @@ spec:
failureThreshold: 5 failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
strategy: strategy:
@@ -253,13 +270,14 @@ metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133 namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-bpm name: zt-module-bpm
spec: spec:
type: ClusterIP type: NodePort
selector: selector:
app: zt-module-bpm app: zt-module-bpm
ports: ports:
- protocol: TCP - protocol: TCP
port: 48083 port: 48083
targetPort: 48083 targetPort: 48083
nodePort: 30093
--- ---
# zt-module-report # zt-module-report
apiVersion: apps/v1 apiVersion: apps/v1
@@ -306,10 +324,10 @@ spec:
failureThreshold: 5 failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
strategy: strategy:
@@ -324,13 +342,14 @@ metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133 namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-report name: zt-module-report
spec: spec:
type: ClusterIP type: NodePort
selector: selector:
app: zt-module-report app: zt-module-report
ports: ports:
- protocol: TCP - protocol: TCP
port: 48084 port: 48084
targetPort: 48084 targetPort: 48084
nodePort: 30094
--- ---
# zt-module-template # zt-module-template
apiVersion: apps/v1 apiVersion: apps/v1
@@ -377,10 +396,10 @@ spec:
failureThreshold: 5 failureThreshold: 5
resources: resources:
requests: requests:
cpu: "1000m" cpu: "500m"
memory: "1024Mi" memory: "1024Mi"
limits: limits:
cpu: "1000m" cpu: "700m"
memory: "2048Mi" memory: "2048Mi"
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
strategy: strategy:
@@ -395,10 +414,11 @@ metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133 namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-template name: zt-module-template
spec: spec:
type: ClusterIP type: NodePort
selector: selector:
app: zt-module-template app: zt-module-template
ports: ports:
- protocol: TCP - protocol: TCP
port: 48100 port: 48100
targetPort: 48100 targetPort: 48100
nodePort: 30090