初始提交
This commit is contained in:
74
py-deploy/template/auth/deployment.yaml
Normal file
74
py-deploy/template/auth/deployment.yaml
Normal 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
|
||||
Reference in New Issue
Block a user