Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Apache Airflow DAG Distribution Config

From Leeroopedia


Knowledge Sources
Domains Deployment, Kubernetes
Last Updated 2026-02-08 00:00 GMT

Overview

Concrete tool for configuring DAG file distribution in Kubernetes provided by the Helm chart dags configuration section.

Description

The Helm chart dags section configures how DAG files reach Airflow pods. It supports dags.persistence (PVC-based), dags.gitSync (git-sync sidecar), or baked into the Docker image (no dags section needed).

Usage

Configure the dags section in values.yaml based on your chosen distribution strategy.

Code Reference

Source Location

  • Repository: Apache Airflow
  • File: chart/values.yaml (dags section at ~L3404-3460)
  • File: chart/files/pod-template-file.kubernetes-helm-yaml

Signature

dags:
  mountPath: /opt/airflow/dags

  # Strategy 1: PVC
  persistence:
    enabled: false
    size: 1Gi
    accessMode: ReadWriteOnce
    storageClassName: ~
    existingClaim: ~

  # Strategy 2: Git-sync
  gitSync:
    enabled: false
    repo: ~
    branch: main
    subPath: ""
    rev: HEAD
    wait: 60             # seconds between syncs
    containerName: git-sync
    uid: 65533

Import

# Deploy with git-sync
helm install airflow apache-airflow/airflow \
  --set dags.gitSync.enabled=true \
  --set dags.gitSync.repo=https://github.com/my-org/dags.git

I/O Contract

Inputs

Name Type Required Description
dags.persistence.enabled bool No Enable PVC-based DAG distribution
dags.gitSync.enabled bool No Enable git-sync sidecar
dags.gitSync.repo str Conditional Git repository URL (required if gitSync enabled)
dags.gitSync.branch str No Git branch to sync (default main)

Outputs

Name Type Description
DAG volume mount Volume DAGs available at /opt/airflow/dags in all pods
Git-sync sidecar Container Continuous sync from Git repository
PVC PersistentVolumeClaim Shared storage for DAG files

Usage Examples

Git-sync Configuration

# my-values.yaml
dags:
  gitSync:
    enabled: true
    repo: https://github.com/my-org/airflow-dags.git
    branch: main
    subPath: dags/
    wait: 30

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment