Closed data219 closed 3 years ago
With this one I say we roughly follow the conventions here (both in naming and preference/order): https://github.com/kubernetes-client/javascript/blob/master/src/config.ts#L285
configs precedence and method named adjusted according to JS implementation.
The docblock logic is backward on this now. And should it be updated to catch error instead of exception now?
Absolutely! I swapped the logic in the comment and made it catch Error.
I’ll snap a release in a few hours with the fixes. Thanks for the contributions!
OK just snapped v0.3.3
. Thanks again!
Convenience method to ease bootstrapping the config. Just a simple method trying if in cluster config or config file config is to be found at the default locations and giving in cluster config precedence over config file variant.
Requires PR #5 to work correctly.
While using in cluster config in production/staging, I guess many people might want to use config files in local development. This method eases such setups and helps with the distinction between hosting environments. (Which requires knowledge of k8s that should not concern bootstrapping code.)