-
Notifications
You must be signed in to change notification settings - Fork 47
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
Clean name that cluster #498
Clean name that cluster #498
Conversation
Should we validate that the VCs are uniquely named somewhere? |
Yeah for operator sanity/error handling. Currently the last (as seen determined by jackson) cluster with the name will win. |
Currently not sure about making the name optional, but it avoids this being a breaking change.
065b1bd
to
aeebe19
Compare
Thanks for doing this @SamBarker. This is also going to pave the way to having metrics distinguished virtual cluster name too. |
kroxylicious-test-tools/src/test/java/io/kroxylicious/proxy/config/ConfigurationTest.java
Show resolved
Hide resolved
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.
Apart from my question above about whether retaining the virtualClusters
as a map is a valuable, lgtm.
8901a65
to
e57234a
Compare
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
…ect duplicate virtual cluster names. Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
Signed-off-by: Sam Barker <[email protected]>
e57234a
to
8bca278
Compare
@@ -26,4 +26,10 @@ public List<MicrometerDefinition> getMicrometer() { | |||
public boolean isUseIoUring() { | |||
return useIoUring(); | |||
} | |||
|
|||
public List<io.kroxylicious.proxy.model.VirtualCluster> validClusters() { |
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.
Should this still be validClusters
when it doesn't filter anything? It sounds like it returns a subset of clusters.
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.
Its a good question 😁
I added it so I had somewhere post config parsing to validate the cluster names were unique, and I still feel that it represents a valid and sensible hook to have. However I haven't figured out how to include the port de-conflictor here. Maybe I should just back it out entirely as we are moving to blowing up on invalid config.
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.
LGTM
Signed-off-by: Sam Barker <[email protected]>
As we don't do any validation or filtering however the model conversion hook is still valuable. Signed-off-by: Sam Barker <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Type of change
Description
Includes the a name in the Virtual Cluster configuration.
Additional Context
We need a programatic way of identifying which cluster is being used. This allows us to:
Checklist
Please go through this checklist and make sure all applicable tasks have been done