ci(secret): inject Aliyun SMS credentials into cyberstar-env
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 5m44s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 5m44s
线上 /api/auth/send-otp 返回 SMS_NOT_CONFIGURED, 因为 pod 的 process.env 里没有 SMS_*。沿用 DATABASE_URL 已有的硬编模式, 把 4 个短信变量也写进 workflow 的 kubectl create secret 步骤。 后续 pod rollout restart 已在原 workflow 中自动触发, 重启后 envFrom 会重新读到新 Secret。
This commit is contained in:
parent
cfd44403cb
commit
1073262e12
@ -94,9 +94,13 @@ jobs:
|
||||
--docker-password="${{ env.CR_PASSWORD_ACTIVE }}" \
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
# 2) 应用运行时 Secret(数据库连接串:火山 RDS 内网地址)
|
||||
# 2) 应用运行时 Secret(DB 连接串 + 阿里云短信凭据)
|
||||
kubectl create secret generic cyberstar-env \
|
||||
--from-literal=DATABASE_URL='mysql://zyc:Zyc188208@mysql8351f937d637.rds.ivolces.com:3306/cyberstar?charset=utf8mb4' \
|
||||
--from-literal=SMS_SIGN_NAME='广州气元科技' \
|
||||
--from-literal=SMS_TEMPLATE_CODE='SMS_506210397' \
|
||||
--from-literal=SMS_ACCESS_KEY='LTAI5t7jGzFH4ExkJ9TSmQyd' \
|
||||
--from-literal=SMS_SECRET_KEY='u0d3OyTWe9BjnNjK81bvEElky4xcHk' \
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
# 3) Apply manifests
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user