Skip to content

Commit

Permalink
Merge pull request #178 from kube-tarian/refactor-storeap-iamclient
Browse files Browse the repository at this point in the history
refactor store app implementation and iam client
  • Loading branch information
vramk23 authored Aug 19, 2023
2 parents 51af238 + 33b70d2 commit 8a465e2
Show file tree
Hide file tree
Showing 32 changed files with 1,526 additions and 1,136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func (a *Agent) ClimonAppDelete(ctx context.Context, request *agentpb.ClimonDele
return prepareJobResponse(run, worker.GetWorkflowName()), err
}

func (a *Agent) InstallApp(ctx context.Context, request *agentpb.InstallAppRequest) (*agentpb.JobResponse, error) {
a.log.Infof("Recieved App Install event %+v", request)
func (a *Agent) InstallApp(ctx context.Context, request *agentpb.InstallAppRequest) (*agentpb.InstallAppResponse, error) {
a.log.Infof("Recieved App Install request %+v", request)
worker := workers.NewClimon(a.tc, a.log)

config := &model.AppConfig{
Expand All @@ -56,13 +56,19 @@ func (a *Agent) InstallApp(ctx context.Context, request *agentpb.InstallAppReque
PrivilegedNamespace: request.AppConfig.PrivilegedNamespace,
Icon: string(request.AppConfig.Icon),
LaunchURL: request.AppConfig.LaunchURL,
// LaunchRedirectURL: request.AppConfig.LaunchRedirectURL,
ClusterName: "inbuilt",
LaunchUIDescription: request.AppConfig.LaunchUIDescription,
}
run, err := worker.SendInstallAppEvent(ctx, "install", config)
if err != nil {
return &agentpb.JobResponse{}, err
return &agentpb.InstallAppResponse{
Status: agentpb.StatusCode_INTERNRAL_ERROR,
StatusMessage: "Internall error in create install app job",
}, err
}

return prepareJobResponse(run, worker.GetWorkflowName()), err
return &agentpb.InstallAppResponse{
Status: agentpb.StatusCode_OK,
StatusMessage: "success",
JobResponse: &agentpb.JobResponse{Id: run.GetID(), RunID: run.GetRunID(), WorkflowName: worker.GetWorkflowName()},
}, nil
}
2 changes: 1 addition & 1 deletion capten/agent/pkg/agent/agent_cluster_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (a *Agent) GetClusterAppLaunches(ctx context.Context, request *agentpb.GetC
cfgs = append(cfgs, &agentpb.AppLaunchConfig{
ReleaseName: r.GetConfig().GetReleaseName(),
Category: r.GetConfig().GetCategory(),
Description: r.GetConfig().GetDescription(),
Description: r.GetConfig().GetLaunchUIDescription(),
Icon: r.GetConfig().GetIcon(),
LaunchURL: r.GetConfig().GetLaunchURL(),
})
Expand Down
Loading

0 comments on commit 8a465e2

Please sign in to comment.