Files
Edu/infra/k8s/helm/edu-platform/templates/secret.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

27 lines
786 B
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.
{{- if .Values.secret.enabled }}
{{- /*
⚠️ 生产环境警告:不要在 values.yaml 中硬编码真实密钥!
推荐方案:使用 External Secrets Operator 对接 Vault / KMS / 云 KMS
本模板仅作骨架;空字符串字段不会被渲染(避免覆盖已存在的 Secret
*/ -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secret.name }}
namespace: edu-system
labels:
{{- include "edu-platform.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": before-hook-creation
type: Opaque
data:
{{- range $k, $v := .Values.secret.data }}
{{- if $v }}
{{ $k }}: {{ $v }}
{{- else }}
{{ $k }}: "" # 占位:部署时通过 --set 或 ExternalSecrets 注入
{{- end }}
{{- end }}
{{- end }}