Documentation
¶
Index ¶
- type DeploymentStatusService
- type FullModeDeploymentService
- type FullModeDeploymentServiceImpl
- func (impl *FullModeDeploymentServiceImpl) CheckIfArgoAppExists(acdAppName string) (isFound bool, err error)
- func (impl *FullModeDeploymentServiceImpl) CreateArgoRepoSecretIfNeeded(...) error
- func (impl *FullModeDeploymentServiceImpl) DeleteACD(acdAppName string, ctx context.Context, isNonCascade bool) error
- func (impl *FullModeDeploymentServiceImpl) DeleteACDAppObject(ctx context.Context, appName string, environmentName string, ...) error
- func (impl *FullModeDeploymentServiceImpl) DeleteInstalledApp(ctx context.Context, appName string, environmentName string, ...) error
- func (impl *FullModeDeploymentServiceImpl) GenerateManifest(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) (manifestResponse *bean.AppStoreManifestResponse, err error)
- func (impl *FullModeDeploymentServiceImpl) GenerateManifestAndPerformGitOperations(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) (*bean.AppStoreGitOpsResponse, error)
- func (impl *FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoName(appName string, environmentName string) (string, error)
- func (impl *FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoURL(appName string, environmentName string) (string, error)
- func (impl *FullModeDeploymentServiceImpl) GetDeploymentHistory(ctx context.Context, installedAppDto *appStoreBean.InstallAppVersionDTO) (*gRPC.HelmAppDeploymentHistory, error)
- func (impl *FullModeDeploymentServiceImpl) GetDeploymentHistoryInfo(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, ...) (*openapi.HelmAppDeploymentManifestDetail, error)
- func (impl *FullModeDeploymentServiceImpl) GitOpsOperations(manifestResponse *bean.AppStoreManifestResponse, ...) (*bean.AppStoreGitOpsResponse, error)
- func (impl *FullModeDeploymentServiceImpl) InstallApp(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) (*appStoreBean.InstallAppVersionDTO, error)
- func (impl *FullModeDeploymentServiceImpl) RollbackRelease(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, ...) (*appStoreBean.InstallAppVersionDTO, bool, error)
- func (impl *FullModeDeploymentServiceImpl) SaveTimelineForHelmApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) error
- func (impl *FullModeDeploymentServiceImpl) UpdateAndSyncACDApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) error
- func (impl *FullModeDeploymentServiceImpl) UpdateAppGitOpsOperations(manifest *bean.AppStoreManifestResponse, ...) (*bean.AppStoreGitOpsResponse, error)
- func (impl *FullModeDeploymentServiceImpl) UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) error
- func (impl *FullModeDeploymentServiceImpl) UpgradeDeployment(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ...) error
- func (impl *FullModeDeploymentServiceImpl) ValidateCustomGitOpsConfig(request validationBean.ValidateGitOpsRepoRequest) (string, bool, error)
- type InstalledAppArgoCdService
- type InstalledAppGitOpsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentStatusService ¶
type DeploymentStatusService interface {
// TODO refactoring: Move to DB service
SaveTimelineForHelmApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, status timelineStatus.TimelineStatus, statusDetail string, statusTime time.Time, tx *pg.Tx) error
// UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus updates failed status in pipelineConfig.PipelineStatusTimeline table
UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, triggeredAt time.Time, err error) error
}
type FullModeDeploymentService ¶
type FullModeDeploymentService interface {
// InstallApp will register git repo in Argo, create and sync the Argo App and finally update deployment status
InstallApp(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, chartGitAttr *commonBean.ChartGitAttribute, ctx context.Context, tx *pg.Tx) (*appStoreBean.InstallAppVersionDTO, error)
// DeleteInstalledApp will delete entry from appStatus.AppStatusDto table and from repository.ChartGroupDeployment table (if exists)
DeleteInstalledApp(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, installedApps *repository.InstalledApps, dbTransaction *pg.Tx) error
// RollbackRelease will rollback to a previous deployment for the given installedAppVersionHistoryId; returns - valuesYamlStr, success, error
RollbackRelease(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, deploymentVersion int32) (*appStoreBean.InstallAppVersionDTO, bool, error)
// GetDeploymentHistory will return gRPC.HelmAppDeploymentHistory for the given installedAppDto.InstalledAppId
GetDeploymentHistory(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO) (*gRPC.HelmAppDeploymentHistory, error)
// GetDeploymentHistoryInfo will return openapi.HelmAppDeploymentManifestDetail for the given appStoreBean.InstallAppVersionDTO
GetDeploymentHistoryInfo(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, version int32) (*openapi.HelmAppDeploymentManifestDetail, error)
InstalledAppArgoCdService
DeploymentStatusService
InstalledAppGitOpsService
}
FullModeDeploymentService TODO refactoring: Use extended binding over EAMode.EAModeDeploymentService Currently creating duplicate methods in EAMode.EAModeDeploymentService
type FullModeDeploymentServiceImpl ¶
type FullModeDeploymentServiceImpl struct {
Logger *zap.SugaredLogger
// contains filtered or unexported fields
}
func NewFullModeDeploymentServiceImpl ¶
func NewFullModeDeploymentServiceImpl( logger *zap.SugaredLogger, argoK8sClient argocdServer.ArgoK8sClient, aCDAuthConfig *util2.ACDAuthConfig, chartGroupDeploymentRepository repository2.ChartGroupDeploymentRepository, installedAppRepository repository.InstalledAppRepository, installedAppRepositoryHistory repository.InstalledAppVersionHistoryRepository, appStoreDeploymentCommonService appStoreDeploymentCommon.AppStoreDeploymentCommonService, helmAppService client.HelmAppService, appStatusService appStatus.AppStatusService, pipelineStatusTimelineService status.PipelineStatusTimelineService, userService user.UserService, pipelineStatusTimelineRepository pipelineConfig.PipelineStatusTimelineRepository, appStoreApplicationVersionRepository appStoreDiscoverRepository.AppStoreApplicationVersionRepository, argoClientWrapperService argocdServer.ArgoClientWrapperService, acdConfig *argocdServer.ACDConfig, gitOperationService git.GitOperationService, gitOpsConfigReadService config.GitOpsConfigReadService, gitOpsValidationService validation.GitOpsValidationService, environmentRepository repository5.EnvironmentRepository, deploymentConfigService common.DeploymentConfigService, chartTemplateService util.ChartTemplateService) *FullModeDeploymentServiceImpl
func (*FullModeDeploymentServiceImpl) CheckIfArgoAppExists ¶
func (impl *FullModeDeploymentServiceImpl) CheckIfArgoAppExists(acdAppName string) (isFound bool, err error)
func (*FullModeDeploymentServiceImpl) CreateArgoRepoSecretIfNeeded ¶ added in v0.7.2
func (impl *FullModeDeploymentServiceImpl) CreateArgoRepoSecretIfNeeded(appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) error
func (*FullModeDeploymentServiceImpl) DeleteACDAppObject ¶
func (impl *FullModeDeploymentServiceImpl) DeleteACDAppObject(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) error
func (*FullModeDeploymentServiceImpl) DeleteInstalledApp ¶
func (impl *FullModeDeploymentServiceImpl) DeleteInstalledApp(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, installedApps *repository.InstalledApps, dbTransaction *pg.Tx) error
func (*FullModeDeploymentServiceImpl) GenerateManifest ¶
func (impl *FullModeDeploymentServiceImpl) GenerateManifest(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) (manifestResponse *bean.AppStoreManifestResponse, err error)
func (*FullModeDeploymentServiceImpl) GenerateManifestAndPerformGitOperations ¶
func (impl *FullModeDeploymentServiceImpl) GenerateManifestAndPerformGitOperations(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) (*bean.AppStoreGitOpsResponse, error)
func (*FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoName ¶
func (impl *FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoName(appName string, environmentName string) (string, error)
func (*FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoURL ¶ added in v0.7.1
func (impl *FullModeDeploymentServiceImpl) GetAcdAppGitOpsRepoURL(appName string, environmentName string) (string, error)
func (*FullModeDeploymentServiceImpl) GetDeploymentHistory ¶
func (impl *FullModeDeploymentServiceImpl) GetDeploymentHistory(ctx context.Context, installedAppDto *appStoreBean.InstallAppVersionDTO) (*gRPC.HelmAppDeploymentHistory, error)
func (*FullModeDeploymentServiceImpl) GetDeploymentHistoryInfo ¶
func (impl *FullModeDeploymentServiceImpl) GetDeploymentHistoryInfo(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, version int32) (*openapi.HelmAppDeploymentManifestDetail, error)
GetDeploymentHistoryInfo TODO refactoring: use InstalledAppVersionHistoryId from appStoreBean.InstallAppVersionDTO instead of version int32
func (*FullModeDeploymentServiceImpl) GitOpsOperations ¶
func (impl *FullModeDeploymentServiceImpl) GitOpsOperations(manifestResponse *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (*bean.AppStoreGitOpsResponse, error)
GitOpsOperations handles all git operations for Helm App; and ensures that the return param bean.AppStoreGitOpsResponse is not nil
func (*FullModeDeploymentServiceImpl) InstallApp ¶
func (impl *FullModeDeploymentServiceImpl) InstallApp(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, chartGitAttr *commonBean.ChartGitAttribute, ctx context.Context, tx *pg.Tx) (*appStoreBean.InstallAppVersionDTO, error)
func (*FullModeDeploymentServiceImpl) RollbackRelease ¶
func (impl *FullModeDeploymentServiceImpl) RollbackRelease(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, installedAppVersionHistoryId int32) (*appStoreBean.InstallAppVersionDTO, bool, error)
func (*FullModeDeploymentServiceImpl) SaveTimelineForHelmApps ¶
func (impl *FullModeDeploymentServiceImpl) SaveTimelineForHelmApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, status timelineStatus.TimelineStatus, statusDetail string, statusTime time.Time, tx *pg.Tx) error
func (*FullModeDeploymentServiceImpl) UpdateAndSyncACDApps ¶
func (impl *FullModeDeploymentServiceImpl) UpdateAndSyncACDApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, chartGitAttribute *commonBean.ChartGitAttribute, isMonoRepoMigrationRequired bool, ctx context.Context, tx *pg.Tx) error
func (*FullModeDeploymentServiceImpl) UpdateAppGitOpsOperations ¶
func (impl *FullModeDeploymentServiceImpl) UpdateAppGitOpsOperations(manifest *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, monoRepoMigrationRequired bool, commitRequirements bool) (*bean.AppStoreGitOpsResponse, error)
func (*FullModeDeploymentServiceImpl) UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus ¶
func (impl *FullModeDeploymentServiceImpl) UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, triggeredAt time.Time, deploymentErr error) error
func (*FullModeDeploymentServiceImpl) UpgradeDeployment ¶
func (impl *FullModeDeploymentServiceImpl) UpgradeDeployment(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ChartGitAttribute *commonBean.ChartGitAttribute, installedAppVersionHistoryId int, ctx context.Context) error
UpgradeDeployment this will update chart info in acd app, needed when repo for an app is changed
func (*FullModeDeploymentServiceImpl) ValidateCustomGitOpsConfig ¶ added in v1.4.0
func (impl *FullModeDeploymentServiceImpl) ValidateCustomGitOpsConfig(request validationBean.ValidateGitOpsRepoRequest) (string, bool, error)
type InstalledAppArgoCdService ¶
type InstalledAppArgoCdService interface {
// GetAcdAppGitOpsRepoName will return the Git Repo used in the ACD app object
GetAcdAppGitOpsRepoName(appName string, environmentName string) (string, error)
// DeleteACDAppObject will delete the app object from ACD
DeleteACDAppObject(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) error
// CheckIfArgoAppExists will return- isFound: if Argo app object exists; err: if any err found
CheckIfArgoAppExists(acdAppName string) (isFound bool, err error)
// UpdateAndSyncACDApps this will update chart info in acd app if required in case of mono repo migration and will refresh argo app
UpdateAndSyncACDApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, chartGitAttribute *commonBean.ChartGitAttribute, isMonoRepoMigrationRequired bool, ctx context.Context, tx *pg.Tx) error
DeleteACD(acdAppName string, ctx context.Context, isNonCascade bool) error
GetAcdAppGitOpsRepoURL(appName string, environmentName string) (string, error)
}
type InstalledAppGitOpsService ¶
type InstalledAppGitOpsService interface {
// GitOpsOperations performs git operations specific to helm app deployments
// If appStoreBean.InstallAppVersionDTO has GitOpsRepoURL -> EMPTY string; then it will auto create repository and update into appStoreBean.InstallAppVersionDTO
GitOpsOperations(manifestResponse *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (*bean.AppStoreGitOpsResponse, error)
// GenerateManifest returns bean.AppStoreManifestResponse required in GitOps
GenerateManifest(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) (manifestResponse *bean.AppStoreManifestResponse, err error)
// GenerateManifestAndPerformGitOperations is a wrapper function for both GenerateManifest and GitOpsOperations
GenerateManifestAndPerformGitOperations(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) (*bean.AppStoreGitOpsResponse, error)
// UpdateAppGitOpsOperations internally uses
// GitOpsOperations (If Repo is deleted OR Repo migration is required) OR
// git.GitOperationService.CommitValues (If repo exists and Repo migration is not needed)
// functions to perform GitOps during upgrade deployments (GitOps based Helm Apps)
UpdateAppGitOpsOperations(manifest *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, monoRepoMigrationRequired bool, commitRequirements bool) (*bean.AppStoreGitOpsResponse, error)
ValidateCustomGitOpsConfig(request validationBean.ValidateGitOpsRepoRequest) (string, bool, error)
CreateArgoRepoSecretIfNeeded(appStoreApplicationVersion *appStoreDiscoverRepository.AppStoreApplicationVersion) error
}
Click to show internal directories.
Click to hide internal directories.