-
Notifications
You must be signed in to change notification settings - Fork 197
DNS based service discovery on Kubernetes #36
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
It could use some input on documentation and maybe look into naming of things.
I just tested it, and it works great. But I am not even 50% sure on the naming as well as the general documentation. I would love some feedback and discussion here.
```elixir
config :libcluster,
topologies: [
k8s_example: [
strategy: Cluster.Strategy.Kubernetes.DNS,
config: [
service: "web-headless",
application_name: "myapp",
polling_interval: 1000
]]]
```
```
apiVersion: v1
kind: Service
metadata:
labels:
deployment: web
name: web-headless
namespace: default
spec:
clusterIP: None
ports:
- port: 80
selector:
deployment: web
```
|
We should document this in the README which covers the built-in strategies, otherwise this looks good to go! Sorry for the holdup! |
|
@bitwalker How do you feel about the naming of the config keys? We're in an akward spot where we have to balance Erlang naming conventions together with what Kubernetes names its stuff. |
|
I'm fine with them as is - you've done a good job of explaining them in the strategy documentation, and some degree of conflict in naming conventions is expected, especially between Erlang and an orchestration platform like k8s. If there appears to be confusion in the future, we can address that with better documentation if needed. |
|
You mentioned you weren't satisfied with the quality here, I haven't taken the time to do a deep review of the code, but are there specific areas you are concerned with (beyond naming)? I will make some time to do a better review |
|
Other than the comments I've left, this looks good to me! |
|
Alright, I'll go through and fix these. Appreciate the comments! |
|
@bitwalker Sorry for the delay, other stuff came up. |
* Changing `init/1` to be a blocking operation. * Extracting polling_interval value into `polling_interval/1`
Fix comment reviews
|
@bitwalker I took care of your comments. I let the formatter deal with the spaces, extracting |
|
Thanks for all your work on this! |
I just tested it, and it works!
But so far not satisfied with naming and general documentation so I would love some feedback and discussion here.Also pretty sure the Kubernetes based strategies could work together in sharing code as only the fetching nodes (actual discovery) seem to differ. But could be part of a larger refactoring
config/config.exsService.yml