digitalocean / clusterlint

A best practices checker for Kubernetes clusters. 🤠
Apache License 2.0
542 stars 45 forks source link

Add method to build a kubernetes client from yaml #37

Closed varshavaradarajan closed 5 years ago

timoreimann commented 5 years ago

I didn't know there was a way to read kubeconfigs from YAML too, interesting.

Curious, do we want to support the standard way of parsing the KUBECONFIG env var (for which there are helpers in client-go already) too? Or is that possibly already a thing. (Sorry, haven't been following clusterlint too closely lately.)

varshavaradarajan commented 5 years ago

@timoreimann - did this for the k8saassvc integration with clusterlint, where we get the user's kubeconfig as yaml.

Reading from the env var is not supported right now in clusterlint. We default to ~/.kube/config if a file path is not provided. We can add support for parsing the env var too. I'll raise another PR for it in sometime. Merging this one.

timoreimann commented 5 years ago

@varshavaradarajan sounds good, thanks for explaining 💯