# EN: Shared secrets for all GoodGo staging services
# VI: Secrets dung chung cho tat ca cac service staging cua GoodGo
#
# IMPORTANT: This file contains PLACEHOLDER values only.
# DO NOT commit real credentials to Git.
#
# Create secrets using kubectl:
#   kubectl create secret generic goodgo-secrets \
#     --from-literal=ConnectionStrings__DefaultConnection='postgresql://...' \
#     --from-literal=Jwt__Secret='...' \
#     -n staging
#
# Or use sealed-secrets / external-secrets operator in production.
#
# GitHub Secrets used in CI/CD:
#   - NEON_IAM_DATABASE_URL_STAGING
#   - NEON_MERCHANT_DATABASE_URL_STAGING
#   - NEON_ORDER_DATABASE_URL_STAGING
#   - NEON_FNB_DATABASE_URL_STAGING
#   - NEON_INVENTORY_DATABASE_URL_STAGING
#   - NEON_WALLET_DATABASE_URL_STAGING
#   - NEON_CATALOG_DATABASE_URL_STAGING
#   - NEON_STORAGE_DATABASE_URL_STAGING
#   - JWT_SECRET_STAGING
#   - JWT_REFRESH_SECRET_STAGING
#   - REDIS_PASSWORD_STAGING
#   - MINIO_ACCESS_KEY_STAGING
#   - MINIO_SECRET_KEY_STAGING
#   - RABBITMQ_PASSWORD_STAGING

apiVersion: v1
kind: Secret
metadata:
  name: goodgo-secrets
  namespace: staging
  labels:
    environment: staging
    platform: goodgo
type: Opaque
stringData:
  # EN: JWT Secrets (use strong random strings, min 32 characters)
  # VI: JWT Secrets (su dung chuoi ngau nhien manh, toi thieu 32 ky tu)
  Jwt__Secret: "PLACEHOLDER-staging-jwt-secret-min-32-chars"
  Jwt__RefreshSecret: "PLACEHOLDER-staging-refresh-secret-min-32-chars"

  # EN: IdentityServer Issuer
  # VI: IdentityServer Issuer
  IdentityServer__IssuerUri: "https://api.staging.goodgo.vn"

  # EN: Neon PostgreSQL Connection Strings (per-service databases)
  # VI: Chuoi ket noi Neon PostgreSQL (database rieng cho tung service)
  # Format: postgresql://user:password@ep-xxx.region.neon.tech/dbname?sslmode=require
  IAM_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/iam_staging?sslmode=require"
  MERCHANT_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/merchant_staging?sslmode=require"
  ORDER_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/order_staging?sslmode=require"
  FNB_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/fnb_staging?sslmode=require"
  INVENTORY_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/inventory_staging?sslmode=require"
  WALLET_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/wallet_staging?sslmode=require"
  CATALOG_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/catalog_staging?sslmode=require"
  STORAGE_DATABASE_URL: "PLACEHOLDER-postgresql://user:pass@ep-xxx.region.neon.tech/storage_staging?sslmode=require"

  # EN: Redis Password
  # VI: Mat khau Redis
  Redis__Password: "PLACEHOLDER-redis-password"
  ConnectionStrings__Redis: "redis:6379,password=PLACEHOLDER-redis-password"

  # EN: MinIO / S3 Storage Credentials
  # VI: Thong tin xac thuc MinIO / S3
  Storage__MinIO__AccessKey: "PLACEHOLDER-minio-access-key"
  Storage__MinIO__SecretKey: "PLACEHOLDER-minio-secret-key"
  Storage__MinIO__Endpoint: "minio.staging.goodgo.vn"

  # EN: RabbitMQ Credentials
  # VI: Thong tin xac thuc RabbitMQ
  RabbitMQ__Host: "rabbitmq"
  RabbitMQ__Username: "goodgo"
  RabbitMQ__Password: "PLACEHOLDER-rabbitmq-password"
