-
Notifications
You must be signed in to change notification settings - Fork 194
Merge Kubernetes.DNS implementations #115
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
Conversation
I think we need to keep the definition of the old module, but redirect its |
@bitwalker Ah you're absolutely right.
I think it could just redirect and set its settings to use |
Sounds good! |
@bitwalker So what approach did you want for tackling the bad paths (errors)? I resorted to logging instead of crashing, but I am not so sure that's the best approach. |
There is another issue at play here, and it is the In general it's also unnecessary to hardcode What I mean is that in a scenario where the namespace is
So the service name ( This allows the user to define a full domain, or even part of it if necessary and let the search list do its thing. Today the My suggestion is to prune the config and make things less error prone, rely on K8 to tackle these things and optionally accept a partially qualified domain name that could include the namespace, but not limited to. Example: In theory, passing in the namespace on its own is unnecessary since the default ndots is 5, the resolver will be using each component of the search path in turn until a match is found. |
Hey, sorry for the long absence on this one @seivan For configuration issues, I prefer to crash hard - but rather than raising on Your proposed changes in your last comment sound appropriate to me. It seems like we may have another issue with latest versions of k8s that use |
@bitwalker Yeah, I am hesitant to merging them now. |
I agree, unfortunately I'm not sure anyone is actively contributing towards it right now, so I'm leaning heavily towards deprecating it to avoid giving people headaches - or at least removing it from prominence in the documentation. |
merges #36 & #99 into a single Module, but keeps the tests for both around.
And also fixes #113 since I noticed namespace was missing in the docs. Now it will also default to
default
if it's missing.But there are also pending issues related to handling wrong or missing configurations.
Right now either implementations do both crash by using
Keyword.fetch!/2
but at the same uses predicates to log if configs are missing.Which approach would you prefer? I defaulted to returning errors (
Keyword.get/2
) instead.