初始提交

This commit is contained in:
2026-03-23 10:33:13 +08:00
commit addf335bc6
15 changed files with 1252 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ deployment_name }}
namespace: {{ namespace }}
spec:
replicas: {{ replicas }}
selector:
matchLabels:
app: {{ deployment_name }}
template:
metadata:
labels:
app: {{ deployment_name }}
spec:
containers:
- name: {{ deployment_name }}
env:
- name: SERVICE_NAME
value: {{ deployment_name }}
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
image: {{ image }}
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /bin/sh
- /saas/tmy3-config/pre-Stop.sh
resources:
limits:
cpu: {{ limits_cpu }}
memory: {{ limits_memory }}
requests:
cpu: {{ requests_cpu }}
memory: {{ requests_memory }}
ports:
- containerPort: 8080
protocol: TCP
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 8080
timeoutSeconds: 1
volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /saas/tmy3-config/logback-spring.xml
name: tmly
subPath: logback-spring.xml
- mountPath: /saas/tmy3-config/pre-Stop.sh
name: tmly
subPath: pre-Stop.sh
- mountPath: /saas/run-env.sh
name: tmly
subPath: run-env.sh
imagePullSecrets:
- name: {{ imageSecret }}
volumes:
- hostPath:
path: /etc/localtime
type: ''
name: localtime
- configMap:
defaultMode: 420
name: tmly
name: tmly