airflow

by [riftbit]

Helm chartv11.0.4App 2.1.4Verified publisher

Apache Airflow is a platform to programmatically author, schedule and monitor workflows.

About this chart

Apache Airflow

Apache Airflow is a platform to programmatically author, schedule and monitor workflows.

TL;DR

$ helm install my-release bitnami/airflow

Introduction

This chart bootstraps an Apache Airflow deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/airflow

These commands deploy Airflow on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override airflow.fullname template with a string (will prepend the release name)""
fullnameOverrideString to fully override airflow.fullname template with a string""
affinityAffinity for pod assignment (evaluated as a template){}
commonAnnotationsAnnotations to add to all deployed objects{}
commonLabelsLabels to add to all deployed objects{}
containerSecurityContext.enabledEnable container security contexttrue
containerSecurityContext.runAsUserUser ID for the container1001
extraDeployA list of extra kubernetes resources to be deployed[]
extraEnvVarsExtra environment variables to add to web, worker and scheduler pods[]
extraEnvVarsCMConfigMap containing extra env vars to add to web, worker and scheduler pods""
extraEnvVarsSecretSecret containing extra env vars to add to web, worker and scheduler pods""
initContainersList of init containers to be added to the web, worker and scheduler pods[]
networkPolicies.enabledSwitch to enable network policiesfalse
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set.""
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.[]
nodeSelectorNode labels for pod assignment{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard.""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard.soft
podSecurityContext.enabledEnable pod security contexttrue
podSecurityContext.fsGroupfsGroup ID for the pod1001
rbac.createIf true, create & use RBAC resourcesfalse
serviceAccount.annotationsAnnotations for service account. Evaluated as a template. Only used if create is true.{}
serviceAccount.createSpecifies whether a ServiceAccount should be createdfalse
serviceAccount.nameName of the service account to use. If not set and create is true, a name is generated using the fullname template.""
sidecarsList of sidecar containers to be added to web, worker and scheduler pods[]
tolerationsTolerations for pod assignment[]

Airflow common parameters

NameDescriptionValue
auth.existingSecretName of an existing secret containing password, fernet key and secret key ('airflow-password', 'airflow-fernetKey' and 'airflow-secretKey' keys)""
auth.fernetKeyFernet key to secure connections""
auth.forcePasswordForce users to specify a passwordfalse
auth.passwordPassword to access web UI""
auth.usernameUsername to access web UIuser
auth.secretKeySecret key to run your flask app""
configurationConfigMapName of an existing config map containing the Airflow config file""
executorAirflow executor, it should be one of 'SequentialExecutor', 'LocalExecutor', 'CeleryExecutor', 'KubernetesExecutor', 'CeleryKubernetesExecutor'CeleryExecutor
dagsConfigMapName of an existing config map containing all the DAGs files you want to load in Airflow""
loadExamplesSwitch to load some Airflow examplesfalse

Airflow web parameters

NameDescriptionValue
web.image.registryAirflow image registrydocker.io
web.image.repositoryAirflow image repositorybitnami/airflow
web.image.tagAirflow image tag (immutable tags are recommended)2.1.4-debian-10-r4
web.image.pullPolicyAirflow image pull policyIfNotPresent
web.image.pullSecretsAirflow image pull secrets[]
web.image.debugEnable image debug modefalse
web.replicaCountNumber of web replicas1
web.hostAliasesDeployment pod host aliases[]
web.baseUrlURL used to access to airflow web ui""
web.configMapName of an existing config map containing the Airflow webserver config file""
web.commandOverride default container command (useful when using custom images)[]
web.argsOverride default container args (useful when using custom images)[]
web.podLabelsAdd extra labels to the web's pods{}
web.podAnnotationsAdd extra annotations to the web's pods{}
web.containerPortContainer port to be used for exposing http server8080
web.extraVolumeMountsAdd extra volume mounts[]
web.extraVolumesAdd extra volumes[]
web.extraEnvVarsArray containing extra environment variables[]
web.extraEnvVarsCMConfigMap containing extra environment variables""
web.extraEnvVarsSecretSecret containing extra environment variables (in case of sensitive data)""
web.resources.limitsThe resources limits for the Web container{}
web.resources.requestsThe requested resources for the Web container{}
web.livenessProbe.enabledEnable livenessProbetrue
web.livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe180
web.livenessProbe.periodSecondsPeriod seconds for livenessProbe20
web.livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
web.livenessProbe.failureThresholdFailure threshold for livenessProbe6
web.livenessProbe.successThresholdSuccess threshold for livenessProbe1
web.readinessProbe.enabledEnable readinessProbetrue
`web.readinessProbe.initialDe

Deploy airflow with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has airflow on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartairflow is pinned at v11.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply