kubernetes_asyncio icon indicating copy to clipboard operation
kubernetes_asyncio copied to clipboard

add config.load_config() support

Open abi-jey opened this issue 3 years ago • 4 comments

Hi all, I think it would be useful to have support for simple load_config as implemented here, can someone give me feedback if this would be possible?

abi-jey avatar Mar 30 '23 11:03 abi-jey

Yes, it should be added. Would you like to work on it?

tomplus avatar Mar 30 '23 19:03 tomplus

i don't think that's necessary. that's basically what config.load_kube_config() does.

code here does the same thing, it's just wrapped by another class, you can check function load_kube_config inside it

@realabja

naufalafif avatar Apr 04 '23 21:04 naufalafif

@naufalafif, I think the difference is that load config first tries to load from config and if there's none than it tries to creat config from pod configuration, which is way you would need to call manually in kubernetes_asyncio.

I think I will try to make pr and sumerise it there, but basically cluster user and service account should be able to call the same function to initialize configuration

abi-jey avatar Apr 04 '23 21:04 abi-jey

i see, looks good

naufalafif avatar Apr 04 '23 22:04 naufalafif

I'm glad to hear I wasn't the only one looking for this function, but I am a bit surprised that no one beat me to the punch. It was a pretty simple copy and paste from the https://github.com/kubernetes-client/python repo. I've opened up a PR for it, please let me know if you want me to make updates! #331

james-mchugh avatar Aug 11 '24 22:08 james-mchugh