apiVersion: v1
kind: Secret
metadata:
  name: database-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: database
type: Opaque
data:
  # Database Users (base64 encoded from .env)
  AUTH_DB_USER: YXV0aF91c2Vy  # auth_user
  TENANT_DB_USER: dGVuYW50X3VzZXI=  # tenant_user
  TRAINING_DB_USER: dHJhaW5pbmdfdXNlcg==  # training_user
  FORECASTING_DB_USER: Zm9yZWNhc3RpbmdfdXNlcg==  # forecasting_user
  SALES_DB_USER: c2FsZXNfdXNlcg==  # sales_user
  EXTERNAL_DB_USER: ZXh0ZXJuYWxfdXNlcg==  # external_user
  NOTIFICATION_DB_USER: bm90aWZpY2F0aW9uX3VzZXI=  # notification_user
  INVENTORY_DB_USER: aW52ZW50b3J5X3VzZXI=  # inventory_user
  RECIPES_DB_USER: cmVjaXBlc191c2Vy  # recipes_user
  SUPPLIERS_DB_USER: c3VwcGxpZXJzX3VzZXI=  # suppliers_user
  POS_DB_USER: cG9zX3VzZXI=  # pos_user
  ORDERS_DB_USER: b3JkZXJzX3VzZXI=  # orders_user
  PRODUCTION_DB_USER: cHJvZHVjdGlvbl91c2Vy  # production_user
  ALERT_PROCESSOR_DB_USER: YWxlcnRfcHJvY2Vzc29yX3VzZXI=  # alert_processor_user
  DEMO_SESSION_DB_USER: ZGVtb19zZXNzaW9uX3VzZXI=  # demo_session_user
  ORCHESTRATOR_DB_USER: b3JjaGVzdHJhdG9yX3VzZXI=  # orchestrator_user
  PROCUREMENT_DB_USER: cHJvY3VyZW1lbnRfdXNlcg==  # procurement_user
  AI_INSIGHTS_DB_USER: YWlfaW5zaWdodHNfdXNlcg==  # ai_insights_user
  DISTRIBUTION_DB_USER: ZGlzdHJpYnV0aW9uX3VzZXI=  # distribution_user

  # Database Passwords (base64 encoded from .env)
  AUTH_DB_PASSWORD: djJvOHBqVWRSUVprR1JsbDlOV2JXdGt4WUFGcVBmOWw= # v2o8pjUdRQZkGRll...
  TENANT_DB_PASSWORD: bnNDVFpONkJsMDBjcWswZGNzcnVwUXRVWERFQ2dNVnY= # nsCTZN6Bl00cqk0d...
  TRAINING_DB_PASSWORD: UGxwVklOZlpCaXNOcFBpekNWQndKMTM3Q2lwQTlKUDE= # PlpVINfZBisNpPiz...
  FORECASTING_DB_PASSWORD: eElVNDVJdjFEWXVXajhiSWczdWprR05TdUZuMjhuVzc= # xIU45Iv1DYuWj8bI...
  SALES_DB_PASSWORD: QUdkOTdZb3ZXc1c1ZURCMWtLeTEwQkg3YTZGYUpUSkQ= # AGd97YovWsW5eDB1...
  EXTERNAL_DB_PASSWORD: OFJCSHR4a1dVYjFUTm1DeGV2d2Q1VzhnV3hQREpBcGU= # 8RBHtxkWUb1TNmCx...
  NOTIFICATION_DB_PASSWORD: ZENDM21LMEVGSXZhRUV6Sm1naEFJTzJIbTg2Y2psRko= # dCC3mK0EFIvaEEzJ...
  INVENTORY_DB_PASSWORD: VDB1Sm5YczByNFRVbXhTUWVRMkR1UUdQNkhVMExFYmE= # T0uJnXs0r4TUmxSQ...
  RECIPES_DB_PASSWORD: MlFDRjlwc1R3WmpTaE9KNEE5d1dZOUlNMnVJc2pJc3Y= # 2QCF9psTwZjShOJ4...
  SUPPLIERS_DB_PASSWORD: cG1LNjFMY2drVDBmY25OaFZZQ25heGdFZlRJV2tBVng= # pmK61LcgkT0fcnNh...
  POS_DB_PASSWORD: OGxLZzN1RWlJTFBmVTJiRnlHTXdWTWhTc1RQOFRCeGg= # 8lKg3uEiILPfU2bF...
  ORDERS_DB_PASSWORD: VFR1ZEJpbTdOVlJrcFlYejkzNEVUY0lFZGdlYTZ3VE4= # TTudBim7NVRkpYXz...
  PRODUCTION_DB_PASSWORD: bFNZSDRacFBieHlIQXMweVRzelRWWWRSc3lBUjFKYUc= # lSYH4ZpPbxyHAs0y...
  ALERT_PROCESSOR_DB_PASSWORD: T0NqMmtzaHdSNmNZNFFoT3U4SlpsR2RPZnF5Y0ZtV2Y= # OCj2kshwR6cY4QhO...
  DEMO_SESSION_DB_PASSWORD: ZGVtb19zZXNzaW9uX3Bhc3MxMjM=  # demo_session_pass123
  ORCHESTRATOR_DB_PASSWORD: b3JjaGVzdHJhdG9yX3Bhc3MxMjM=  # orchestrator_pass123
  PROCUREMENT_DB_PASSWORD: cHJvY3VyZW1lbnRfcGFzczEyMw==  # procurement_pass123
  AI_INSIGHTS_DB_PASSWORD: YWlfaW5zaWdodHNfcGFzczEyMw==  # ai_insights_pass123
  DISTRIBUTION_DB_PASSWORD: ZGlzdHJpYnV0aW9uX3Bhc3MxMjM=  # distribution_pass123

  # Database URLs (base64 encoded)
  AUTH_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vYXV0aF91c2VyOnYybzhwalVkUlFaa0dSbGw5TldiV3RreFlBRnFQZjlsQGF1dGgtZGItc2VydmljZTo1NDMyL2F1dGhfZGI= # Updated with new password
  TENANT_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vdGVuYW50X3VzZXI6bnNDVFpONkJsMDBjcWswZGNzcnVwUXRVWERFQ2dNVnZAdGVuYW50LWRiLXNlcnZpY2U6NTQzMi90ZW5hbnRfZGI= # Updated with new password
  TRAINING_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vdHJhaW5pbmdfdXNlcjpQbHBWSU5mWkJpc05wUGl6Q1ZCd0oxMzdDaXBBOUpQMUB0cmFpbmluZy1kYi1zZXJ2aWNlOjU0MzIvdHJhaW5pbmdfZGI= # Updated with new password
  FORECASTING_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZm9yZWNhc3RpbmdfdXNlcjp4SVU0NUl2MURZdVdqOGJJZzN1amtHTlN1Rm4yOG5XN0Bmb3JlY2FzdGluZy1kYi1zZXJ2aWNlOjU0MzIvZm9yZWNhc3RpbmdfZGI= # Updated with new password
  SALES_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vc2FsZXNfdXNlcjpBR2Q5N1lvdldzVzVlREIxa0t5MTBCSDdhNkZhSlRKREBzYWxlcy1kYi1zZXJ2aWNlOjU0MzIvc2FsZXNfZGI= # Updated with new password
  EXTERNAL_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZXh0ZXJuYWxfdXNlcjo4UkJIdHhrV1ViMVRObUN4ZXZ3ZDVXOGdXeFBESkFwZUBleHRlcm5hbC1kYi1zZXJ2aWNlOjU0MzIvZXh0ZXJuYWxfZGI= # Updated with new password
  NOTIFICATION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vbm90aWZpY2F0aW9uX3VzZXI6ZENDM21LMEVGSXZhRUV6Sm1naEFJTzJIbTg2Y2psRkpAbm90aWZpY2F0aW9uLWRiLXNlcnZpY2U6NTQzMi9ub3RpZmljYXRpb25fZGI= # Updated with new password
  INVENTORY_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vaW52ZW50b3J5X3VzZXI6VDB1Sm5YczByNFRVbXhTUWVRMkR1UUdQNkhVMExFYmFAaW52ZW50b3J5LWRiLXNlcnZpY2U6NTQzMi9pbnZlbnRvcnlfZGI= # Updated with new password
  RECIPES_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcmVjaXBlc191c2VyOjJRQ0Y5cHNUd1pqU2hPSjRBOXdXWTlJTTJ1SXNqSXN2QHJlY2lwZXMtZGItc2VydmljZTo1NDMyL3JlY2lwZXNfZGI= # Updated with new password
  SUPPLIERS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vc3VwcGxpZXJzX3VzZXI6cG1LNjFMY2drVDBmY25OaFZZQ25heGdFZlRJV2tBVnhAc3VwcGxpZXJzLWRiLXNlcnZpY2U6NTQzMi9zdXBwbGllcnNfZGI= # Updated with new password
  POS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcG9zX3VzZXI6OGxLZzN1RWlJTFBmVTJiRnlHTXdWTWhTc1RQOFRCeGhAcG9zLWRiLXNlcnZpY2U6NTQzMi9wb3NfZGI= # Updated with new password
  ORDERS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vb3JkZXJzX3VzZXI6VFR1ZEJpbTdOVlJrcFlYejkzNEVUY0lFZGdlYTZ3VE5Ab3JkZXJzLWRiLXNlcnZpY2U6NTQzMi9vcmRlcnNfZGI= # Updated with new password
  PRODUCTION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcHJvZHVjdGlvbl91c2VyOmxTWUg0WnBQYnh5SEFzMHlUc3pUVllkUnN5QVIxSmFHQHByb2R1Y3Rpb24tZGItc2VydmljZTo1NDMyL3Byb2R1Y3Rpb25fZGI= # Updated with new password
  ALERT_PROCESSOR_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vYWxlcnRfcHJvY2Vzc29yX3VzZXI6T0NqMmtzaHdSNmNZNFFoT3U4SlpsR2RPZnF5Y0ZtV2ZAYWxlcnQtcHJvY2Vzc29yLWRiLXNlcnZpY2U6NTQzMi9hbGVydF9wcm9jZXNzb3JfZGI= # Updated with new password
  DEMO_SESSION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZGVtb19zZXNzaW9uX3VzZXI6ZGVtb19zZXNzaW9uX3Bhc3MxMjNAZGVtby1zZXNzaW9uLWRiLXNlcnZpY2U6NTQzMi9kZW1vX3Nlc3Npb25fZGI=  # postgresql+asyncpg://demo_session_user:demo_session_pass123@demo-session-db-service:5432/demo_session_db
  ORCHESTRATOR_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vb3JjaGVzdHJhdG9yX3VzZXI6b3JjaGVzdHJhdG9yX3Bhc3MxMjNAb3JjaGVzdHJhdG9yLWRiLXNlcnZpY2U6NTQzMi9vcmNoZXN0cmF0b3JfZGI=  # postgresql+asyncpg://orchestrator_user:orchestrator_pass123@orchestrator-db-service:5432/orchestrator_db
  PROCUREMENT_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcHJvY3VyZW1lbnRfdXNlcjpwcm9jdXJlbWVudF9wYXNzMTIzQHByb2N1cmVtZW50LWRiLXNlcnZpY2U6NTQzMi9wcm9jdXJlbWVudF9kYg==  # postgresql+asyncpg://procurement_user:procurement_pass123@procurement-db-service:5432/procurement_db
  AI_INSIGHTS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vYWlfaW5zaWdodHNfdXNlcjphaV9pbnNpZ2h0c19wYXNzMTIzQGFpLWluc2lnaHRzLWRiLXNlcnZpY2U6NTQzMi9haV9pbnNpZ2h0c19kYg==  # postgresql+asyncpg://ai_insights_user:ai_insights_pass123@ai-insights-db-service:5432/ai_insights_db
  DISTRIBUTION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZGlzdHJpYnV0aW9uX3VzZXI6ZGlzdHJpYnV0aW9uX3Bhc3MxMjNAZGlzdHJpYnV0aW9uLWRiLXNlcnZpY2U6NTQzMi9kaXN0cmlidXRpb25fZGI=  # postgresql+asyncpg://distribution_user:distribution_pass123@distribution-db-service:5432/distribution_db

  # Redis URL
  REDIS_URL: cmVkaXM6Ly86T3hkbWRKamRWTlhwMzdNTkMySUZvTW5UcGZHR0Z2MWtAcmVkaXMtc2VydmljZTo2Mzc5LzA= # redis://:OxdmdJjdVNXp37MNC2IFoMnTpfGGFv1k@redis-service:6379/0

---
apiVersion: v1
kind: Secret
metadata:
  name: redis-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: redis
type: Opaque
data:
  REDIS_PASSWORD: T3hkbWRKamRWTlhwMzdNTkMySUZvTW5UcGZHR0Z2MWs= # OxdmdJjdVNXp37MN...

---
apiVersion: v1
kind: Secret
metadata:
  name: rabbitmq-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: rabbitmq
type: Opaque
data:
  RABBITMQ_USER: YmFrZXJ5  # bakery
  RABBITMQ_PASSWORD: Zm9yZWNhc3QxMjM=  # forecast123
  RABBITMQ_ERLANG_COOKIE: YmFrZXJ5LXNlY3JldC1jb29raWU=  # bakery-secret-cookie

---
apiVersion: v1
kind: Secret
metadata:
  name: jwt-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: auth
type: Opaque
data:
  JWT_SECRET_KEY: eW91ci1zdXBlci1zZWNyZXQtand0LWtleS1jaGFuZ2UtaW4tcHJvZHVjdGlvbi1taW4tMzItY2hhcmFjdGVycy1sb25n  # your-super-secret-jwt-key-change-in-production-min-32-characters-long
  JWT_REFRESH_SECRET_KEY: eW91ci1zdXBlci1zZWNyZXQtcmVmcmVzaC1qd3Qta2V5LWNoYW5nZS1pbi1wcm9kdWN0aW9uLW1pbi0zMi1jaGFyYWN0ZXJzLWxvbmc=  # your-super-secret-refresh-jwt-key-change-in-production-min-32-characters-long
  SERVICE_API_KEY: c2VydmljZS1hcGkta2V5LWNoYW5nZS1pbi1wcm9kdWN0aW9u  # service-api-key-change-in-production

---
apiVersion: v1
kind: Secret
metadata:
  name: external-api-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: external-apis
type: Opaque
data:
  AEMET_API_KEY: ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKemRXSWlPaUoxWVd4bVlYSnZRR2R0WVdsc0xtTnZiU0lzSW1wMGFTSTZJakV3TjJObE9XVmlMVGxoTm1ZdE5EQmpZeTA1WWpoaUxUTTFOV05pWkRZNU5EazJOeUlzSW1semN5STZJa0ZGVFVWVUlpd2lhV0YwSWpveE56VTVPREkwT0RNekxDSjFjMlZ5U1dRaU9pSXhNRGRqWlRsbFlpMDVZVFptTFRRd1kyTXRPV0k0WWkwek5UVmpZbVEyT1RRNU5qY2lMQ0p5YjJ4bElqb2lJbjAuamtjX3hCc0pDc204ZmRVVnhESW1mb2x5UE5pazF4MTd6c1UxZEZKR09iWQ==
  MADRID_OPENDATA_API_KEY: eW91ci1tYWRyaWQtb3BlbmRhdGEta2V5LWhlcmU=  # your-madrid-opendata-key-here

---
apiVersion: v1
kind: Secret
metadata:
  name: payment-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: payments
type: Opaque
data:
  STRIPE_SECRET_KEY: c2tfdGVzdF95b3VyX3N0cmlwZV9zZWNyZXRfa2V5X2hlcmU=  # sk_test_your_stripe_secret_key_here
  STRIPE_WEBHOOK_SECRET: d2hzZWNfeW91cl9zdHJpcGVfd2ViaG9va19zZWNyZXRfaGVyZQ==  # whsec_your_stripe_webhook_secret_here

