# Default values for flux-cd
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

gitRepository:
  name: bakery-ia
  namespace: flux-system
  interval: 1m
  url: http://gitea-http.gitea.svc.cluster.local:3000/bakery-admin/bakery-ia.git
  ref:
    branch: main
  secretRef:
    name: gitea-credentials
  timeout: 60s

kustomization:
  name: bakery-ia-prod
  namespace: flux-system
  interval: 5m
  path: ./infrastructure/environments/prod
  prune: true
  sourceRef:
    kind: GitRepository
    name: bakery-ia
  targetNamespace: bakery-ia
  timeout: 10m
  retryInterval: 1m
  wait: true
  healthChecks:
    # Core Infrastructure
    - apiVersion: apps/v1
      kind: Deployment
      name: gateway
      namespace: bakery-ia
    # Authentication & Authorization
    - apiVersion: apps/v1
      kind: Deployment
      name: auth-service
      namespace: bakery-ia
    - apiVersion: apps/v1
      kind: Deployment
      name: tenant-service
      namespace: bakery-ia
    # Core Business Services
    - apiVersion: apps/v1
      kind: Deployment
      name: inventory-service
      namespace: bakery-ia
    - apiVersion: apps/v1
      kind: Deployment
      name: orders-service
      namespace: bakery-ia
    - apiVersion: apps/v1
      kind: Deployment
      name: pos-service
      namespace: bakery-ia
    # Data Services
    - apiVersion: apps/v1
      kind: Deployment
      name: forecasting-service
      namespace: bakery-ia
    - apiVersion: apps/v1
      kind: Deployment
      name: notification-service
      namespace: bakery-ia
  postBuild:
    substituteFrom:
      - kind: ConfigMap
        name: bakery-ia-config
        optional: true
      - kind: Secret
        name: bakery-ia-secrets
        optional: true