Overview
Apache Airflow is an open-source platform for programmatically authoring, scheduling, and monitoring workflows. This template deploys a full Airflow stack using CeleryExecutor, with Redis as the task queue broker and PostgreSQL as the metadata database. Celery workers can optionally be autoscaled using KEDA based on queue depth.What Gets Created
- GVC — A dedicated GVC across the specified locations.
- Airflow Webserver — The Airflow web UI for managing DAGs, monitoring task execution, and viewing logs.
- Celery Workers — Distributed task execution workers that process DAG tasks.
- Redis — A Redis broker for the Celery task queue, with persistent storage.
- PostgreSQL — A PostgreSQL database for Airflow metadata storage.
- Volume Sets — Persistent storage for Airflow DAG data, PostgreSQL, and Redis.
- KEDA ScaledObject (optional) — Automatically scales Celery workers up or down based on Redis queue length.
- Secret — A dictionary secret containing the PostgreSQL credentials, JWT signing key, Fernet encryption key, and admin password, shared across all Airflow workloads.
- Identity & Policy — An identity bound to the workloads with
revealaccess to the Airflow configuration secret.
Pre-Deployment Checklist
Before deploying, generate and set the following required values invalues.yaml:
| Value | How to generate |
|---|---|
airflow.auth.jwtSecret | openssl rand -base64 48 |
airflow.auth.fernetKey | python3 -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())' |
airflow.admin.password | Choose a strong password |
postgres.config.password | Choose a strong password |
Installation
This template has no external prerequisites. To install, follow the instructions for your preferred method:UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
The defaultvalues.yaml for this template:
GVC
gvc.name— The name of the GVC. Must be unique per deployment.gvc.locations— List of cloud locations to deploy to (e.g.,aws-eu-central-1).
PostgreSQL
postgres.image— PostgreSQL Docker image.postgres.resources— CPU and memory bounds for the PostgreSQL workload (minCpu,maxCpu,minMemory,maxMemory).postgres.config.username/postgres.config.password— Database credentials. Change the default password before deploying to production.postgres.config.database— Name of the Airflow metadata database (default:airflow).postgres.volumeset.capacity— Persistent storage for PostgreSQL data (GiB, minimum 10).
Redis
redis.image— Redis Docker image.redis.resources— CPU and memory allocated to Redis.redis.volumeset.capacity— Persistent storage for Redis data (GiB, minimum 10).
Airflow Webserver and Workers
airflow.webserver.image/airflow.celeryWorker.image— Docker images for the webserver and Celery workers.airflow.webserver.resources/airflow.celeryWorker.resources— CPU and memory per component.airflow.webPort— Port the Airflow web UI listens on (default8080).
Authentication
Airflow 3.x requires three security credentials, all of which must be changed before deploying to production:airflow.auth.jwtSecret— Secret key used to sign JWT tokens for API authentication. Generate a secure value with:airflow.auth.fernetKey— Key used to encrypt stored connections and variables. Generate with:airflow.auth.jwtExpirationDelta— Token lifetime in seconds (default3600).airflow.auth.jwtRefreshThreshold— Seconds before expiry at which a token refresh is allowed (default300).
Admin Account
airflow.admin.username— Username for the initial Airflow admin account (default:admin).airflow.admin.password— Password for the initial admin account. Change before deploying to production.
SimpleAuthManager. Credentials are written to a password file on the shared volume and re-applied on every container restart, so the password always reflects the current value in values.yaml.
SimpleAuthManager is the default auth manager in Airflow 3.x and is suitable for development and internal deployments. For production deployments requiring SSO or LDAP, consider integrating an external auth provider via OAuth/OIDC.Scheduler
airflow.scheduler.dagDirListInterval— How often the scheduler scans the DAG folder for new or modified files (seconds).airflow.scheduler.minFileProcessInterval— Minimum interval between processing the same DAG file (seconds).
Celery
airflow.celery.workerConcurrency— Number of tasks a single Celery worker can execute concurrently.
Storage
volumeset.airflow.capacity— Persistent storage for the Airflow home directory shared across workloads (GiB, minimum 10).
postgres.volumeset.capacity and redis.volumeset.capacity).
The Airflow volume uses a shared (NFS-style) filesystem, allowing both the webserver and Celery workers to read DAGs and write logs to the same volume.
Firewall
firewallConfig.inboundAllowCIDR— List of CIDR ranges allowed to reach the Airflow webserver. Defaults to0.0.0.0/0(public). Restrict to specific IP ranges in production.
Git-Sync
Git-sync runs as a sidecar container on the webserver and Celery worker workloads, continuously pulling DAGs from a Git repository into the shared Airflow volume. This is the recommended approach for managing DAGs in production.| Property | Description |
|---|---|
gitSync.enabled | Enable or disable the git-sync sidecar |
gitSync.repo | Git repository URL (e.g. https://github.com/org/dags) |
gitSync.branch | Branch to sync (default: main) |
gitSync.period | Sync interval (default: 60s) |
gitSync.subPath | Optional subfolder within the repo containing DAG files |
gitSync.auth.token | Personal access token for private repositories (leave empty for public repos) |
/opt/airflow/dags directory on the Airflow volume.
KEDA Autoscaling
KEDA scales Celery workers automatically based on the Redis queue length.KEDA is not supported in
gcp/us-central1.| Property | Description |
|---|---|
keda.enabled | Enable or disable KEDA autoscaling |
keda.minScale | Minimum number of Celery workers |
keda.maxScale | Maximum number of Celery workers |
keda.scaleToZeroDelay | Seconds of inactivity before scaling to zero |
keda.listLength | Redis queue length that triggers a scale-up |
keda.cooldownPeriod | Seconds to wait between scaling events |
keda.initialCooldownPeriod | Seconds after startup before autoscaling activates |
keda.pollingInterval | Interval at which KEDA queries Redis for metrics (seconds) |
Connecting to Airflow
Once deployed, the Airflow web UI is available at the workload’s canonical endpoint:airflow.admin.username and airflow.admin.password set in values.yaml.
This template creates a GVC with a default name defined in the values file. If you plan to deploy multiple instances, you must assign a unique GVC name for each deployment.
API Access
Airflow 3.x uses JWT-based authentication for API access. To obtain a token:Production Considerations
- Change all
CHANGE_MEvalues before deploying —jwtSecret,fernetKey,admin.password, andpostgres.config.passwordare all required. - Restrict
firewallConfig.inboundAllowCIDRto trusted IP ranges to limit access to the Airflow UI. - Enable git-sync for reliable, version-controlled DAG delivery.
- Auth:
SimpleAuthManageris not recommended for deployments requiring enterprise SSO. Evaluate an OAuth/OIDC integration for those use cases.
External References
Apache Airflow Documentation
Official Apache Airflow documentation
CeleryExecutor
Learn about the CeleryExecutor and distributed task execution
KEDA Documentation
Kubernetes Event-driven Autoscaling documentation
Redis Documentation
Official Redis documentation
git-sync
git-sync sidecar documentation
Airflow Template
View the source files, default values, and chart definition