-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Simplify new suppliers introduced previously #1400
Simplify new suppliers introduced previously #1400
Conversation
@@ -46,6 +46,20 @@ public InstanceIdHostPodName get() { | |||
return new InstanceIdHostPodName(instanceId(), host(), podName()); | |||
} | |||
|
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.
now that I have separated things, I can see much easier where things can be improved. This is one of those places, creating static factory methods is far cleaner for callers, otherwise they need to pass "null"s around, and I personally was confused at times too why that is needed. This way, I think it's easier to reason about the code.
/** | ||
* to be used when .spec.type of the Service is != 'ExternalName' | ||
*/ | ||
static Fabric8PodLabelsAndAnnotationsSupplier nonExternalName(KubernetesClient client, String namespace) { |
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.
same thing here: private constructor and dedicated factory methods
@ryanjbaxter the code has been simplified and this creates opportunities for some more simplifications/improvements. I think a couple of these PRs and I'll start k8s discovery alignment. |
No description provided.