frontend-recharge-system-vue/k8smanifests/deploy.yaml

67 lines
1.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ${NAME}
name: ${NAME}
namespace: ${NAMESPACE}
spec:
replicas: ${REPLICAS}
selector:
matchLabels:
app: ${NAME}
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: ${NAME}
spec:
containers:
- name: ${NAME}
image: ${DOCKERIMAGE}
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: ${SERVER_PORT}
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: ${SERVER_PORT}
scheme: HTTP
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: ${SERVER_PORT}
scheme: HTTP
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
startupProbe:
httpGet:
path: /
port: ${SERVER_PORT}
scheme: HTTP
failureThreshold: 60
periodSeconds: 10
timeoutSeconds: 3
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: "1"
memory: 1500Mi
imagePullSecrets:
- name: aliyun-registry-secret
- name: aliyun-registry-vpc-secret