Skip to content

feat: add dag sync from S3 bucket support - #77

Merged
santosr2 merged 1 commit into
mainfrom
feat/add-dag-bucket-sync-support
Oct 28, 2025
Merged

santosr2 merged 1 commit into
mainfrom
feat/add-dag-bucket-sync-support

Conversation

@santosr2

@santosr2 santosr2 commented Oct 28, 2025 •

Copy link
Copy Markdown
Owner

What issues does your PR fix?

What does your PR do?

Summary

This PR introduces a new dags.bucketSync feature that enables automatic synchronization of DAG files from cloud storage buckets (S3, and future support for GCS/Azure) into Airflow pods. This provides an alternative to git-sync for teams storing DAGs in object storage.

Motivation

Many organizations store their Airflow DAGs in cloud storage buckets (S3, GCS, Azure Blob) rather than Git repositories. Previously, users had to:

  • Manually implement custom init containers or sidecars
  • Use PersistentVolumes with external sync mechanisms
  • Build DAGs into container images

This feature provides native, first-class support for cloud storage bucket synchronization with the same user experience as git-sync.

Key Features

Supported Providers

  • AWS S3 (including S3-compatible storage like MinIO, DigitalOcean Spaces, Ceph)
  • Google Cloud Storage (GCS) - planned
  • Azure Blob Storage - planned

Authentication Methods (S3)

  1. IAM Roles for Service Accounts (IRSA) - Recommended
  2. Kubernetes Secrets - Alternative
  3. Inline Credentials - Not Recommended for production environments

Core Capabilities

  • Automatic syncing - Continuous sync at configurable intervals
  • SubPath support - Sync specific subdirectories within buckets
  • Flexible sync flags - Pass custom AWS CLI flags for filtering
  • Resource management - Configurable resource limits for sync containers
  • Failure handling - Configurable max consecutive failures before aborting
  • S3-compatible storage - Works with MinIO, DigitalOcean Spaces, etc.

Mutual exclusivity with Git-Sync

dags.bucketSync and dags.gitSync are mutually exclusive - only one can be enabled at a time. Both sync to /dags/repo/, which would cause conflicts if both were enabled. However, when/if we introduce the PVC approach to reduce the container count, as discussed in #25, we may enable the possibility of having both enabled to sync DAGs and/or plugins simultaneously.

New Values

  • dags.bucketSync.enabled (default: false)
  • dags.bucketSync.provider (default: s3)
  • dags.bucketSync.subPath
  • dags.bucketSync.syncInterval (default: 60)
  • dags.bucketSync.resources
  • dags.bucketSync.maxFailures (default: 0)
  • dags.bucketSync.s3.bucket
  • dags.bucketSync.s3.key (default: dags)
  • dags.bucketSync.s3.region
  • dags.bucketSync.s3.image.*
  • dags.bucketSync.s3.syncFlags
  • dags.bucketSync.s3.credentialsSecret
  • dags.bucketSync.s3.credentialsSecretAccessKeyKey (default: aws_access_key_id)
  • dags.bucketSync.s3.credentialsSecretSecretKeyKey (default: aws_secret_access_key)
  • dags.bucketSync.s3.credentialsSecretSessionTokenKey (default: aws_session_token)
  • dags.bucketSync.s3.accessKeyId
  • dags.bucketSync.s3.secretAccessKey
  • dags.bucketSync.s3.sessionToken
  • dags.bucketSync.s3.endpoint

Note

This PR introduces AWS S3 support as the first cloud storage provider. The architecture is designed to easily extend to GCS and Azure in future PRs.

Checklist

For all Pull Requests

For releasing ONLY

@santosr2 santosr2 self-assigned this Oct 28, 2025
@santosr2 santosr2 added the enhancement New feature or request label Oct 28, 2025
@santosr2 santosr2 added this to the airflow-8.10.0 milestone Oct 28, 2025
@santosr2
santosr2 force-pushed the feat/add-dag-bucket-sync-support branch 5 times, most recently from d417886 to f907f8a Compare October 28, 2025 16:48
Signed-off-by: Rubens <rubenssegundo404@gmail.com>
@santosr2
santosr2 force-pushed the feat/add-dag-bucket-sync-support branch from f907f8a to cdf2466 Compare October 28, 2025 16:53
@santosr2
santosr2 marked this pull request as ready for review October 28, 2025 17:18
@santosr2
santosr2 merged commit 70b90ea into main Oct 28, 2025
3 checks passed
@santosr2
santosr2 deleted the feat/add-dag-bucket-sync-support branch October 28, 2025 17:43
santosr2 added a commit that referenced this pull request Mar 10, 2026
- Fork PRs (#1, #13, #23, #77, #78) link to santosr2/airflow-community-chart
- Original repo PR (airflow-helm#863) links to airflow-helm/charts
- Revert incorrectly renamed PR links in older sections (8.9.0 and below)
  back to airflow-helm/charts where those PRs actually exist

Signed-off-by: Rubens <rubenssegundo404@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support loading DAG definitions from S3 buckets

1 participant