Remote Execution Agents require configuration to access your DAG code. This guide covers configuring DAG bundles, which are collections of DAG files and supporting code introduced in Airflow 3.
This feature requires Airflow 3.x Deployments. Configuring multiple DAG bundles in a single Deployment is only supported in Remote Execution mode.
Choose between two types of DAG bundles:
Use GitDagBundle when:
Use LocalDagBundle when:
See GitDagBundle compared to LocalDagBundle for functional differences.
GitDagBundle fetches dags from Git repositories and provides automatic versioning capabilities.
GitDagBundle is recommended for production Remote Execution deployments.
GitDagBundle supports the following authentication methods:
Choose the method that aligns with your security requirements and infrastructure.
For public repositories, no authentication configuration is required. Configure only the repository URL and tracking reference:
For private repositories, configure both the DAG bundle and an Airflow connection for authentication.
Add an Airflow connection environment variable in values.yaml. The connection name suffix must match the git_conn_id value in your DAG bundle configuration.
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.
For production environments, store connection credentials in a secrets backend instead of values.yaml. See Use a secrets backend for Git credentials for an example using Azure Key Vault.
Control how frequently agents check for repository updates using the refresh_interval parameter:
The default refresh interval is 300 seconds. Reducing this value across many bundles may increase the risk of hitting Git provider rate limits.
For production environments, use a secrets backend to store Git connection credentials instead of hardcoding them in values.yaml. The following example shows how to configure Azure Key Vault with workload identity authentication on Azure AKS.
Add the secrets backend configuration to your values.yaml:
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.
Create secrets in Azure Key Vault for each Git connection. The secret name must follow the pattern <connections_prefix>-<connection-id>. For example, to create a connection with ID git-repo1-conn:
airflow-connection-git-repo1-conn.Repeat this process for each Git repository connection you need.
LocalDagBundle reads dags from the local filesystem. This is the default dag bundle type.
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.
LocalDagBundle looks for dags in /dags by default. Specify a different path using the path parameter:
Both bundle types support DAG versioning in the Airflow UI, but GitDagBundle provides additional capabilities:
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:
See Airflow DAG versioning for detailed information about versioning behavior.
After configuring DAG sources: