apiVersion: v1
kind: Secret
metadata:
  name: {{ .Release.Name }}-app-secrets
  namespace: {{ .Values.global.namespace }}
type: Opaque
stringData:
  # Google OAuth
  GOOGLE_CLIENT_ID: {{ .Values.oauth.google.clientId | quote }}
  GOOGLE_CLIENT_SECRET: {{ .Values.oauth.google.clientSecret | quote }}
  GOOGLE_REDIRECT_URI: {{ .Values.oauth.google.redirectUri | quote }}
  
  # Microsoft Entra ID (Azure AD) OAuth
  AZURE_CLIENT_ID: {{ .Values.oauth.azure.clientId | quote }}
  AZURE_CLIENT_SECRET: {{ .Values.oauth.azure.clientSecret | quote }}
  AZURE_TENANT_ID: {{ .Values.oauth.azure.tenantId | quote }}
  AZURE_REDIRECT_URI: {{ .Values.oauth.azure.redirectUri | quote }}
  
  # Email Configuration
  SMTP_HOST: {{ .Values.email.smtpHost | quote }}
  SMTP_PORT: {{ .Values.email.smtpPort | quote }}
  SMTP_USER: {{ .Values.email.smtpUser | quote }}
  SMTP_PASSWORD: {{ .Values.email.smtpPassword | quote }}
  SMTP_FROM: {{ .Values.email.smtpFrom | quote }}
  
  # Frontend URL for redirects
  FRONTEND_URL: {{ .Values.frontend.externalUrl | quote }}
  
  # S3 Backup Configuration
  S3_ENDPOINT: {{ .Values.s3.endpoint | quote }}
  S3_ACCESS_KEY: {{ .Values.s3.accessKey | quote }}
  S3_SECRET_KEY: {{ .Values.s3.secretKey | quote }}
  S3_BUCKET_NAME: {{ .Values.s3.bucketName | quote }}
  S3_REGION: {{ .Values.s3.region | quote }}
  BACKUP_INTERVAL: {{ .Values.s3.backupInterval | quote }}
