Files
cube/apps/piano-sheet/k8s/deployment.yaml
T
Fam Zheng 538bbb7ecd piano-sheet: ns cube-piano-sheet → cube-piano
ns 跟 app 名解耦,workflow 加 NS env 不再 cube-$APP 拼。
2026-05-05 10:03:38 +01:00

59 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apiVersion: apps/v1
kind: Deployment
metadata:
name: piano-sheet
namespace: cube-piano
labels:
app: piano-sheet
spec:
replicas: 1
strategy:
# PVC 是 RWOrolling 上线时新旧 pod 抢 PVC 会卡住,直接 Recreate
type: Recreate
selector:
matchLabels:
app: piano-sheet
template:
metadata:
labels:
app: piano-sheet
spec:
imagePullSecrets:
- name: registry-creds
containers:
- name: piano-sheet
image: registry.famzheng.me/mochi/piano-sheet:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: http
env:
- name: DB_PATH
value: /data/app.db
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 1
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 15
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 500m
memory: 256Mi
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: piano-sheet-data