Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
use pykube-ng instead of pykube (#23)
Browse files Browse the repository at this point in the history
* use pykube-ng instead of pykube

* pykube-ng already expands home dir (~)
  • Loading branch information
hjacobs authored Mar 3, 2019
1 parent 03544c4 commit 3af2805
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 101 deletions.
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ verify_ssl = true
name = "pypi"

[packages]
pykube = "*"
jmespath = "*"
pykube-ng = "*"

[dev-packages]
flake8 = "*"
pytest-cov = "*"
pytest = "*"
coveralls = "*"
coverage = "*"

[requires]
python_version = "3.7"
108 changes: 9 additions & 99 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion kube_janitor/helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

import datetime
import pykube
import re
Expand Down Expand Up @@ -70,6 +71,6 @@ def get_kube_api():
config = pykube.KubeConfig.from_service_account()
except FileNotFoundError:
# local testing
config = pykube.KubeConfig.from_file(os.getenv('KUBECONFIG', os.path.expanduser('~/.kube/config')))
config = pykube.KubeConfig.from_file(os.getenv('KUBECONFIG', '~/.kube/config'))
api = pykube.HTTPClient(config)
return api

0 comments on commit 3af2805

Please sign in to comment.