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

chore(kuma-cp): add weights to xds.Cluster interface #6844

Merged

Conversation

bartsmykla
Copy link
Contributor

This setting is necessary to allow MeshTCPRoute to create "splits" without the need of using deprecated abstractions like ClusterImpl. I also think it's quite elegant solution which allows to remove type assertion to ClusterImpl in TcpProxyConfigurator, when there are more clusters provided as parameters.

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • it won't
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • tested manually
  • Do you need to update UPGRADE.md?
    • there is no need, as so use this feature, it has to be explicit
  • Does it need to be backported according to the backporting policy?
    • it doesn't
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?
    • there is no need

This setting is necessary to allow MeshTCPRoute to create "splits"
without the need of using deprecated abstractions like ClusterImpl.
I also think it's quite elegant solution which allows to remove
type assertion to ClusterImpl in TcpProxyConfigurator, when there
are more clusters provided as parameters.

Signed-off-by: Bart Smykla <[email protected]>
@bartsmykla bartsmykla requested review from michaelbeaumont, a team and slonka and removed request for a team May 25, 2023 10:23
@bartsmykla bartsmykla mentioned this pull request May 25, 2023
21 tasks
@bartsmykla bartsmykla enabled auto-merge (squash) May 25, 2023 11:58
pkg/plugins/policies/xds/cluster.go Show resolved Hide resolved
@bartsmykla bartsmykla merged commit 52045f6 into kumahq:master May 26, 2023
@bartsmykla bartsmykla deleted the chore/add-weights-to-cluster-interface branch May 26, 2023 08:25
michaelbeaumont added a commit to bartsmykla/kuma that referenced this pull request Jun 6, 2023
michaelbeaumont added a commit to michaelbeaumont/kuma that referenced this pull request Jun 6, 2023
michaelbeaumont added a commit to michaelbeaumont/kuma that referenced this pull request Jun 6, 2023
michaelbeaumont added a commit that referenced this pull request Jun 6, 2023
* refactor(xds): move out MakeSplit function
* refactor(xds): use splits for TCP proxy
* refactor(xds): rename TcpProxy
* Revert "chore(kuma-cp): add weights to xds.Cluster interface (#6844)"

This reverts commit 52045f6.

Signed-off-by: Bart Smykla <[email protected]>
Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants