Testing strategy for Airflow Kubernetes Operator

9/22/2019

I would like to add a check/test for the Airflow Kubernetes Operators that I am using. Preferably this would be lightweight so I wound't have to run a Kubernetes cluster locally to run the test. I was thinking that maybe I could render the yaml and then use Kubernetes to check with a dry-run flag that the Pod would actually deploy.

Is it there a way to render the yaml for the Kubernetes deploy that corresponds to a Kubernetes Airflow Operator. I have poked around in the Airflow code and it doesn't seem straightforward to get the fully rendered request. https://github.com/apache/airflow/blob/master/airflow/contrib/operators/kubernetes_pod_operator.py#L157

-- Ben
airflow
airflow-operator
kubernetes

0 Answers