---
apiVersion: v1
kind: Secret
metadata:
  name: email-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: notifications
type: Opaque
data:
  SMTP_USER: eW91ci1lbWFpbEBnbWFpbC5jb20=  # your-email@gmail.com
  SMTP_PASSWORD: eW91ci1hcHAtc3BlY2lmaWMtcGFzc3dvcmQ=  # your-app-specific-password

---
apiVersion: v1
kind: Secret
metadata:
  name: monitoring-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: monitoring
type: Opaque
data:
  GRAFANA_ADMIN_USER: YWRtaW4=  # admin
  GRAFANA_ADMIN_PASSWORD: YWRtaW4xMjM=  # admin123
  GRAFANA_SECRET_KEY: Z3JhZmFuYS1zZWNyZXQta2V5LWNoYW5nZS1pbi1wcm9kdWN0aW9u  # grafana-secret-key-change-in-production
  PGADMIN_EMAIL: YWRtaW5AYmFrZXJ5LmxvY2Fs  # admin@bakery.local
  PGADMIN_PASSWORD: YWRtaW4xMjM=  # admin123
  REDIS_COMMANDER_USER: YWRtaW4=  # admin
  REDIS_COMMANDER_PASSWORD: YWRtaW4xMjM=  # admin123

---
apiVersion: v1
kind: Secret
metadata:
  name: pos-integration-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: pos
type: Opaque
data:
  SQUARE_ACCESS_TOKEN: eW91ci1zcXVhcmUtYWNjZXNzLXRva2Vu  # your-square-access-token
  SQUARE_WEBHOOK_SECRET: eW91ci1zcXVhcmUtd2ViaG9vay1zZWNyZXQ=  # your-square-webhook-secret
  TOAST_API_KEY: eW91ci10b2FzdC1hcGkta2V5  # your-toast-api-key
  TOAST_API_SECRET: eW91ci10b2FzdC1hcGktc2VjcmV0  # your-toast-api-secret
  TOAST_WEBHOOK_SECRET: eW91ci10b2FzdC13ZWJob29rLXNlY3JldA==  # your-toast-webhook-secret
  LIGHTSPEED_API_KEY: eW91ci1saWdodHNwZWVkLWFwaS1rZXk=  # your-lightspeed-api-key
  LIGHTSPEED_API_SECRET: eW91ci1saWdodHNwZWVkLWFwaS1zZWNyZXQ=  # your-lightspeed-api-secret
  LIGHTSPEED_WEBHOOK_SECRET: eW91ci1saWdodHNwZWVkLXdlYmhvb2stc2VjcmV0  # your-lightspeed-webhook-secret

---
apiVersion: v1
kind: Secret
metadata:
  name: whatsapp-secrets
  namespace: bakery-ia
  labels:
    app.kubernetes.io/name: bakery-ia
    app.kubernetes.io/component: notifications
type: Opaque
data:
  WHATSAPP_API_KEY: eW91ci13aGF0c2FwcC1hcGkta2V5LWhlcmU=  # your-whatsapp-api-key-here
