-
Notifications
You must be signed in to change notification settings - Fork 808
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 kubernetes-client and Kubernetes Service Discovery Enhancements #432
Use kubernetes-client and Kubernetes Service Discovery Enhancements #432
Conversation
@ggmaresca this is great!. No further need to add the kubernetes client. Im gonna review this and we merge this and the k8s operator. |
@ggmaresca I've been testing the PR and looks great :). Can you address the review points? Thanks! |
@CarlosLanderas I've split out |
Oh, I've spelled it wrong, it should be With that this should be reeeeeady |
Did the method rename. What do you mean by the service null check? |
Perhaps check |
} | ||
catch (Exception) | ||
{ | ||
_logger.LogError($"Error discovering service {item.Metadata.Name}. It might not be visible"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is more correct? visible or reachable?
try | ||
{ | ||
var services = await _discoveryClient.GetServices(_discoveryOptions.ServicesLabel, _discoveryOptions.Namespaces, cancellationToken); | ||
foreach (var item in services.Items) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This crashed while testing the branch as no services were found. services NullReference Exception. This should be checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the method rename. What do you mean by the service null check?
services in services.Items might be null and crash. I've suffered it while testing the branch. It's not your fault, it was already like that but if we fix it we merge this without further thoughts ;)
Line 71 in 5d19839
foreach (var item in services.Items) |
@ggmaresca thanks for the contribution!. It is finally merged ;) |
A re-do of #231 that uses https://github.com/kubernetes-client/csharp
~/.kube/config
file otherwise.