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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user