Simplify new suppliers introduced previously#1400
Merged
ryanjbaxter merged 36 commits intospring-cloud:3.0.xfrom Aug 7, 2023
wind57:simplify-new-suppliers-introduced-previously
Merged
Simplify new suppliers introduced previously#1400ryanjbaxter merged 36 commits intospring-cloud:3.0.xfrom wind57:simplify-new-suppliers-introduced-previously
ryanjbaxter merged 36 commits intospring-cloud:3.0.xfrom
wind57:simplify-new-suppliers-introduced-previously
Conversation
wind57
commented
Aug 7, 2023
| @@ -46,6 +46,20 @@ public InstanceIdHostPodName get() { | |||
| return new InstanceIdHostPodName(instanceId(), host(), podName()); | |||
| } | |||
|
|
|||
Contributor
Author
There was a problem hiding this comment.
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.
wind57
commented
Aug 7, 2023
| /** | ||
| * to be used when .spec.type of the Service is != 'ExternalName' | ||
| */ | ||
| static Fabric8PodLabelsAndAnnotationsSupplier nonExternalName(KubernetesClient client, String namespace) { |
Contributor
Author
There was a problem hiding this comment.
same thing here: private constructor and dedicated factory methods
Contributor
Author
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.