Allow null values when parsing exec from kubeconfig #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many kubeconfig generators & tutorials (such as the default setup for GKE) cause
null
values to be added for user.exec.env and user.exec.args. The official client found it relevant to fix this exact issue here in 2018: kubernetes-client/python-base#91This relaxes the auth code to treat null/falsey values as empty args/env.
While a workaround is removing the null rows from one's kubeconfig, it's not necessarily given that people know how to do this (or have permissions, with certain setups!), so it can cause first-time users to see a TypeError as the first thing they see upon using the library. There should be no downsides to the fix.