controller-runtime icon indicating copy to clipboard operation
controller-runtime copied to clipboard

adding capability for accessing Kubernetes raw config

Open developer-guy opened this issue 3 years ago • 0 comments

In the current design, there is no way of accessing the context name through the pkg/client/config^1 package of controller-runtime. So, for people who might want to access the raw config for accessing the details of the kubeconfig file, it'd be nice to add support for providing an additional method to address this.

func GetConfig() (*rest.Config, error)
func GetConfigOrDie() *rest.Config
func GetConfigWithContext(context string) (*rest.Config, error)
func GetRawConfig() (clientcmdapi.Config, error) <-- adding this 

cc: @dentrax

developer-guy avatar Jul 22 '22 06:07 developer-guy