# 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:
#   - REMOTE_IAM_DATABASE_URL_STAGING
#   - REMOTE_MERCHANT_DATABASE_URL_STAGING
#   - REMOTE_ORDER_DATABASE_URL_STAGING
#   - REMOTE_FNB_DATABASE_URL_STAGING
#   - REMOTE_INVENTORY_DATABASE_URL_STAGING
#   - REMOTE_WALLET_DATABASE_URL_STAGING
#   - REMOTE_CATALOG_DATABASE_URL_STAGING
#   - REMOTE_STORAGE_DATABASE_URL_STAGING
#   - REMOTE_BOOKING_DATABASE_URL_STAGING
#   - REMOTE_CHAT_DATABASE_URL_STAGING
#   - REMOTE_SOCIAL_DATABASE_URL_STAGING
#   - REMOTE_PROMOTION_DATABASE_URL_STAGING
#   - REMOTE_MEMBERSHIP_DATABASE_URL_STAGING
#   - REMOTE_MINING_DATABASE_URL_STAGING
#   - REMOTE_MISSION_DATABASE_URL_STAGING
#   - REMOTE_ADS_MANAGER_DATABASE_URL_STAGING
#   - REMOTE_ADS_SERVING_DATABASE_URL_STAGING
#   - REMOTE_ADS_BILLING_DATABASE_URL_STAGING
#   - REMOTE_ADS_TRACKING_DATABASE_URL_STAGING
#   - REMOTE_ADS_ANALYTICS_DATABASE_URL_STAGING
#   - REMOTE_MKT_FACEBOOK_DATABASE_URL_STAGING
#   - REMOTE_MKT_WHATSAPP_DATABASE_URL_STAGING
#   - REMOTE_MKT_X_DATABASE_URL_STAGING
#   - REMOTE_MKT_ZALO_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.techbi.org"

  # EN: PostgreSQL Connection Strings (per-service databases)
  # VI: Chuoi ket noi PostgreSQL (database rieng cho tung service)
  # Format: Host=ip;Port=port;Database=db;Username=user;Password=pass;SSL Mode=Prefer
  IAM_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=iam_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MERCHANT_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=merchant_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ORDER_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=order_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  FNB_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=fnb_engine;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  INVENTORY_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=inventory_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  WALLET_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=wallet_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  CATALOG_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=catalog_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  STORAGE_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=storage_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  BOOKING_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=booking_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  CHAT_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=chat_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  SOCIAL_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=social_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  PROMOTION_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=promotion_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MEMBERSHIP_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=membership_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MINING_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mining_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MISSION_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mission_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ADS_MANAGER_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=ads_manager_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ADS_SERVING_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=ads_serving_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ADS_BILLING_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=ads_billing_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ADS_TRACKING_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=ads_tracking_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  ADS_ANALYTICS_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=ads_analytics_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MKT_FACEBOOK_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mkt_facebook_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MKT_WHATSAPP_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mkt_whatsapp_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MKT_X_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mkt_x_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"
  MKT_ZALO_DATABASE_URL: "PLACEHOLDER-Host=db-host;Port=30992;Database=mkt_zalo_service;Username=cloud_admin;Password=CHANGE_ME;SSL Mode=Prefer"

  # 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.techbi.org"

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