Files
Edu/infra/k8s/helm/core-edu/values.yaml
SpecialX d831915f06 feat(infra): k8s Helm Chart 演化与备份脚本测试
- 新增 edu-platform 平台级 chart(namespace/configmap/secret/ingress/hpa)
- 新增 api-gateway 服务级 chart(完整迁移自原 manifest)
- 新增 6 个业务服务 chart 桩(iam/core-edu/content/msg/data-ana/ai)
- 删除原 api-gateway-deployment.yaml(已迁移至 helm chart)
- 更新 infra/k8s/README.md 为 Helm Chart 管理说明
- 新增 backup-mysql.sh dry-run 测试脚本(17 断言)
2026-07-08 12:50:56 +08:00

86 lines
1.5 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.
# core-edu 服务默认值(教学核心 - 业务领域 D2+D3
# 副本数(生产建议 ≥ 2
replicaCount: 2
image:
repository: edu/core-edu
tag: latest # 生产请固定 tag避免 latest
pullPolicy: IfNotPresent
# 服务端口
service:
type: ClusterIP
port: 3002
targetPort: 3002
# 命名空间(默认 edu-services由 edu-platform chart 创建)
namespace: edu-services
# 探针配置
probes:
liveness:
path: /healthz
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
readiness:
path: /readyz
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 2
# 资源配额
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi
# 滚动更新策略
strategy:
type: RollingUpdate
maxSurge: 1
maxUnavailable: 0
# Prometheus 指标采集
metrics:
enabled: true
port: 3002
path: /metrics
# 安全上下文
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
# 服务级 ConfigMap非敏感配置
configMap:
enabled: true
data:
NODE_ENV: production
LOG_LEVEL: info
# HPA
hpa:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# 敏感配置(从 Secret 引用Secret 由 edu-platform chart 或 ExternalSecrets 管理)
secretRefs:
- name: edu-platform-secret
keys:
- MYSQL_PASSWORD
- JWT_SECRET
- REDIS_PASSWORD