Helps to export Apache Airflow connections from source setup to a target k8s-based deployment.
Converts connections export file, produced by airflow CLI tool to the secrets manifest for
Official Airflow Helm Chart
based k8s deployment
Connections settings are described here
Produces a secret.yaml
manifest for applying with kubectl
and a values.yaml
data to append to Helm Chart's .Values.secret
section
before updating
Follow the steps:
-
Export connections from a source setup via airflow CLI tool:
airflow connections export --file-format=yaml connections.yaml
-
Copy the exported data file
connections.yaml
via scp to your laptop -
Execute the script to convert data, setting required namespace and an exported file path:
connections2secrets.py --namespace=my-airflow --source=./connections.yaml
-
Apply the generated
secret.yaml
manifest viakubectl
kubectl apply -f secret.yaml
-
Append the
.Values.secret
section of your values file with the data from generatedvalues.yaml
-
Update the helm chart deployment as described here