Update dependencies (#163)

* update dependencies

* fix kubeconfig loader

* use pipenv

* add missing pipenv shell

* tox-pipenv

* pipenv on Travis

* add cache files to gitignore
This commit is contained in:
Henning Jacobs
2018-05-01 14:46:37 +02:00
committed by GitHub
parent 74bf801bc3
commit 07df4e81c3
13 changed files with 7673 additions and 1325 deletions

View File

@@ -141,7 +141,7 @@ class KubeconfigDiscoverer:
if self._contexts and context['name'] not in self._contexts:
# filter out
continue
config = kubernetes.client.ConfigurationObject()
config = kubernetes.client.configuration.Configuration()
kubernetes.config.load_kube_config(config_file, context=context['name'], client_configuration=config)
authorization = config.api_key.get('authorization')
if authorization:

View File

@@ -89,7 +89,7 @@ def query_kubernetes_cluster(cluster):
termination_time = parse_time(termination_time)
if termination_time > last_termination_time:
last_termination_time = termination_time
if (last_termination_time and last_termination_time < now - 3600) or (obj['reason'] in 'Evicted'):
if (last_termination_time and last_termination_time < now - 3600) or (obj.get('reason') == 'Evicted'):
# the job/pod finished more than an hour ago or if it is evicted by cgroup limits
# => filter out
continue