Files
Fam Zheng 1e04655003
deploy cube / build-and-deploy (push) Successful in 1m11s
deploy piano-sheet / build-and-deploy (push) Successful in 1m44s
deploy simpleasm / build-and-deploy (push) Successful in 1m22s
ci: 统一 k8s manifest 为 apps/*/k8s/all.yaml
- 三个 app 的 5 个独立 yaml 合成单文件 all.yaml,多 doc 内显式排序,apply 不再受目录字母序影响(这是 piano-sheet run #49 NotFound 的根因)
- simpleasm/cube workflow 补 Initialize K8s resources 步骤,跟 piano-sheet 对齐;今后 manifest 改动 CI 自动 apply
- cube 的 _registry-ingress.yaml 不再需要前缀绕排序,去掉 _
2026-05-05 10:38:38 +01:00

109 lines
2.3 KiB
YAML
Raw Permalink 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: v1
kind: Namespace
metadata:
name: cube-simpleasm
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: simpleasm-data
namespace: cube-simpleasm
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
# storageClassName 留空 → 走 k3s 默认 local-pathhostPath,单节点足够)
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simpleasm
namespace: cube-simpleasm
labels:
app: simpleasm
spec:
replicas: 1
strategy:
# PVC 是 RWOrolling 上线时新旧 pod 抢 PVC 会卡住,直接 Recreate
type: Recreate
selector:
matchLabels:
app: simpleasm
template:
metadata:
labels:
app: simpleasm
spec:
imagePullSecrets:
- name: registry-creds
containers:
- name: simpleasm
image: registry.famzheng.me/mochi/simpleasm: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: 16Mi
limits:
cpu: 200m
memory: 64Mi
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: simpleasm-data
---
apiVersion: v1
kind: Service
metadata:
name: simpleasm
namespace: cube-simpleasm
spec:
selector:
app: simpleasm
ports:
- name: http
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: simpleasm
namespace: cube-simpleasm
spec:
ingressClassName: traefik
rules:
- host: asm.famzheng.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: simpleasm
port:
number: 80