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

feat: intercp communication with catalog #5445

Merged

Conversation

jakubdyszkiewicz
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz commented Dec 6, 2022

This PR implements this MADR https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/013-multizone-envoy-admin.md

It introduces a new channel for CP to communicate with each other called intercp server.
For CP to discover other CP we now have a catalog which is a list of CP instances stored in the config map.
Right now, this is not exposed in the API (but probably will be) nor synced from Zone to Global CP (but probably will be for visibility).

For the E2E tests, we need to scale up and down and inspect the cp-catalog config.
I did not want to do this using shared e2e_env because it can potentially disrupt other tests. Therefore I used the existing HELM multizone test to check it. I will later use it to also check the actual issue (config dump with multiple instances of Global CP).

Checklist prior to review

  • Link to docs PR or issue -- In progress
  • Link to UI issue or PR --
  • Is the issue worked on linked? -- xref Envoy Admin operations with multizone and HA Global CP can fail #5080 but it does not solve the problem
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

Changelog: feat(kuma-cp): intercp communication protocol

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz marked this pull request as ready for review December 7, 2022 10:01
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner December 7, 2022 10:01
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/intercp/catalog/config_catalog.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeats.go Show resolved Hide resolved
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz requested review from a team, bartsmykla and lobkovilya and removed request for a team December 8, 2022 10:05
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

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

Few questions and suggestions but lgtm overall.

pkg/config/intercp/config.go Outdated Show resolved Hide resolved
pkg/core/bootstrap/autoconfig.go Show resolved Hide resolved
pkg/intercp/catalog/config_catalog.go Outdated Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/catalog/writer.go Show resolved Hide resolved
pkg/intercp/components.go Outdated Show resolved Hide resolved
pkg/intercp/tls/pki.go Show resolved Hide resolved
pkg/intercp/catalog/config_catalog.go Outdated Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeats.go Outdated Show resolved Hide resolved
pkg/intercp/catalog/server.go Show resolved Hide resolved
pkg/intercp/catalog/client.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component.go Show resolved Hide resolved
pkg/intercp/tls/defaults.go Show resolved Hide resolved
test/e2e/helm/kuma_helm_deploy_global_zone.go Show resolved Hide resolved
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/config/intercp/config.go Outdated Show resolved Hide resolved
pkg/config/intercp/config.go Outdated Show resolved Hide resolved
pkg/config/intercp/config.go Show resolved Hide resolved
pkg/intercp/catalog/heartbeat_component_test.go Outdated Show resolved Hide resolved
pkg/intercp/catalog/writer.go Show resolved Hide resolved
api/system/v1alpha1/inter_cp_ping.proto Show resolved Hide resolved
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz merged commit 18150a5 into kumahq:master Dec 13, 2022
@lahabana lahabana mentioned this pull request Dec 13, 2022
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.

None yet

4 participants