Skip to content

Commit

Permalink
feat: intercp communication with catalog (#5445)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
  • Loading branch information
jakubdyszkiewicz authored Dec 13, 2022
1 parent beeb0b5 commit 18150a5
Show file tree
Hide file tree
Showing 54 changed files with 2,311 additions and 6 deletions.
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); }
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 @@ -581,6 +581,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

0 comments on commit 18150a5

Please sign in to comment.