Add astro-deployment.yaml

This commit is contained in:
2024-06-17 18:12:04 +08:00
commit 1c5849e7ff

61
astro-deployment.yaml Normal file
View File

@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: astro-deployment
namespace: astro-mc-internal
labels:
app: astro-deployment
spec:
minReadySeconds: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 40%a
maxUnavailable: 40%
selector:
matchLabels:
app: astro-pod
template:
metadata:
labels:
app: astro-pod
spec:
containers:
- name: astro
image: pvgharbor.duckdns.org/astro/astro:v1.4
imagePullPolicy: IfNotPresent
ports:
- name: astro-port
containerPort: 8080
resources:
limits:
cpu: 400m
# memory: 100Mi
requests:
cpu: 200m
# memory: 50Mi
startupProbe:
tcpSocket:
port: astro-port
initialDelaySeconds: 5
failureThreshold: 60
timeoutSeconds: 3
periodSeconds: 10
livenessProbe:
tcpSocket:
port: astro-port
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 3
readinessProbe:
tcpSocket:
port: astro-port
periodSeconds: 3
timeoutSeconds: 3
volumeMounts:
- mountPath: /project
name: astro-content
volumes:
- name: astro-content
persistentVolumeClaim:
claimName: astro-data-pv-claim