Skip to content

Commit

Permalink
Merge pull request #359 from kube-tarian/update-go-pacakges
Browse files Browse the repository at this point in the history
updated go mod
  • Loading branch information
vramk23 authored Dec 30, 2023
2 parents ea673d7 + ec836b1 commit a00d00d
Show file tree
Hide file tree
Showing 15 changed files with 18,871 additions and 10,086 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ gen-protoc:
mkdir -p capten/agent/internal/pb/captenpluginspb
mkdir -p server/pkg/pb/agentpb
mkdir -p server/pkg/pb/captenpluginspb
mkdir -p capten/agent/internal/pb/captensdkpb

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 All @@ -32,6 +33,10 @@ gen-protoc:
--go-grpc_out=../capten/agent/internal/pb/captenpluginspb --go-grpc_opt=paths=source_relative \
./capten_plugins.proto

cd proto && protoc --go_out=../capten/agent/internal/pb/captensdkpb --go_opt=paths=source_relative \
--go-grpc_out=../capten/agent/internal/pb/captensdkpb --go-grpc_opt=paths=source_relative \
./capten_sdk.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
6 changes: 1 addition & 5 deletions capten/agent/internal/api/capten_sdk_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,16 @@ func (a *Agent) GetContainerRegistryById(ctx context.Context, request *captensdk
RegistryType: res.RegistryType,
}

token, username, password, err := a.getContainerRegCredential(ctx, res.Id)
_, err = a.getContainerRegCredential(ctx, res.Id)
if err != nil {
a.log.Errorf("failed to get container registry credential for %s, %v", request.Id, err)
return &captensdkpb.GetContainerRegistryByIdResponse{
Status: captensdkpb.StatusCode_INTERNAL_ERROR,
StatusMessage: "failed to fetch container registry for " + request.Id,
}, nil
}
registry.RegistryAttributes["token"] = token
registry.RegistryAttributes["username"] = username
registry.RegistryAttributes["password"] = password

a.log.Infof("Fetched %s container registry", request.Id)

return &captensdkpb.GetContainerRegistryByIdResponse{
Registry: registry,
Status: captensdkpb.StatusCode_OK,
Expand Down
Loading

0 comments on commit a00d00d

Please sign in to comment.