EAMode

package
v0.7.2-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EAModeDeploymentService

type EAModeDeploymentService interface {
	InstallApp(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, chartGitAttr *commonBean.ChartGitAttribute, ctx context.Context, tx *pg.Tx) (*appStoreBean.InstallAppVersionDTO, error)
	DeleteInstalledApp(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, installedApps *repository.InstalledApps, dbTransaction *pg.Tx) error
	RollbackRelease(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, deploymentVersion int32, tx *pg.Tx) (*appStoreBean.InstallAppVersionDTO, bool, error)
	GetDeploymentHistory(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO) (*gRPC.HelmAppDeploymentHistory, error)
	GetDeploymentHistoryInfo(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, version int32) (*openapi.HelmAppDeploymentManifestDetail, error)
	UpgradeDeployment(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ChartGitAttribute *commonBean.ChartGitAttribute, installedAppVersionHistoryId int, ctx context.Context) error
	GetAcdAppGitOpsRepoURL(appName string, environmentName string) (string, error)
}

type EAModeDeploymentServiceImpl

type EAModeDeploymentServiceImpl struct {
	Logger *zap.SugaredLogger

	OCIRegistryConfigRepository repository2.OCIRegistryConfigRepository
	// contains filtered or unexported fields
}

func NewEAModeDeploymentServiceImpl

func NewEAModeDeploymentServiceImpl(logger *zap.SugaredLogger, helmAppService client.HelmAppService,
	appStoreApplicationVersionRepository appStoreDiscoverRepository.AppStoreApplicationVersionRepository,
	helmAppClient gRPC.HelmAppClient,
	installedAppRepository repository.InstalledAppRepository,
	OCIRegistryConfigRepository repository2.OCIRegistryConfigRepository) *EAModeDeploymentServiceImpl

func (*EAModeDeploymentServiceImpl) CheckIfArgoAppExists

func (impl *EAModeDeploymentServiceImpl) CheckIfArgoAppExists(acdAppName string) (isFound bool, err error)

func (*EAModeDeploymentServiceImpl) DeleteACD

func (impl *EAModeDeploymentServiceImpl) DeleteACD(acdAppName string, ctx context.Context, isNonCascade bool) error

func (*EAModeDeploymentServiceImpl) DeleteACDAppObject

func (impl *EAModeDeploymentServiceImpl) DeleteACDAppObject(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) error

func (*EAModeDeploymentServiceImpl) DeleteInstalledApp

func (impl *EAModeDeploymentServiceImpl) DeleteInstalledApp(ctx context.Context, appName string, environmentName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, installedApps *repository.InstalledApps, dbTransaction *pg.Tx) error

func (*EAModeDeploymentServiceImpl) GenerateManifest

