kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
8.99k stars 2.94k forks source link

ClientConfig.RawConfig(..) does not return the merged config as documented #1282

Closed IvoGoman closed 1 year ago

IvoGoman commented 1 year ago

I have just stumbled across this same issue #220, #735 with clientcmd.NewNonInteractiveDeferredLoadingClientConfig which uses DirectClientConfig under the hood. When retrieving the RawConfig the config is first merged e.g. merged_client_builder.go#L86-L93 However, it then returns the DirectClientConfig.RawConfig, which results in the Config without overrides.

The Interface ClientConfig implemented by DirectClientConfig explicitly mentions that RawConfig(..) should return the merged config.

Since the original issue is quite old could you kindly confirm if this is a documentation issue or indeed a bug in the implementation?

IvoGoman commented 1 year ago

closing, as this repository is merely a mirror.