Skip to content

Commit

Permalink
adding new model plugin app config files
Browse files Browse the repository at this point in the history
  • Loading branch information
vramk23 committed Mar 10, 2024
1 parent d0b9dcf commit 127f75b
Show file tree
Hide file tree
Showing 38 changed files with 3,071 additions and 39 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ gen-protoc:
mkdir -p capten/agent/internal/pb/captenpluginspb
mkdir -p server/pkg/pb/agentpb
mkdir -p server/pkg/pb/captenpluginspb
mkdir -p server/pkg/pb/pluginstorepb
mkdir -p capten/agent/internal/pb/captensdkpb
mkdir -p capten/common-pkg/vault-cred/vaultcredpb
mkdir -p capten/common-pkg/capten-sdk/captensdkpb
mkdir -p capten/common-pkg/vault-cred/vaultcredpb
mkdir -p capten/common-pkg/cluster-plugins/clusterpluginspb

cd proto && protoc --go_out=../server/pkg/pb/serverpb/ --go_opt=paths=source_relative \
--go-grpc_out=../server/pkg/pb/serverpb --go-grpc_opt=paths=source_relative \
Expand Down Expand Up @@ -55,6 +58,14 @@ gen-protoc:
--go-grpc_out=../capten/common-pkg/vault-cred/vaultcredpb --go-grpc_opt=paths=source_relative \
./vault_cred.proto

cd proto && protoc --go_out=../server/pkg/pb/pluginstorepb --go_opt=paths=source_relative \
--go-grpc_out=../server/pkg/pb/pluginstorepb --go-grpc_opt=paths=source_relative \
./plugin_store.proto

cd proto && protoc --go_out=../capten/common-pkg/cluster-plugins/clusterpluginspb --go_opt=paths=source_relative \
--go-grpc_out=../capten/common-pkg/cluster-plugins/clusterpluginspb --go-grpc_opt=paths=source_relative \
./cluster_plugins.proto

docker-build-server:
# The prefix for server to changed either as server or intelops-kad-server
docker build --platform=linux/amd64 -f dockerfiles/server/Dockerfile -t ${PREFIX}-${SERVER_APP_NAME}:${BUILD} .
Expand Down
2 changes: 2 additions & 0 deletions capten/agent/internal/api/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/kube-tarian/kad/capten/agent/internal/pb/captenpluginspb"
"github.com/kube-tarian/kad/capten/agent/internal/pb/captensdkpb"
"github.com/kube-tarian/kad/capten/agent/internal/temporalclient"
"github.com/kube-tarian/kad/capten/common-pkg/cluster-plugins/clusterpluginspb"
)

var _ agentpb.AgentServer = &Agent{}
Expand All @@ -19,6 +20,7 @@ type Agent struct {
agentpb.UnimplementedAgentServer
captenpluginspb.UnimplementedCaptenPluginsServer
captensdkpb.UnimplementedCaptenSdkServer
clusterpluginspb.UnimplementedClusterPluginsServer
tc *temporalclient.Client
as *captenstore.Store
log logging.Logger
Expand Down
29 changes: 29 additions & 0 deletions capten/agent/internal/api/cluster_plugin_apis.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package api

import (
"context"

"github.com/kube-tarian/kad/capten/common-pkg/cluster-plugins/clusterpluginspb"
)

//rpc DeployClusterPlugin (DeployClusterPluginRequest) returns (DeployClusterPluginResponse) {}
//rpc UnDeployClusterPlugin (UnDeployClusterPluginRequest) returns (UnDeployClusterPluginResponse) {}
//rpc GetClusterPlugins (GetClusterPluginsRequest) returns (GetClusterPluginsResponse) {}

func (a *Agent) GetClusterPlugins(ctx context.Context, request *clusterpluginspb.GetClusterPluginsRequest) (
*clusterpluginspb.GetClusterPluginsResponse, error) {
return &clusterpluginspb.GetClusterPluginsResponse{
Status: clusterpluginspb.StatusCode_OK}, nil
}

func (a *Agent) DeployClusterPlugin(ctx context.Context, request *clusterpluginspb.DeployClusterPluginRequest) (
*clusterpluginspb.DeployClusterPluginResponse, error) {
return &clusterpluginspb.DeployClusterPluginResponse{
Status: clusterpluginspb.StatusCode_OK}, nil
}

func (a *Agent) UnDeployClusterPlugin(ctx context.Context, request *clusterpluginspb.UnDeployClusterPluginRequest) (
*clusterpluginspb.UnDeployClusterPluginResponse, error) {
return &clusterpluginspb.UnDeployClusterPluginResponse{
Status: clusterpluginspb.StatusCode_OK}, nil
}
2 changes: 1 addition & 1 deletion capten/agent/internal/pb/agentpb/agent.pb.go

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

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

2 changes: 1 addition & 1 deletion capten/agent/internal/pb/captensdkpb/capten_sdk.pb.go

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

2 changes: 1 addition & 1 deletion capten/common-pkg/capten-sdk/captensdkpb/capten_sdk.pb.go

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

Loading

0 comments on commit 127f75b

Please sign in to comment.