This feature requires Airflow 3.x Deployments. Configuring multiple DAG bundles in a single Deployment is only supported in Remote Execution mode.
DAG bundle types
Choose between two types of DAG bundles:- GitDagBundle: Dags stored in a Git repository (recommended for production)
- LocalDagBundle: Dags stored in the container image or persistent volume (default)
When to use each bundle type
Use GitDagBundle when:- Running production deployments
- Tracking DAG versions with full rerun capabilities
- Storing dags in version control systems
- Managing multiple teams or DAG repositories
- Running development or testing environments
- Building dags into container images
- Using existing PVC-based DAG management
- Preferring simpler configuration
Dag hashing
The Dag processor computes a hash of each Dag and caches it. On each processing cycle, the Dag processor compares the current hash of a Dag against the cached value:- If the hash matches, the Dag is unchanged, so the Dag processor skips it instead of re-sending it to the Astro orchestration plane.
- If the Dag is new, changed, or not yet in the cache, the Dag processor processes it and updates the cache.
dag_processor_cache_hits_total, dag_processor_cache_misses_total, and dag_processor_cache_size metrics. See Dag processor metrics.
Dag hashing functionality is enabled by default, starting on Astro Agent client release
1.8.0 and later. You can disable that feature at any time with the following environment variable: ASTRO_AGENT_CLIENT_DAG_PROCESSOR__ENABLE_DAG_CACHING=False.Configure GitDagBundle
GitDagBundle fetches dags from Git repositories and provides automatic versioning capabilities.Supported authentication methods
GitDagBundle supports the following authentication methods:- Access tokens (personal access tokens, OAuth tokens)
- SSH keys
- SSH agent
Required token permissions by provider
When you create an access token, grant the minimum permissions required to read repository contents:Configure public repository
For public repositories, no authentication configuration is required. Configure only the repository URL and tracking reference:values.yaml
Configure private repository
For private repositories, configure both the DAG bundle and an Airflow connection for authentication.1
Create Git connection
Add an Airflow connection environment variable in For production environments, store connection credentials in a secrets backend instead of
values.yaml. The connection name suffix must match the git_conn_id value in your DAG bundle configuration.- Access token (HTTPS)
- SSH key (deploy key)
Use this method with a Personal Access Token (PAT) or OAuth token. Set See Required token permissions by provider for the minimum permissions each provider requires.
login to your Git username and password to the token value.values.yaml
The connection name
AIRFLOW_CONN_GIT_REPO creates a connection with ID git_repo. This ID must match the git_conn_id value in your DAG bundle configuration.values.yaml. See Use a secrets backend for Git credentials for an example using Azure Key Vault.2
Configure DAG bundle
Configure the DAG bundle with matching Note that
git_conn_id:values.yaml
git_conn_id: "git_repo" matches the connection ID from the AIRFLOW_CONN_GIT_REPO environment variable.3
Update Helm release
Apply the configuration:
Configure refresh interval
Control how frequently agents check for repository updates using therefresh_interval parameter:
values.yaml
Use a secrets backend for Git credentials
For production environments, use a secrets backend to store Git connection credentials instead of hardcoding them invalues.yaml. The following example shows how to configure Azure Key Vault with workload identity authentication on Azure AKS.
1
Configure Azure Key Vault as secrets backend
Add the secrets backend configuration to your This configuration uses Azure workload identity for authentication, which is the recommended approach for Azure AKS environments. For other authentication methods, see Azure Key Vault secrets backend.
values.yaml:values.yaml
2
Store Git connections in Azure Key Vault
Create secrets in Azure Key Vault for each Git connection. The secret name must follow the pattern Repeat this process for each Git repository connection you need.
<connections_prefix>-<connection-id>. For example, to create a connection with ID git-repo1-conn:- In Azure Key Vault, create a secret named
airflow-connection-git-repo1-conn. - Set the secret value to a JSON connection string:
3
Configure DAG bundles with connection references
Configure your DAG bundles to reference the connections stored in Azure Key Vault:The
values.yaml
git_conn_id values must match the connection IDs you created in Azure Key Vault (without the airflow-connection- prefix).4
Update Helm release
Apply the configuration:
Configure LocalDagBundle
LocalDagBundle reads dags from the local filesystem. This is the default dag bundle type.DAG storage options
Choose one of two methods to provide dags to agents: Option 1: Include dags in container image Build a custom agent image that includes your DAG files. Copy dags into the/dags folder during image build.
Option 2: Mount Persistent Volume Claim
Create a PVC containing your dags and mount it into all agent components (Dag Processor, Worker, and Triggerer) at the same path.
Configure DAG path
LocalDagBundle looks for dags in/dags by default. Specify a different path using the path parameter:
values.yaml
Configure with container image
1
Build custom image
Create a Dockerfile extending the base agent image:
Dockerfile
2
Update values file
Reference your custom image in
values.yaml:values.yaml
3
Update Helm release
Apply the configuration:
Configure with Persistent Volume Claim
1
Create PVC
Create a PersistentVolumeClaim in your Kubernetes namespace:Apply the PVC:
pvc.yaml
2
Configure volume mounts
Update
values.yaml to mount the PVC into all components:values.yaml
3
Update Helm release
Apply the configuration:
GitDagBundle compared to LocalDagBundle
Both bundle types support DAG versioning in the Airflow UI, but GitDagBundle provides additional capabilities:DAG versioning
Airflow 3 automatically tracks DAG versions when you use DAG bundles. Each DAG run associates with a specific DAG version visible in the Airflow UI. Key behaviors:- New versions are created for structural changes (tasks, dependencies, schedules)
- The scheduler uses the latest DAG version to create new runs
- You can view code for any previous DAG version in the UI
- GitDagBundle allows rerunning tasks with their original code version
Next steps
After configuring DAG sources:- Deploy Remote Execution project - Build and deploy your Airflow project
- Configure logging - Set up task log collection
- Configure OpenLineage - Enable data lineage tracking