func (impl *EAModeDeploymentServiceImpl) GenerateManifest(installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (manifestResponse *bean.AppStoreManifestResponse, err error)

func (*EAModeDeploymentServiceImpl) GenerateManifestAndPerformGitOperations

func (impl *EAModeDeploymentServiceImpl) GenerateManifestAndPerformGitOperations(installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (*bean.AppStoreGitOpsResponse, error)

func (*EAModeDeploymentServiceImpl) GetAcdAppGitOpsRepoName

func (impl *EAModeDeploymentServiceImpl) GetAcdAppGitOpsRepoName(appName string, environmentName string) (string, error)

func (*EAModeDeploymentServiceImpl) GetAcdAppGitOpsRepoURL added in v0.7.1

func (impl *EAModeDeploymentServiceImpl) GetAcdAppGitOpsRepoURL(appName string, environmentName string) (string, error)

func (*EAModeDeploymentServiceImpl) GetChartBytesForLatestDeployment added in v0.7.0

func (impl *EAModeDeploymentServiceImpl) GetChartBytesForLatestDeployment(installedAppId int, installedAppVersionId int) ([]byte, error)

func (*EAModeDeploymentServiceImpl) GetChartBytesForParticularDeployment added in v0.7.0

func (impl *EAModeDeploymentServiceImpl) GetChartBytesForParticularDeployment(installedAppId int, installedAppVersionId int, installedAppVersionHistoryId int) ([]byte, error)

func (*EAModeDeploymentServiceImpl) GetDeploymentHistory

func (*EAModeDeploymentServiceImpl) GetDeploymentHistoryInfo

func (impl *EAModeDeploymentServiceImpl) GetDeploymentHistoryInfo(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, version int32) (*openapi.HelmAppDeploymentManifestDetail, error)

func (*EAModeDeploymentServiceImpl) GetGitRepoUrl

func (impl *EAModeDeploymentServiceImpl) GetGitRepoUrl(gitOpsRepoName string) (string, error)

func (*EAModeDeploymentServiceImpl) GitOpsOperations

func (impl *EAModeDeploymentServiceImpl) GitOpsOperations(manifestResponse *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (*bean.AppStoreGitOpsResponse, error)

func (*EAModeDeploymentServiceImpl) InstallApp

func (*EAModeDeploymentServiceImpl) RollbackRelease

func (impl *EAModeDeploymentServiceImpl) RollbackRelease(ctx context.Context, installedApp *appStoreBean.InstallAppVersionDTO, deploymentVersion int32, tx *pg.Tx) (*appStoreBean.InstallAppVersionDTO, bool, error)

returns - valuesYamlStr, success, error

func (*EAModeDeploymentServiceImpl) SaveTimelineForHelmApps

func (impl *EAModeDeploymentServiceImpl) SaveTimelineForHelmApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, status timelineStatus.TimelineStatus, statusDetail string, statusTime time.Time, tx *pg.Tx) error

func (*EAModeDeploymentServiceImpl) UpdateAndSyncACDApps

func (impl *EAModeDeploymentServiceImpl) UpdateAndSyncACDApps(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ChartGitAttribute *commonBean.ChartGitAttribute, isMonoRepoMigrationRequired bool, ctx context.Context, tx *pg.Tx) error

TODO: Need to refactor this,refer below reason This is being done as in ea mode wire argocd service is being binded to helmServiceImpl due to which we are restricted to implement this here. RefreshAndUpdateACDApp this will update chart info in acd app if required in case of mono repo migration and will refresh argo app

func (*EAModeDeploymentServiceImpl) UpdateAppGitOpsOperations

func (impl *EAModeDeploymentServiceImpl) UpdateAppGitOpsOperations(manifest *bean.AppStoreManifestResponse, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, monoRepoMigrationRequired bool, commitRequirements bool) (*bean.AppStoreGitOpsResponse, error)

func (*EAModeDeploymentServiceImpl) UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus

func (impl *EAModeDeploymentServiceImpl) UpdateInstalledAppAndPipelineStatusForFailedDeploymentStatus(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, triggeredAt time.Time, err error) error

func (*EAModeDeploymentServiceImpl) UpdateValuesDependencies

func (impl *EAModeDeploymentServiceImpl) UpdateValuesDependencies(installAppVersionRequest *appStoreBean.InstallAppVersionDTO) error

func (*EAModeDeploymentServiceImpl) UpgradeDeployment

func (impl *EAModeDeploymentServiceImpl) UpgradeDeployment(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, ChartGitAttribute *commonBean.ChartGitAttribute, installedAppVersionHistoryId int, ctx context.Context) error

func (*EAModeDeploymentServiceImpl) ValidateCustomGitRepoURL

func (impl *EAModeDeploymentServiceImpl) ValidateCustomGitRepoURL(request validationBean.ValidateCustomGitRepoURLRequest) (string, bool, error)

type InstalledAppDBService

type InstalledAppDBService interface {
	GetAll(filter *appStoreBean.AppStoreFilter) (appStoreBean.AppListDetail, error)
	CheckAppExists(appNames []*appStoreBean.AppNames) ([]*appStoreBean.AppNames, error)
	FindAppDetailsForAppstoreApplication(installedAppId, envId int) (bean2.AppDetailContainer, error)
	GetInstalledAppById(installedAppId int) (*appStoreRepo.InstalledApps, error)
	GetInstalledAppByClusterNamespaceAndName(clusterId int, namespace string, appName string) (*appStoreBean.InstallAppVersionDTO, error)
	GetInstalledAppByInstalledAppId(installedAppId int) (*appStoreBean.InstallAppVersionDTO, error)
	GetInstalledAppVersion(id int, userId int32) (*appStoreBean.InstallAppVersionDTO, error)
	CreateInstalledAppVersion(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, tx *pg.Tx) (*appStoreRepo.InstalledAppVersions, error)
	UpdateInstalledAppVersion(installedAppVersion *appStoreRepo.InstalledAppVersions, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, tx *pg.Tx) (*appStoreRepo.InstalledAppVersions, error)

	ChangeAppNameToDisplayNameForInstalledApp(installedApp *appStoreRepo.InstalledApps)
	GetReleaseInfo(appIdentifier *helmBean.AppIdentifier) (*appStoreBean.InstallAppVersionDTO, error)
	IsExternalAppLinkedToChartStore(appId int) (bool, []*appStoreRepo.InstalledApps, error)
	CreateNewAppEntryForAllInstalledApps(installedApps []*appStoreRepo.InstalledApps) error
}

type InstalledAppDBServiceImpl

type InstalledAppDBServiceImpl struct {
	Logger                        *zap.SugaredLogger
	InstalledAppRepository        appStoreRepo.InstalledAppRepository
	AppRepository                 app.AppRepository
	UserService                   user.UserService
	EnvironmentService            cluster.EnvironmentService
	InstalledAppRepositoryHistory appStoreRepo.InstalledAppVersionHistoryRepository
}

func NewInstalledAppDBServiceImpl

func NewInstalledAppDBServiceImpl(logger *zap.SugaredLogger,
	installedAppRepository appStoreRepo.InstalledAppRepository,
	appRepository app.AppRepository,
	userService user.UserService,
	environmentService cluster.EnvironmentService,
	installedAppRepositoryHistory appStoreRepo.InstalledAppVersionHistoryRepository) *InstalledAppDBServiceImpl

func (*InstalledAppDBServiceImpl) ChangeAppNameToDisplayNameForInstalledApp added in v0.7.0

func (impl *InstalledAppDBServiceImpl) ChangeAppNameToDisplayNameForInstalledApp(installedApp *appStoreRepo.InstalledApps)

func (*InstalledAppDBServiceImpl) CheckAppExists

func (impl *InstalledAppDBServiceImpl) CheckAppExists(appNames []*appStoreBean.AppNames) ([]*appStoreBean.AppNames, error)

func (*InstalledAppDBServiceImpl) CreateInstalledAppVersion added in v0.7.0

func (impl *InstalledAppDBServiceImpl) CreateInstalledAppVersion(installAppVersionRequest *appStoreBean.InstallAppVersionDTO, tx *pg.Tx) (*appStoreRepo.InstalledAppVersions, error)

func (*InstalledAppDBServiceImpl) CreateNewAppEntryForAllInstalledApps added in v0.7.0

func (impl *InstalledAppDBServiceImpl) CreateNewAppEntryForAllInstalledApps(installedApps []*appStoreRepo.InstalledApps) error

func (*InstalledAppDBServiceImpl) FindAppDetailsForAppstoreApplication

func (impl *InstalledAppDBServiceImpl) FindAppDetailsForAppstoreApplication(installedAppId, envId int) (bean2.AppDetailContainer, error)

func (*InstalledAppDBServiceImpl) GetAll

func (*InstalledAppDBServiceImpl) GetInstalledAppByClusterNamespaceAndName

func (impl *InstalledAppDBServiceImpl) GetInstalledAppByClusterNamespaceAndName(clusterId int, namespace string, appName string) (*appStoreBean.InstallAppVersionDTO, error)

func (*InstalledAppDBServiceImpl) GetInstalledAppById added in v0.7.0

func (impl *InstalledAppDBServiceImpl) GetInstalledAppById(installedAppId int) (*appStoreRepo.InstalledApps, error)

func (*InstalledAppDBServiceImpl) GetInstalledAppByInstalledAppId

func (impl *InstalledAppDBServiceImpl) GetInstalledAppByInstalledAppId(installedAppId int) (*appStoreBean.InstallAppVersionDTO, error)

func (*InstalledAppDBServiceImpl) GetInstalledAppVersion added in v0.7.0

func (impl *InstalledAppDBServiceImpl) GetInstalledAppVersion(id int, userId int32) (*appStoreBean.InstallAppVersionDTO, error)

func (*InstalledAppDBServiceImpl) GetReleaseInfo added in v0.7.0

func (*InstalledAppDBServiceImpl) IsExternalAppLinkedToChartStore added in v0.7.0

func (impl *InstalledAppDBServiceImpl) IsExternalAppLinkedToChartStore(appId int) (bool, []*appStoreRepo.InstalledApps, error)

IsExternalAppLinkedToChartStore checks for an appId, if that app is linked to any chart-store app or not, if it's linked then it returns true along with all the installedApps linked to that appId

func (*InstalledAppDBServiceImpl) UpdateInstalledAppVersion added in v0.7.0

func (impl *InstalledAppDBServiceImpl) UpdateInstalledAppVersion(installedAppVersion *appStoreRepo.InstalledAppVersions, installAppVersionRequest *appStoreBean.InstallAppVersionDTO, tx *pg.Tx) (*appStoreRepo.InstalledAppVersions, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL