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
247 changes: 247 additions & 0 deletions api/system/v1alpha1/inter_cp_ping.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions api/system/v1alpha1/inter_cp_ping.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package kuma.system.v1alpha1;

option go_package = "github.com/kumahq/kuma/api/system/v1alpha1";

message PingRequest {
string instance_id = 1;
string address = 2;
uint32 inter_cp_port = 3;
bool ready = 4;
}

message PingResponse { bool leader = 1; }

service InterCpPingService { rpc Ping(PingRequest) returns (PingResponse); }
lobkovilya marked this conversation as resolved.
Show resolved Hide resolved
101 changes: 101 additions & 0 deletions api/system/v1alpha1/inter_cp_ping_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions app/kuma-cp/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/kumahq/kuma/pkg/gc"
"github.com/kumahq/kuma/pkg/hds"
"github.com/kumahq/kuma/pkg/insights"
"github.com/kumahq/kuma/pkg/intercp"
kds_global "github.com/kumahq/kuma/pkg/kds/global"
kds_zone "github.com/kumahq/kuma/pkg/kds/zone"
mads_server "github.com/kumahq/kuma/pkg/mads/server"
Expand Down Expand Up @@ -135,6 +136,10 @@ func newRunCmdWithOpts(opts kuma_cmd.RunCmdOpts) *cobra.Command {
runLog.Error(err, "unable to set up GC")
return err
}
if err := intercp.Setup(rt); err != nil {
runLog.Error(err, "unable to set up Control Plane Intercommunication")
return err
}

runLog.Info("starting Control Plane", "version", kuma_version.Build.Version)
if err := rt.Start(gracefulCtx.Done()); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: KUMA_INTER_CP_CATALOG_INSTANCE_ADDRESS
valueFrom:
fieldRef:
fieldPath: status.podIP
args:
- run
- --log-level=info
Expand Down
Loading