Skip to content
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

Merged
merged 15 commits into from
Aug 1, 2023

Conversation

SamBarker
Copy link
Member

@SamBarker SamBarker commented Jul 30, 2023

Type of change

  • Enhancement / new feature

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:

  • share state at a cluster level.
  • Improve logging so its easier to identify which clusters are being used

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Review performance test results. Ensure that any degradations to performance numbers are understood and justified.
  • Make sure all Sonar-Lint warnings are addressed or are justifiably ignored.
  • Update documentation
  • Reference relevant issue(s) and close them after merging
  • For user facing changes, update CHANGELOG.md (remember to include changes affecting the API of the test artefacts too).

@robobario
Copy link
Contributor

Should we validate that the VCs are uniquely named somewhere?

@SamBarker
Copy link
Member Author

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.
@SamBarker SamBarker force-pushed the clean_name_that_cluster branch 2 times, most recently from 065b1bd to aeebe19 Compare July 31, 2023 04:29
@k-wall
Copy link
Contributor

k-wall commented Jul 31, 2023

Thanks for doing this @SamBarker. This is also going to pave the way to having metrics distinguished virtual cluster name too.

Copy link
Contributor

@k-wall k-wall left a 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.

@SamBarker SamBarker force-pushed the clean_name_that_cluster branch from 8901a65 to e57234a Compare July 31, 2023 22:30
@SamBarker SamBarker force-pushed the clean_name_that_cluster branch from e57234a to 8bca278 Compare July 31, 2023 23:46
@@ -26,4 +26,10 @@ public List<MicrometerDefinition> getMicrometer() {
public boolean isUseIoUring() {
return useIoUring();
}

public List<io.kroxylicious.proxy.model.VirtualCluster> validClusters() {
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@robobario robobario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

As we don't do any validation or filtering however the model conversion hook is still valuable.

Signed-off-by: Sam Barker <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@SamBarker SamBarker merged commit 04d127d into kroxylicious:main Aug 1, 2023
@SamBarker SamBarker deleted the clean_name_that_cluster branch August 1, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants