[AIRFLOW-1517] Created more accurate failures for kube cluster issues
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/eeff4459 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/eeff4459 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/eeff4459 Branch: refs/heads/master Commit: eeff445969743626516825aea5ea559195eeaae3 Parents: ada7aed Author: Daniel Imberman <[email protected]> Authored: Fri Dec 29 14:06:42 2017 -0800 Committer: Daniel Imberman <[email protected]> Committed: Thu Jan 11 15:28:33 2018 -0800 ---------------------------------------------------------------------- airflow/contrib/kubernetes/kube_client.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/eeff4459/airflow/contrib/kubernetes/kube_client.py ---------------------------------------------------------------------- diff --git a/airflow/contrib/kubernetes/kube_client.py b/airflow/contrib/kubernetes/kube_client.py index 9db8641..89de3e6 100644 --- a/airflow/contrib/kubernetes/kube_client.py +++ b/airflow/contrib/kubernetes/kube_client.py @@ -19,13 +19,8 @@ def _load_kube_config(in_cluster): config.load_incluster_config() return client.CoreV1Api() else: - try: - config.load_kube_config() - return client.CoreV1Api() - except NotImplementedError: - NotImplementedError( - "requires incluster config or defined configuration in airflow.cfg") - + config.load_kube_config() + return client.CoreV1Api() def get_kube_client(in_cluster=True): # TODO: This should also allow people to point to a cluster.
