Skip to content

Commit

Permalink
remove deprecated apis
Browse files Browse the repository at this point in the history
  • Loading branch information
vramk23 committed Apr 29, 2024
1 parent d655f73 commit 1e1a369
Show file tree
Hide file tree
Showing 14 changed files with 1,189 additions and 4,077 deletions.
22 changes: 22 additions & 0 deletions capten/agent/internal/api/app_config_sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"context"

"github.com/kube-tarian/kad/capten/agent/internal/workers"
"github.com/kube-tarian/kad/capten/common-pkg/agentpb"
"github.com/kube-tarian/kad/capten/common-pkg/credential"
"github.com/kube-tarian/kad/capten/model"
Expand Down Expand Up @@ -81,3 +82,24 @@ func (a *Agent) ConfigureAppSSO(ctx context.Context,
StatusMessage: "Triggerred app upgrade",
}, nil
}

func (a *Agent) upgradeAppWithWorkflow(req *model.ApplicationInstallRequest,
appConfig *agentpb.SyncAppData) {
wd := workers.NewDeployment(a.tc, a.log)
_, err := wd.SendEvent(context.TODO(), wd.GetWorkflowName(), string(model.AppUpgradeAction), req)
if err != nil {
appConfig.Config.InstallStatus = string(model.AppUpgradeFaileddStatus)
if err := a.as.UpsertAppConfig(appConfig); err != nil {
a.log.Errorf("failed to update app config for app %s, %v", appConfig.Config.ReleaseName, err)
return
}
a.log.Errorf("failed to send event to workflow for app %s, %v", appConfig.Config.ReleaseName, err)
return
}

appConfig.Config.InstallStatus = string(model.AppUpgradedStatus)
if err := a.as.UpsertAppConfig(appConfig); err != nil {
a.log.Errorf("failed to update app config for app %s, %v", appConfig.Config.ReleaseName, err)
return
}
}
341 changes: 0 additions & 341 deletions capten/agent/internal/api/app_deploy_apis.go

This file was deleted.

Loading

0 comments on commit 1e1a369

Please sign in to comment.