Try to get lease namespace if unspecified
This PR makes providing lease namespace optional. If unspecified, it will try to read from a file pointed by system property or env var kubenamespace with default value as /var/run/secrets/kubernetes.io/serviceaccount/namespace which is injected by k8s. The code is inspired by https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/Config.java.
The idea is to simplify use code because in most cases users will need to do the same. Please let me know if this makes sense. Thanks.
@csviri @metacosm
Shouldn't we consider this rather a bug? and put it to main?
wdyt @metacosm @honnix ?
@csviri I guess we can. :) Strictly speaking it is still more like a feature, but given this small breaking change, shipping it sooner seems to be better.
I'm making a small tweak.
Could you please help merge this so it doesn't stay too long and get conflict? Thank you.
yep, fine by me, @metacosm could you take a look pls?
I already approved it… 😁
The only question that remains is whether we should merge it in main or next…
If going to main results a bug fix release right way, it might make sense due to the small breaking change. It feels better to ship it sooner than later.
I think this is kinda gray area, it's not a bug fix, rather an improvement IMHO. But fine with merging it to the main, and have a release.
I think this is kinda gray area, it's not a bug fix, rather an improvement IMHO. But fine with merging it to the main, and have a release.
Yeah agreed. I don't have a strong opinion. Either way is ok for me.
merged to main, thank you @honnix !!
Thank you all!
Thank you!