-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use cluster dns to reach apiserver for rustls - for #587 #597
Conversation
FWIW, you still need to use the environment variable when implementing a custom DNS server... |
Do we? I thought that was the whole point to rely on DNS, rather than use the evars. Bumped PR. |
This passed integration tests on |
Yeah, but the DNS server itself needs to have some way to reach the apiserver as well (chicken-and-egg problem :p). Not contesting that this is the correct solution for 99% of applications though. |
Ohh, when implementing a DNS server yeah. I get you. Yeah, I guess we need to expose a (probably non-default) way to decide what method to use when using incluster config. |
I think kube-rs should just expose a way to completely override apiserver address (after all, it is perfectly valid for a Kubernetes pod to access apiserver from another cluster). And then user can read environment variables, some configs, etc. |
This is actually supported out of the box already: let mut cfg = Config::from_cluster_env(); // or Config::infer
cfg.cluster_url = some_uri; |
Going to merge this, tested this locally with controller-rs against a cluster running rustls for sanity so going to speculatively close the related issues. If it turns out to be positive, then we can discuss whether to swap out the default for non-rustls. |
untestedbased on suggestion in #587 to fix #153