airflow

by fajarhide

Helm chartv8.0.4App 2.0.1

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 evermos/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 evermos https://evermos.github.io/helm-charts
$ helm install my-release evermos/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

The following tables lists the configurable parameters of the Airflow chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil

Common parameters

ParameterDescriptionDefault
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[]
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)nil
extraEnvVarsExtra environment variables to add to web, worker and scheduler podsnil
extraEnvVarsCMConfigMap containing extra env vars to add to web, worker and scheduler podsnil
extraEnvVarsSecretSecret containing extra env vars to add to web, worker and scheduler podsnil
fullnameOverrideString to fully override airflow.fullname template with a stringnil
initContainersList of init containers to be added to the web, worker and scheduler podsnil
nameOverrideString to partially override airflow.fullname template with a string (will prepend the release name)nil
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{} (evaluated as a template)
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 hardsoft
podSecurityContext.enabledEnable pod security contexttrue
podSecurityContext.fsGroupfsGroup ID for the pod1001
rbac.createIf true, create & use RBAC resourcesfalse
serviceAccount.annotationsAnnotations for service account{}
serviceAccount.createIf true, create a service accountfalse
serviceAccount.nameThe name 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 adde to web, worker and scheduler podsnil
tolerationsTolerations for pod assignment[] (evaluated as a template)

Airflow common parameters

ParameterDescriptionDefault
auth.existingSecretName of an existing secret containing password and fernet key ('airflow-password and 'airflow-fernetKey' keys)nil
auth.fernetKeyFernet key to secure connectionsnil
auth.forcePasswordForce users to specify a passwordfalse
auth.passwordPassword to access web UInil
auth.usernameUsername to access web UIuser
configurationConfigMapName of an existing config map containing the Airflow config filenil
dagsConfigMapName of an existing config map containing all the DAGs files you want to load in Airflow.nil
executorAirflow executor, it should be one of SequentialExecutor, Local Executor, CeleryExecutor, KubernetesExecutor"CeleryExecutor"
loadExamplesSwitch to load some Airflow examplesfalse

Airflow web parameters

ParameterDescriptionDefault
web.argsOverride default container args (useful when using custom images)nil
web.baseUrlURL used to access to airflow web uinil
web.commandOverride default container command (useful when using custom images)nil
web.configMapConfig map name for ~/airflow/webserver_config.pynil
web.containerPortContainer port to be used for exposing http server.8080
web.customLivenessProbeCustom liveness probe for the web component{}
web.customReadinessProbeCustom rediness probe for the web component{}
web.extraEnvVarsArray containing extra env varsnil
web.extraEnvVarsCMConfigMap containing extra env varsnil
web.extraEnvVarsSecretSecret containing extra env vars (in case of sensitive data)nil
web.hostAliasesAdd deployment host aliases[]
web.extraVolumeMountsArray of extra volume mounts to be added (evaluated as template). Normally used with extraVolumes.nil
web.extraVolumesArray of extra volumes to be added (evaluated as template).nil
web.image.debugSpecify if debug values should be setfalse
web.image.pullPolicyAirflow web image pull policyIfNotPresent
web.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
web.image.registryAirflow web image registrydocker.io

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 v8.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