According to the stable/airflow docs you can:
mount a file to /requirements.txt to get additional Python modules for your DAGs to be installed on container start. Use the extraConfigMapMounts configuration option for this.
But the README is a bit thin on documentation for this option:
| airflow.extraConfigmapMounts | Additional configMap volume mounts on the airflow pods. | [] |
Can anyone give an example of how I can link a requirements.txt file stored locally to my (local) kubernetes cluster?
The values.yaml
file in the root of the stable/airflow
repo has an example of how to do this:
airflow:
extraConfigmapMounts: []
# - name: extra-metadata
# mountPath: /opt/metadata
# configMap: airflow-metadata
# readOnly: true
#
# Example of configmap mount with subPath
# - name: extra-metadata
# mountPath: /opt/metadata/file.yaml
# configMap: airflow-metadata
# readOnly: true
# subPath: file.yaml