-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add default kube config location #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current coverage is 93.40% (diff: 42.85%)@@ master #64 diff @@
==========================================
Files 9 9
Lines 632 637 +5
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 594 595 +1
- Misses 38 42 +4
Partials 0 0
|
def list_kube_config_contexts(config_file): | ||
def list_kube_config_contexts(config_file=None): | ||
|
||
if not config_file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use if config_file is not None
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean if config_file is None
right?
@@ -259,6 +264,9 @@ def load_kube_config(config_file, context=None): | |||
from config file will be used. | |||
""" | |||
|
|||
if not config_file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use if config_file is not None
here.
8d0607c
to
fff29bf
Compare
Watch properly decode resourceVersion from custom object response
kubenetes.config.load_config
needs the location of config file to load it. We can set the location to the default location of ~/.kube/config.