kra-new/deploy/k8s/runtime-secret.example.yaml

20 lines
899 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.

# 运行时 Secret 示例。
# 真实环境由 Jenkinsfile 的 Deploy 阶段自动创建kubectl create secret generic ${APP_NAME}-runtime
# 本文件仅用于手工初始化环境的场景。尖括号为模板变量,使用前先替换成实际值。
#
# 模板变量:
# APP_NAME 应用名Jenkinsfile 中 APP_NAMEkra 项目即为 kra
# KRA_NAMESPACE 目标命名空间(如 kra-dev / kra-prod
apiVersion: v1
kind: Secret
metadata:
name: <APP_NAME>-runtime
namespace: <KRA_NAMESPACE>
type: Opaque
stringData:
# 替换为随机值;不要把真实密码提交进 Git。
mysql-root-password: "CHANGE_ME_TO_A_RANDOM_VALUE"
database-source: "root:CHANGE_ME_TO_A_RANDOM_VALUE@tcp(<APP_NAME>-mysql:3306)/<APP_NAME>?charset=utf8mb4&parseTime=True&loc=Local"
redis-addr: "<APP_NAME>-redis:6379"
jwt-signing-key: "CHANGE_ME_TO_A_LONG_RANDOM_VALUE"