incubator-airflow/images/testing
Jarek Potiuk 21999dd56e
Added k9s as integrated tool to help with kubernetes testing (#12163)
The K9s is fantastic tool that helps to debug a running k8s
instance. It is terminal-based windowed CLI that makes you
several times more productive comparing to using kubectl
commands. We've integrated k9s (it is run as a docker container
and downloaded on demand). We've also separated out KUBECONFIG
of the integrated kind cluster so that it does not mess with
kubernetes configuration you might already have.

Also - together with that the "surrounding" of the kubernetes
tests were simplified and improved so that the k9s integration
can be utilized well. Instead of kubectl port forwarding (which
caused multitude of problems) we are now utilizing kind's
portMapping feature + custom NodePort resource that maps
port 8080 to 30007 NodePort which in turn maps it to 8080
port of the Webserver. This way we do not have to establish
an external kubectl port forward which is prone to error and
management - everything is brought up when Airflow gets
deployed to the Kind Cluster and shuts down when the Kind
cluster is stopped.

Yet another problem fixed was killing of postgres by one of the
kubernetes tests ('test_integration_run_dag_with_scheduler_failure').
Instead of just killing the scheduler it killed all pods - including
the Postgres one (it was named 'airflow-postgres.*'). That caused
various problems, as the database could be left in a strange state.
I changed the tests to do what it claimed was doing - so killing only the
scheduler during the test. This seemed to improve the stability
of tests immensely in my local setup.
2020-11-11 17:15:02 +01:00
..
k9s.png Added k9s as integrated tool to help with kubernetes testing (#12163) 2020-11-11 17:15:02 +01:00
kubeconfig-env.png Added k9s as integrated tool to help with kubernetes testing (#12163) 2020-11-11 17:15:02 +01:00
kubernetes-virtualenv.png Added k9s as integrated tool to help with kubernetes testing (#12163) 2020-11-11 17:15:02 +01:00
pytest-runner.png Added k9s as integrated tool to help with kubernetes testing (#12163) 2020-11-11 17:15:02 +01:00
run-test.png Added k9s as integrated tool to help with kubernetes testing (#12163) 2020-11-11 17:15:02 +01:00