Unlike Astro CLI deploys, an object storage mount doesn’t require rebuilding a Docker image or restarting your Airflow service. A Dag you add to the bucket or container appears in the Airflow UI without downtime.
Astro Private Cloud 2.2This feature was introduced in Astro Private Cloud 2.2. To access this feature, upgrade your Astro Private Cloud installation to 2.2 or later.
How object storage mount deploys work
When you configure an object storage mount for a Deployment:- APC selects the CSI driver from the cluster’s
cloudProvider(gcp,aws, orazure). - APC mounts your bucket or container read-only at
/usr/local/airflow/dags(or a custommountPath) on the Airflow components that read Dags. - APC sets
AIRFLOW__CORE__DAGS_FOLDERto the mount path on the Dag-reading components. - The mounted storage authenticates as the cloud IAM identity you provide, bound to the Deployment’s Kubernetes service accounts (KSAs).
- You deploy Dags by writing files directly to the bucket or container.
Prerequisites
- APC 2.2 installed with the standalone
dag-processorenabled - An existing storage bucket or container in your cloud (GCS bucket, S3 bucket, or Azure Blob container)
- A cloud IAM identity (GCP service account, AWS IAM role, or Azure managed identity) with read access to the storage, bound to the service accounts that the Deployment’s Pods use:
dag-processor,scheduler,triggerer, andworker - The native object-storage CSI driver enabled on your cluster (see Provision cloud prerequisites)
- The cluster’s
cloudProviderset correctly toaws,azure, orgcp
APC normally seeds the cluster’s cloud provider from the region’s cloud when you create the cluster. To verify or change it, go to the Clusters page in the APC UI, select your cluster, and confirm the cloud provider is
aws, azure, or gcp. If it’s unset or wrong, the mount can’t select a driver and fails with Object Storage mount is not supported for cloud provider: ....Implementation considerations
- Object storage mount requires the standalone
dag-processorcomponent. - The mount deploys only Dags. To add Python dependencies or system packages, update your
requirements.txtandpackages.txtfiles and deploy using the CLI or CI/CD. - The cluster’s
cloudProvidermust beaws,azure, orgcp(case-insensitive) so APC can derive the CSI driver. See Prerequisites.
Cloud-specific notes
- AWS (S3)
- GCP (GCS)
- Azure (Blob)
- If the S3 bucket is in a different region than the EKS cluster, you must pass the region of the bucket in
volumeAttributes. - The Mountpoint driver doesn’t support inline ephemeral volumes. APC provisions a cluster-scoped
PersistentVolumeandPersistentVolumeClaimfor the mount. This requires permission to create cluster-scoped resources, the same constraint as NFS. - Unlike GKE, the S3 driver doesn’t inject a sidecar.
Enable object storage mount
A System Admin must enable object storage mount deploys at the cluster level.1
Open the cluster
In the APC UI, go to your Clusters page and select your cluster.
2
Add the override
On the cluster details page, click Edit. In the Cluster Deployments Configuration YAML editor, click Find, search for the feature you want to override, then add the following override:For details on using the UI for configuration, see Override base configuration.
3
Save your changes
Save and apply your changes in the UI.
Provision cloud prerequisites
Each tab enables the CSI driver on the cluster, creates a read-only IAM identity for your storage, and binds it to the Deployment’s KSAs. You end with the two values you enter in APC: a Storage URI and an IAM Identity.- AWS (S3)
- GCP (GCS)
- Azure (Blob)
1
Associate the OIDC provider
Ensure an OpenID Connect (OIDC) provider is associated with the EKS cluster:
2
Create an IAM policy
Create an IAM policy that grants read on the bucket. Mountpoint needs
ListBucket and GetObject:3
Install the Mountpoint for Amazon S3 CSI driver add-on
Install the Mountpoint for Amazon S3 CSI driver add-on with an IAM role for service accounts (IRSA) for its service account (
kube-system:s3-csi-driver-sa):4
Create the workload IAM role
Create the workload IAM role that the Dag Pods assume, and attach the read policy. Because APC’s per-Deployment KSA names aren’t known ahead of time, trust a wildcard subject with If you use namespace pools or manual release names, you can use an exact match for the namespaces that need an object storage mount, or attach the policy after you create the Deployment and know its namespace name.
StringLike:- Storage URI:
s3://<bucket>/<prefix> - IAM Identity: The workload role ARN,
arn:aws:iam::<account_id>:role/<cluster>-dags-reader. APC stamps it aseks.amazonaws.com/role-arnon the KSAs, and the static PV usesauthenticationSource: pod.
Configure object storage mount for a Deployment
- UI
- API
1
Open the Deployment
In the APC UI, create a new Deployment or open an existing one.
2
Select the mechanism
Go to DAG Deployment in the Deployment settings and select Object Storage Mount as the mechanism.
3
Enter the storage details
Enter the Storage URI and IAM Identity from your cloud setup. Optionally set a custom Mount Path. The default is
/usr/local/airflow/dags.4
Apply your changes
Click Create Deployment or Deploy Changes.
Deploy Dags to storage
Upload Dag files to your bucket or container under the prefix in your Storage URI.- AWS (S3)
- GCP (GCS)
- Azure (Blob)
Verify the object storage mount
Verify the volume is mounted in the Dag-processing Pods:Troubleshooting
Dags aren’t appearing
- Confirm the file landed in the bucket or container under the prefix in your Storage URI.
-
Confirm the mount is present:
- Confirm the IAM identity is bound to the Pod’s service account and has read access to the storage.
Dags take a long time to appear
Change thedag-processor defaults:
refresh_interval(AIRFLOW__DAG_PROCESSOR__REFRESH_INTERVAL): How often the Dag processor scans the Dag source for new or removed files. The default is 300 seconds.min_file_process_interval(AIRFLOW__DAG_PROCESSOR__MIN_FILE_PROCESS_INTERVAL): The minimum interval before the Dag processor re-parses each file. This governs how quickly edits to existing Dags are picked up. The default is 30 seconds. Lower values raise Dag processor CPU usage.
failed to find the sidecar container in Pod spec (GKE)
APC automatically sets the gke-gcsfuse/volumes: "true" annotation, which injects the gcsfuse sidecar. If you see this error, confirm the GCS Fuse CSI driver add-on is enabled on the cluster. See the GCP tab in Provision cloud prerequisites.
Region mismatch (AWS)
If the mount is empty or fails, check whether the S3 bucket and the EKS cluster are in the same AWS region. If they’re in different regions, pass the bucket’s region involumeAttributes. See the AWS tab in Cloud-specific notes.
Authentication failures (Azure)
Confirm a federated identity credential exists for each of the Deployment’s KSAs (dag-processor, scheduler, triggerer, and worker).
Object Storage mount is not supported for cloud provider
The cluster’s cloudProvider is unset or not one of aws, azure, or gcp. See Prerequisites. Set it with the updateCluster mutation: