nodeSelector:
  workload: general

# Web UI Ingress Configuration
ingress:
  web:
    enabled: true
    ingressClassName: traefik
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt
      traefik.ingress.kubernetes.io/router.entrypoints: web
    hosts:
      - name: airflow.dvirlabs.com
        tls:
          enabled: false

  flower:
    enabled: false

# PostgreSQL Configuration
postgresql:
  enabled: true
  auth:
    username: airflow
    password: airflow123
    database: airflow
  primary:
    nodeSelector:
      workload: general
    persistence:
      enabled: true
      storageClass: nfs-client
      size: 10Gi

# Airflow Executor Configuration
executor: KubernetesExecutor

# Database Configuration
data:
  metadataSecretName: ~

db:
  type: postgres
  host: airflow-postgresql.dev-tools.svc.cluster.local
  port: 5432
  user: airflow
  pass: airflow123
  dbName: airflow
  sslMode: disable
  
# Airflow Configuration
config:
  core:
    # Increase migration wait timeout to 10 minutes (600 seconds)
    migration_wait_timeout: 600
    # Enable SQL Alchemy connection pool
    sql_alchemy_pool_enabled: true
    sql_alchemy_pool_pre_ping: true
    sql_alchemy_max_overflow: 10
    sql_alchemy_pool_size: 5
  database:
    # Connection string format for postgres - will be auto-generated from db.* values
    sql_alchemy_conn: ~
  
# Migration Job Configuration - allows migrations to complete
migrationJob:
  enabled: true
  applyCustomEnv: true
  jobAnnotations: {}
  nodeSelector:
    workload: general
  # Extended timeout for database migrations
  backoffLimit: 5
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1024Mi

# Redis not needed with KubernetesExecutor
redis:
  enabled: false

# Airflow Home directory
airflowHome: /opt/airflow

# Default resources for Airflow pods
resources:
  requests:
    cpu: 250m
    memory: 256Mi
  limits:
    cpu: 1000m
    memory: 1024Mi

# DAG Processor Configuration
dagProcessor:
  enabled: true
  replicas: 1
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1024Mi
  nodeSelector:
    workload: general
  # Extended progress deadline for DAG processor initialization
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0

# Deployment progress deadline - increased from default 10m to 30m
deploymentProgressDeadlineSeconds: 1800

# Scheduler Configuration
scheduler:
  replicas: 1
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1024Mi
  nodeSelector:
    workload: general

# WebServer Configuration
webserver:
  replicas: 1
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1024Mi
  nodeSelector:
    workload: general

# Statsd exporter for metrics
statsd:
  enabled: true

# Labels
labels:
  app: airflow
