Documentation ¶
Index ¶
- Constants
- func BuildJobListingResponse(jobContainers []*bean.JobListingContainer, ...) []*bean.JobContainer
- func GetCIPipelineIDs(jobContainers []*bean.JobListingContainer) []int
- type AppBean
- type AppCrudOperationService
- type AppCrudOperationServiceImpl
- func (impl AppCrudOperationServiceImpl) Create(request *bean.AppLabelDto, tx *pg.Tx) (*bean.AppLabelDto, error)
- func (impl AppCrudOperationServiceImpl) FindAll() ([]*bean.AppLabelDto, error)
- func (impl AppCrudOperationServiceImpl) FindById(id int) (*bean.AppLabelDto, error)
- func (impl AppCrudOperationServiceImpl) GetAppListByTeamIds(teamIds []int, appType string) ([]*TeamAppBean, error)
- func (impl AppCrudOperationServiceImpl) GetAppMetaInfo(appId int) (*bean.AppMetaInfoDto, error)
- func (impl AppCrudOperationServiceImpl) GetAppMetaInfoByAppName(appName string) (*bean.AppMetaInfoDto, error)
- func (impl AppCrudOperationServiceImpl) GetHelmAppMetaInfo(appId string) (*bean.AppMetaInfoDto, error)
- func (impl AppCrudOperationServiceImpl) GetLabelsByAppId(appId int) (map[string]string, error)
- func (impl AppCrudOperationServiceImpl) GetLabelsByAppIdForDeployment(appId int) ([]byte, error)
- func (impl AppCrudOperationServiceImpl) UpdateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
- func (impl AppCrudOperationServiceImpl) UpdateLabelsInApp(request *bean.CreateAppDTO, tx *pg.Tx) (*bean.CreateAppDTO, error)
- func (impl AppCrudOperationServiceImpl) UpdateProjectForApps(request *bean.UpdateProjectBulkAppsRequest) (*bean.UpdateProjectBulkAppsRequest, error)
- type AppListingService
- type AppListingServiceImpl
- func (impl AppListingServiceImpl) BuildAppListingResponse(fetchAppListingRequest FetchAppListingRequest, ...) ([]*bean.AppContainer, error)
- func (impl AppListingServiceImpl) CpuRequestGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]stringdeprecated
- func (impl AppListingServiceImpl) CpuRequestGroupByPod(namespace string, env string, proEndpoint string) map[string]string
- func (impl AppListingServiceImpl) CpuUsageGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]stringdeprecated
- func (impl AppListingServiceImpl) CpuUsageGroupByPod(namespace string, env string, proEndpoint string) map[string]string
- func (impl AppListingServiceImpl) CpuUsageGroupByPodGraph(podName string, namespace string, env string, proEndpoint string, r v1.Range) map[string][]interface{}deprecated
- func (impl AppListingServiceImpl) FetchAllDevtronManagedApps() ([]AppNameTypeIdContainer, error)
- func (impl AppListingServiceImpl) FetchAppDetails(ctx context.Context, appId int, envId int) (bean.AppDetailContainer, error)
- func (impl AppListingServiceImpl) FetchAppStageStatus(appId int, appType int) ([]bean.AppStageStatus, error)
- func (impl AppListingServiceImpl) FetchAppTriggerView(appId int) ([]bean.TriggerView, error)
- func (impl AppListingServiceImpl) FetchAppsByEnvironment(fetchAppListingRequest FetchAppListingRequest, w http.ResponseWriter, ...) ([]*bean.AppEnvironmentContainer, error)
- func (impl AppListingServiceImpl) FetchJobs(fetchJobListingRequest FetchAppListingRequest) ([]*bean.JobContainer, error)
- func (impl AppListingServiceImpl) FetchOtherEnvironment(ctx context.Context, appId int) ([]*bean.Environment, error)
- func (impl AppListingServiceImpl) FetchOverviewCiPipelines(jobId int) ([]*bean.JobListingContainer, error)
- func (impl AppListingServiceImpl) GetReleaseCount(appId, envId int) (int, error)
- func (impl AppListingServiceImpl) GraphAPI(appId int, envId int) errordeprecated
- func (impl AppListingServiceImpl) ISLastReleaseStopType(appId, envId int) (bool, error)
- func (impl AppListingServiceImpl) ISLastReleaseStopTypeV2(pipelineIds []int) (map[int]bool, error)
- func (impl AppListingServiceImpl) MemoryRequestGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]stringdeprecated
- func (impl AppListingServiceImpl) MemoryRequestGroupByPod(namespace string, env string, proEndpoint string) map[string]string
- func (impl AppListingServiceImpl) MemoryUsageGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]stringdeprecated
- func (impl AppListingServiceImpl) MemoryUsageGroupByPod(namespace string, env string, proEndpoint string) map[string]string
- func (impl AppListingServiceImpl) MemoryUsageGroupByPodGraph(podName string, namespace string, env string, proEndpoint string, r v1.Range) map[string][]interface{}deprecated
- func (impl AppListingServiceImpl) PodCountByAppLabel(appLabel string, namespace string, env string, proEndpoint string) int
- func (impl AppListingServiceImpl) PodListByAppLabel(appLabel string, namespace string, env string, proEndpoint string) map[string]string
- func (impl AppListingServiceImpl) RedirectToLinkouts(Id int, appId int, envId int, podName string, containerName string) (string, error)
- type AppListingViewBuilder
- type AppListingViewBuilderImpl
- type AppNameTypeIdContainer
- type AppService
- type AppServiceConfig
- type AppServiceImpl
- func (impl *AppServiceImpl) BuildCDSuccessPayload(appName string, environmentName string) *client.Payload
- func (impl *AppServiceImpl) BuildPayload(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline, ...) *client.Payload
- func (impl *AppServiceImpl) CheckIfPipelineUpdateEventIsValid(argoAppName, gitHash string) (bool, pipelineConfig.Pipeline, pipelineConfig.CdWorkflowRunner, ...)
- func (impl *AppServiceImpl) CreateHistoriesForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, ...) error
- func (impl *AppServiceImpl) GetChartRepoName(gitRepoUrl string) string
- func (impl *AppServiceImpl) GetCmSecretNew(appId int, envId int) (*bean.ConfigMapJson, *bean.ConfigSecretJson, error)
- func (impl *AppServiceImpl) GetConfigMapAndSecretJson(appId int, envId int, pipelineId int) ([]byte, error)
- func (impl *AppServiceImpl) MarkImageScanDeployed(appId int, envId int, imageDigest string, clusterId int) error
- func (impl *AppServiceImpl) SavePipelineStatusTimelineIfNotAlreadyPresent(cdWfrId int, timelineStatus pipelineConfig.TimelineStatus, ...) (latestTimeline *pipelineConfig.PipelineStatusTimeline, err error, ...)
- func (impl *AppServiceImpl) TriggerCD(artifact *repository.CiArtifact, cdWorkflowId, wfrId int, ...) error
- func (impl *AppServiceImpl) TriggerRelease(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context, ...) (id int, err error)
- func (impl *AppServiceImpl) UpdateCdWorkflowRunnerByACDObject(app *v1alpha1.Application, cdWfrId int, updateTimedOutStatus bool) error
- func (impl *AppServiceImpl) UpdateDeploymentStatusAndCheckIsSucceeded(app *v1alpha1.Application, statusTime time.Time) (bool, error)
- func (impl *AppServiceImpl) UpdateDeploymentStatusForGitOpsCdPipelines(app *v1alpha1.Application, statusTime time.Time) (bool, bool, error)
- func (impl *AppServiceImpl) UpdateDeploymentStatusForPipeline(app *v1alpha1.Application, pipelineOverride *chartConfig.PipelineOverride, ...) (bool, error)
- func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(app *v1alpha1.Application, cdWfrId int, statusTime time.Time, ...) (isTimelineUpdated bool, isTimelineTimedOut bool, ...)
- func (impl *AppServiceImpl) UpdateReleaseStatus(updateStatusRequest *bean.ReleaseStatusUpdateRequest) (bool, error)
- func (impl *AppServiceImpl) WriteCDSuccessEvent(appId int, envId int, override *chartConfig.PipelineOverride)
- func (impl *AppServiceImpl) WriteCDTriggerEvent(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline, ...)
- type DeploymentEvent
- type DeploymentEventHandler
- type DeploymentEventHandlerImpl
- type EnvironmentOverride
- type FetchAppListingRequest
- type KeyValue
- type PipelineMaterialInfo
- type PipelineStatusSyncDetailService
- type PipelineStatusSyncDetailServiceImpl
- func (impl *PipelineStatusSyncDetailServiceImpl) GetLastSyncTimeForLatestCdWfrByCdPipelineId(pipelineId int) (time.Time, error)
- func (impl *PipelineStatusSyncDetailServiceImpl) GetSyncTimeAndCountByCdWfrId(cdWfrId int) (time.Time, int, error)
- func (impl *PipelineStatusSyncDetailServiceImpl) SaveOrUpdateSyncDetail(cdWfrId int, userId int32) error
- type PipelineStatusTimelineDto
- type PipelineStatusTimelineResourcesService
- type PipelineStatusTimelineResourcesServiceImpl
- func (impl *PipelineStatusTimelineResourcesServiceImpl) GetTimelineResourcesForATimeline(cdWfrId int) ([]*SyncStageResourceDetailDto, error)
- func (impl *PipelineStatusTimelineResourcesServiceImpl) SaveOrUpdateCdPipelineTimelineResources(cdWfrId int, application *v1alpha1.Application, tx *pg.Tx, userId int32) error
- type PipelineStatusTimelineService
- type PipelineStatusTimelineServiceImpl
- type PipelineTimelineDetailDto
- type ReleaseAttributes
- type ReleaseDataService
- type ReleaseDataServiceImpl
- type SyncStageResourceDetailDto
- type TeamAppBean
Constants ¶
View Source
const ( Initiate string = "Initiate" ScalingReplicaSetDown string = "ScalingReplicaSetDown" )
View Source
const ( Success = "SUCCESS" Failure = "FAILURE" )
View Source
const AcdInvalidAppErr = "invalid acd app name and env"
View Source
const NotDeployed = "Not Deployed"
Variables ¶
This section is empty.
Functions ¶
func BuildJobListingResponse ¶ added in v0.6.15
func BuildJobListingResponse(jobContainers []*bean.JobListingContainer, JobsLastSucceededOnTime []*bean.CiPipelineLastSucceededTime) []*bean.JobContainer
func GetCIPipelineIDs ¶ added in v0.6.15
func GetCIPipelineIDs(jobContainers []*bean.JobListingContainer) []int
Types ¶
type AppCrudOperationService ¶ added in v0.6.0
type AppCrudOperationService interface { Create(request *bean.AppLabelDto, tx *pg.Tx) (*bean.AppLabelDto, error) FindById(id int) (*bean.AppLabelDto, error) FindAll() ([]*bean.AppLabelDto, error) GetAppMetaInfo(appId int) (*bean.AppMetaInfoDto, error) GetHelmAppMetaInfo(appId string) (*bean.AppMetaInfoDto, error) GetLabelsByAppIdForDeployment(appId int) ([]byte, error) GetLabelsByAppId(appId int) (map[string]string, error) UpdateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error) UpdateProjectForApps(request *bean.UpdateProjectBulkAppsRequest) (*bean.UpdateProjectBulkAppsRequest, error) GetAppMetaInfoByAppName(appName string) (*bean.AppMetaInfoDto, error) GetAppListByTeamIds(teamIds []int, appType string) ([]*TeamAppBean, error) }
type AppCrudOperationServiceImpl ¶ added in v0.6.0
type AppCrudOperationServiceImpl struct {
// contains filtered or unexported fields
}
func NewAppCrudOperationServiceImpl ¶ added in v0.6.0
func NewAppCrudOperationServiceImpl(appLabelRepository pipelineConfig.AppLabelRepository, logger *zap.SugaredLogger, appRepository appRepository.AppRepository, userRepository repository.UserRepository, installedAppRepository repository2.InstalledAppRepository) *AppCrudOperationServiceImpl
func (AppCrudOperationServiceImpl) Create ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) Create(request *bean.AppLabelDto, tx *pg.Tx) (*bean.AppLabelDto, error)
func (AppCrudOperationServiceImpl) FindAll ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) FindAll() ([]*bean.AppLabelDto, error)
func (AppCrudOperationServiceImpl) FindById ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) FindById(id int) (*bean.AppLabelDto, error)
func (AppCrudOperationServiceImpl) GetAppListByTeamIds ¶ added in v0.6.11
func (impl AppCrudOperationServiceImpl) GetAppListByTeamIds(teamIds []int, appType string) ([]*TeamAppBean, error)
func (AppCrudOperationServiceImpl) GetAppMetaInfo ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) GetAppMetaInfo(appId int) (*bean.AppMetaInfoDto, error)
func (AppCrudOperationServiceImpl) GetAppMetaInfoByAppName ¶ added in v0.6.6
func (impl AppCrudOperationServiceImpl) GetAppMetaInfoByAppName(appName string) (*bean.AppMetaInfoDto, error)
func (AppCrudOperationServiceImpl) GetHelmAppMetaInfo ¶ added in v0.6.11
func (impl AppCrudOperationServiceImpl) GetHelmAppMetaInfo(appId string) (*bean.AppMetaInfoDto, error)
func (AppCrudOperationServiceImpl) GetLabelsByAppId ¶ added in v0.6.4
func (impl AppCrudOperationServiceImpl) GetLabelsByAppId(appId int) (map[string]string, error)
func (AppCrudOperationServiceImpl) GetLabelsByAppIdForDeployment ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) GetLabelsByAppIdForDeployment(appId int) ([]byte, error)
func (AppCrudOperationServiceImpl) UpdateApp ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) UpdateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
func (AppCrudOperationServiceImpl) UpdateLabelsInApp ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) UpdateLabelsInApp(request *bean.CreateAppDTO, tx *pg.Tx) (*bean.CreateAppDTO, error)
func (AppCrudOperationServiceImpl) UpdateProjectForApps ¶ added in v0.6.0
func (impl AppCrudOperationServiceImpl) UpdateProjectForApps(request *bean.UpdateProjectBulkAppsRequest) (*bean.UpdateProjectBulkAppsRequest, error)
type AppListingService ¶
type AppListingService interface { FetchAppsByEnvironment(fetchAppListingRequest FetchAppListingRequest, w http.ResponseWriter, r *http.Request, token string) ([]*bean.AppEnvironmentContainer, error) FetchJobs(fetchJobListingRequest FetchAppListingRequest) ([]*bean.JobContainer, error) FetchOverviewCiPipelines(jobId int) ([]*bean.JobListingContainer, error) BuildAppListingResponse(fetchAppListingRequest FetchAppListingRequest, envContainers []*bean.AppEnvironmentContainer) ([]*bean.AppContainer, error) FetchAllDevtronManagedApps() ([]AppNameTypeIdContainer, error) FetchAppDetails(ctx context.Context, appId int, envId int) (bean.AppDetailContainer, error) PodCountByAppLabel(appLabel string, namespace string, env string, proEndpoint string) int PodListByAppLabel(appLabel string, namespace string, env string, proEndpoint string) map[string]string // below 4 functions used for pod level cpu and memory usage CpuUsageGroupByPod(namespace string, env string, proEndpoint string) map[string]string CpuRequestGroupByPod(namespace string, env string, proEndpoint string) map[string]string MemoryUsageGroupByPod(namespace string, env string, proEndpoint string) map[string]string MemoryRequestGroupByPod(namespace string, env string, proEndpoint string) map[string]string //Currently not in use CpuUsageGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]string CpuRequestGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]string MemoryUsageGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]string MemoryRequestGroupByContainer(podName string, namespace string, env string, proEndpoint string) map[string]string //Currently not in use (intent to fetch graph data from prometheus) CpuUsageGroupByPodGraph(podName string, namespace string, env string, proEndpoint string, r v1.Range) map[string][]interface{} MemoryUsageGroupByPodGraph(podName string, namespace string, env string, proEndpoint string, r v1.Range) map[string][]interface{} GraphAPI(appId int, envId int) error FetchAppTriggerView(appId int) ([]bean.TriggerView, error) FetchAppStageStatus(appId int, appType int) ([]bean.AppStageStatus, error) FetchOtherEnvironment(ctx context.Context, appId int) ([]*bean.Environment, error) RedirectToLinkouts(Id int, appId int, envId int, podName string, containerName string) (string, error) ISLastReleaseStopType(appId, envId int) (bool, error) ISLastReleaseStopTypeV2(pipelineIds []int) (map[int]bool, error) GetReleaseCount(appId, envId int) (int, error) }
type AppListingServiceImpl ¶
type AppListingServiceImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewAppListingServiceImpl ¶
func NewAppListingServiceImpl(Logger *zap.SugaredLogger, appListingRepository repository.AppListingRepository, application application2.ServiceClient, appRepository app.AppRepository, appListingViewBuilder AppListingViewBuilder, pipelineRepository pipelineConfig.PipelineRepository, linkoutsRepository repository.LinkoutsRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, envLevelMetricsRepository repository.EnvLevelAppMetricsRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, environmentRepository repository2.EnvironmentRepository, argoUserService argo.ArgoUserService, envOverrideRepository chartConfig.EnvConfigOverrideRepository, chartRepository chartRepoRepository.ChartRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, dockerRegistryIpsConfigService dockerRegistry.DockerRegistryIpsConfigService) *AppListingServiceImpl
func (AppListingServiceImpl) BuildAppListingResponse ¶
func (impl AppListingServiceImpl) BuildAppListingResponse(fetchAppListingRequest FetchAppListingRequest, envContainers []*bean.AppEnvironmentContainer) ([]*bean.AppContainer, error)
func (AppListingServiceImpl) CpuRequestGroupByContainer
deprecated
func (AppListingServiceImpl) CpuRequestGroupByPod ¶
func (AppListingServiceImpl) CpuUsageGroupByContainer
deprecated
func (AppListingServiceImpl) CpuUsageGroupByPod ¶
func (AppListingServiceImpl) CpuUsageGroupByPodGraph
deprecated
func (AppListingServiceImpl) FetchAllDevtronManagedApps ¶ added in v0.6.9
func (impl AppListingServiceImpl) FetchAllDevtronManagedApps() ([]AppNameTypeIdContainer, error)
func (AppListingServiceImpl) FetchAppDetails ¶
func (impl AppListingServiceImpl) FetchAppDetails(ctx context.Context, appId int, envId int) (bean.AppDetailContainer, error)
func (AppListingServiceImpl) FetchAppStageStatus ¶
func (impl AppListingServiceImpl) FetchAppStageStatus(appId int, appType int) ([]bean.AppStageStatus, error)
func (AppListingServiceImpl) FetchAppTriggerView ¶
func (impl AppListingServiceImpl) FetchAppTriggerView(appId int) ([]bean.TriggerView, error)
func (AppListingServiceImpl) FetchAppsByEnvironment ¶
func (impl AppListingServiceImpl) FetchAppsByEnvironment(fetchAppListingRequest FetchAppListingRequest, w http.ResponseWriter, r *http.Request, token string) ([]*bean.AppEnvironmentContainer, error)
func (AppListingServiceImpl) FetchJobs ¶ added in v0.6.15
func (impl AppListingServiceImpl) FetchJobs(fetchJobListingRequest FetchAppListingRequest) ([]*bean.JobContainer, error)
func (AppListingServiceImpl) FetchOtherEnvironment ¶
func (impl AppListingServiceImpl) FetchOtherEnvironment(ctx context.Context, appId int) ([]*bean.Environment, error)
func (AppListingServiceImpl) FetchOverviewCiPipelines ¶ added in v0.6.15
func (impl AppListingServiceImpl) FetchOverviewCiPipelines(jobId int) ([]*bean.JobListingContainer, error)
func (AppListingServiceImpl) GetReleaseCount ¶
func (impl AppListingServiceImpl) GetReleaseCount(appId, envId int) (int, error)
func (AppListingServiceImpl) GraphAPI
deprecated
func (impl AppListingServiceImpl) GraphAPI(appId int, envId int) error
Deprecated: Currently not in use (intent to fetch graph data from prometheus)
func (AppListingServiceImpl) ISLastReleaseStopType ¶
func (impl AppListingServiceImpl) ISLastReleaseStopType(appId, envId int) (bool, error)
func (AppListingServiceImpl) ISLastReleaseStopTypeV2 ¶
func (impl AppListingServiceImpl) ISLastReleaseStopTypeV2(pipelineIds []int) (map[int]bool, error)
func (AppListingServiceImpl) MemoryRequestGroupByContainer
deprecated
func (AppListingServiceImpl) MemoryRequestGroupByPod ¶
func (AppListingServiceImpl) MemoryUsageGroupByContainer
deprecated
func (AppListingServiceImpl) MemoryUsageGroupByPod ¶
func (AppListingServiceImpl) MemoryUsageGroupByPodGraph
deprecated
func (AppListingServiceImpl) PodCountByAppLabel ¶
func (impl AppListingServiceImpl) PodCountByAppLabel(appLabel string, namespace string, env string, proEndpoint string) int
Return only a integer value pod count, aggregated of all the pod inside a app (includes all the pods running different cd pipeline for same app)
func (AppListingServiceImpl) PodListByAppLabel ¶
func (impl AppListingServiceImpl) PodListByAppLabel(appLabel string, namespace string, env string, proEndpoint string) map[string]string
Returns map of running pod names
func (AppListingServiceImpl) RedirectToLinkouts ¶
type AppListingViewBuilder ¶
type AppListingViewBuilder interface {
BuildView(fetchAppListingRequest FetchAppListingRequest, appEnvMap map[string][]*bean.AppEnvironmentContainer) ([]*bean.AppContainer, error)
}
type AppListingViewBuilderImpl ¶
type AppListingViewBuilderImpl struct {
Logger *zap.SugaredLogger
}
func NewAppListingViewBuilderImpl ¶
func NewAppListingViewBuilderImpl(Logger *zap.SugaredLogger) *AppListingViewBuilderImpl
func (*AppListingViewBuilderImpl) BuildView ¶
func (impl *AppListingViewBuilderImpl) BuildView(fetchAppListingRequest FetchAppListingRequest, appEnvMap map[string][]*bean.AppEnvironmentContainer) ([]*bean.AppContainer, error)
type AppNameTypeIdContainer ¶ added in v0.6.9
type AppService ¶
type AppService interface { TriggerRelease(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context, triggeredAt time.Time, triggeredBy int32, wfrId int) (id int, err error) UpdateReleaseStatus(request *bean.ReleaseStatusUpdateRequest) (bool, error) UpdateDeploymentStatusAndCheckIsSucceeded(app *v1alpha1.Application, statusTime time.Time) (bool, error) TriggerCD(artifact *repository.CiArtifact, cdWorkflowId, wfrId int, pipeline *pipelineConfig.Pipeline, triggeredAt time.Time) error GetConfigMapAndSecretJson(appId int, envId int, pipelineId int) ([]byte, error) UpdateCdWorkflowRunnerByACDObject(app *v1alpha1.Application, cdWfrId int, updateTimedOutStatus bool) error GetCmSecretNew(appId int, envId int) (*bean.ConfigMapJson, *bean.ConfigSecretJson, error) MarkImageScanDeployed(appId int, envId int, imageDigest string, clusterId int) error GetChartRepoName(gitRepoUrl string) string UpdateDeploymentStatusForGitOpsCdPipelines(app *v1alpha1.Application, statusTime time.Time) (bool, bool, error) WriteCDSuccessEvent(appId int, envId int, override *chartConfig.PipelineOverride) }
type AppServiceConfig ¶ added in v0.6.14
type AppServiceConfig struct { CdPipelineStatusCronTime string `env:"CD_PIPELINE_STATUS_CRON_TIME" envDefault:"*/2 * * * *"` CdHelmPipelineStatusCronTime string `env:"CD_HELM_PIPELINE_STATUS_CRON_TIME" envDefault:"*/2 * * * *"` CdPipelineStatusTimeoutDuration string `env:"CD_PIPELINE_STATUS_TIMEOUT_DURATION" envDefault:"20"` //in minutes PipelineDegradedTime string `env:"PIPELINE_DEGRADED_TIME" envDefault:"10"` //in minutes GetPipelineDeployedWithinHours int `env:"DEPLOY_STATUS_CRON_GET_PIPELINE_DEPLOYED_WITHIN_HOURS" envDefault:"12"` //in hours HelmPipelineStatusCheckEligibleTime string `env:"HELM_PIPELINE_STATUS_CHECK_ELIGIBLE_TIME" envDefault:"120"` //in seconds ExposeCDMetrics bool `env:"EXPOSE_CD_METRICS" envDefault:"false"` }
func GetAppServiceConfig ¶ added in v0.6.14
func GetAppServiceConfig() (*AppServiceConfig, error)
type AppServiceImpl ¶
type AppServiceImpl struct { ArgoK8sClient argocdServer.ArgoK8sClient AppStoreDeploymentService service.AppStoreDeploymentService // contains filtered or unexported fields }
func NewAppService ¶
func NewAppService( environmentConfigRepository chartConfig.EnvConfigOverrideRepository, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, mergeUtil *MergeUtil, logger *zap.SugaredLogger, ciArtifactRepository repository.CiArtifactRepository, pipelineRepository pipelineConfig.PipelineRepository, dbMigrationConfigRepository pipelineConfig.DbMigrationConfigRepository, eventClient client.EventClient, eventFactory client.EventFactory, acdClient application.ServiceClient, cache *util3.TokenCache, authConfig *util3.ACDAuthConfig, enforcer casbin.Enforcer, enforcerUtil rbac.EnforcerUtil, user user.UserService, appListingRepository repository.AppListingRepository, appRepository app.AppRepository, envRepository repository2.EnvironmentRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, envLevelMetricsRepository repository.EnvLevelAppMetricsRepository, chartRepository chartRepoRepository.ChartRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, commonService commonService.CommonService, imageScanDeployInfoRepository security.ImageScanDeployInfoRepository, imageScanHistoryRepository security.ImageScanHistoryRepository, ArgoK8sClient argocdServer.ArgoK8sClient, gitFactory *GitFactory, pipelineStrategyHistoryService history2.PipelineStrategyHistoryService, configMapHistoryService history2.ConfigMapHistoryService, deploymentTemplateHistoryService history2.DeploymentTemplateHistoryService, chartTemplateService ChartTemplateService, refChartDir chartRepoRepository.RefChartDir, chartRefRepository chartRepoRepository.ChartRefRepository, chartService chart.ChartService, helmAppClient client2.HelmAppClient, argoUserService argo.ArgoUserService, cdPipelineStatusTimelineRepo pipelineConfig.PipelineStatusTimelineRepository, appCrudOperationService AppCrudOperationService, configMapHistoryRepository repository3.ConfigMapHistoryRepository, strategyHistoryRepository repository3.PipelineStrategyHistoryRepository, deploymentTemplateHistoryRepository repository3.DeploymentTemplateHistoryRepository, dockerRegistryIpsConfigService dockerRegistry.DockerRegistryIpsConfigService, pipelineStatusTimelineResourcesService PipelineStatusTimelineResourcesService, pipelineStatusSyncDetailService PipelineStatusSyncDetailService, pipelineStatusTimelineService PipelineStatusTimelineService, appStatusConfig *AppServiceConfig, gitOpsConfigRepository repository.GitOpsConfigRepository, appStatusService appStatus.AppStatusService, installedAppRepository repository4.InstalledAppRepository, AppStoreDeploymentService service.AppStoreDeploymentService, k8sApplicationService k8s.K8sApplicationService) *AppServiceImpl
func (*AppServiceImpl) BuildCDSuccessPayload ¶
func (impl *AppServiceImpl) BuildCDSuccessPayload(appName string, environmentName string) *client.Payload
func (*AppServiceImpl) BuildPayload ¶
func (impl *AppServiceImpl) BuildPayload(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline, envOverride *chartConfig.EnvConfigOverride, materialInfo map[string]string, artifact *repository.CiArtifact) *client.Payload
func (*AppServiceImpl) CheckIfPipelineUpdateEventIsValid ¶ added in v0.6.11
func (impl *AppServiceImpl) CheckIfPipelineUpdateEventIsValid(argoAppName, gitHash string) (bool, pipelineConfig.Pipeline, pipelineConfig.CdWorkflowRunner, *chartConfig.PipelineOverride, error)
func (*AppServiceImpl) CreateHistoriesForDeploymentTrigger ¶ added in v0.3.21
func (impl *AppServiceImpl) CreateHistoriesForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *chartConfig.EnvConfigOverride, renderedImageTemplate string, deployedOn time.Time, deployedBy int32) error
func (*AppServiceImpl) GetChartRepoName ¶ added in v0.3.16
func (impl *AppServiceImpl) GetChartRepoName(gitRepoUrl string) string
func (*AppServiceImpl) GetCmSecretNew ¶
func (impl *AppServiceImpl) GetCmSecretNew(appId int, envId int) (*bean.ConfigMapJson, *bean.ConfigSecretJson, error)
FIXME tmp workaround
func (*AppServiceImpl) GetConfigMapAndSecretJson ¶
func (impl *AppServiceImpl) GetConfigMapAndSecretJson(appId int, envId int, pipelineId int) ([]byte, error)
depricated TODO remove this method
func (*AppServiceImpl) MarkImageScanDeployed ¶
func (*AppServiceImpl) SavePipelineStatusTimelineIfNotAlreadyPresent ¶ added in v0.4.28
func (impl *AppServiceImpl) SavePipelineStatusTimelineIfNotAlreadyPresent(cdWfrId int, timelineStatus pipelineConfig.TimelineStatus, timeline *pipelineConfig.PipelineStatusTimeline) (latestTimeline *pipelineConfig.PipelineStatusTimeline, err error, isTimelineUpdated bool)
func (*AppServiceImpl) TriggerCD ¶
func (impl *AppServiceImpl) TriggerCD(artifact *repository.CiArtifact, cdWorkflowId, wfrId int, pipeline *pipelineConfig.Pipeline, triggeredAt time.Time) error
func (*AppServiceImpl) TriggerRelease ¶
func (*AppServiceImpl) UpdateCdWorkflowRunnerByACDObject ¶
func (impl *AppServiceImpl) UpdateCdWorkflowRunnerByACDObject(app *v1alpha1.Application, cdWfrId int, updateTimedOutStatus bool) error
func (*AppServiceImpl) UpdateDeploymentStatusAndCheckIsSucceeded ¶ added in v0.6.11
func (impl *AppServiceImpl) UpdateDeploymentStatusAndCheckIsSucceeded(app *v1alpha1.Application, statusTime time.Time) (bool, error)
func (*AppServiceImpl) UpdateDeploymentStatusForGitOpsCdPipelines ¶ added in v0.6.11
func (impl *AppServiceImpl) UpdateDeploymentStatusForGitOpsCdPipelines(app *v1alpha1.Application, statusTime time.Time) (bool, bool, error)
func (*AppServiceImpl) UpdateDeploymentStatusForPipeline ¶ added in v0.6.11
func (impl *AppServiceImpl) UpdateDeploymentStatusForPipeline(app *v1alpha1.Application, pipelineOverride *chartConfig.PipelineOverride, cdWfrId int) (bool, error)
func (*AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges ¶ added in v0.4.28
func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(app *v1alpha1.Application, cdWfrId int, statusTime time.Time, triggeredAt time.Time, statusTimeoutDuration int, latestTimelineBeforeUpdate *pipelineConfig.PipelineStatusTimeline, reconciledAt *metav1.Time) (isTimelineUpdated bool, isTimelineTimedOut bool, kubectlApplySyncedTimeline *pipelineConfig.PipelineStatusTimeline, err error)
func (*AppServiceImpl) UpdateReleaseStatus ¶
func (impl *AppServiceImpl) UpdateReleaseStatus(updateStatusRequest *bean.ReleaseStatusUpdateRequest) (bool, error)
func (*AppServiceImpl) WriteCDSuccessEvent ¶
func (impl *AppServiceImpl) WriteCDSuccessEvent(appId int, envId int, override *chartConfig.PipelineOverride)
func (*AppServiceImpl) WriteCDTriggerEvent ¶
func (impl *AppServiceImpl) WriteCDTriggerEvent(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline, envOverride *chartConfig.EnvConfigOverride, materialInfoMap map[string]string, artifact *repository.CiArtifact, releaseId, pipelineOverrideId int)
type DeploymentEvent ¶
type DeploymentEventHandler ¶ added in v0.6.4
type DeploymentEventHandlerImpl ¶ added in v0.6.4
type DeploymentEventHandlerImpl struct {
// contains filtered or unexported fields
}
func NewDeploymentEventHandlerImpl ¶ added in v0.6.4
func NewDeploymentEventHandlerImpl(logger *zap.SugaredLogger, appListingService AppListingService, eventClient client.EventClient, eventFactory client.EventFactory) *DeploymentEventHandlerImpl
func (*DeploymentEventHandlerImpl) BuildPayload ¶ added in v0.6.4
func (*DeploymentEventHandlerImpl) WriteCDDeploymentEvent ¶ added in v0.6.4
func (impl *DeploymentEventHandlerImpl) WriteCDDeploymentEvent(pipelineId, appId, envId int, eventType util.EventType)
type EnvironmentOverride ¶
type FetchAppListingRequest ¶
type FetchAppListingRequest struct { Environments []int `json:"environments"` Statuses []string `json:"statuses"` Teams []int `json:"teams"` AppNameSearch string `json:"appNameSearch"` SortOrder helper.SortOrder `json:"sortOrder"` SortBy helper.SortBy `json:"sortBy"` Offset int `json:"offset"` Size int `json:"size"` DeploymentGroupId int `json:"deploymentGroupId"` Namespaces []string `json:"namespaces"` //{clusterId}_{namespace} AppStatuses []string `json:"appStatuses"` }
func (FetchAppListingRequest) GetNamespaceClusterMapping ¶ added in v0.3.14
func (req FetchAppListingRequest) GetNamespaceClusterMapping() (namespaceClusterPair []*repository2.ClusterNamespacePair, clusterIds []int, err error)
type PipelineMaterialInfo ¶
type PipelineStatusSyncDetailService ¶ added in v0.6.11
type PipelineStatusSyncDetailServiceImpl ¶ added in v0.6.11
type PipelineStatusSyncDetailServiceImpl struct {
// contains filtered or unexported fields
}
func NewPipelineStatusSyncDetailServiceImpl ¶ added in v0.6.11
func NewPipelineStatusSyncDetailServiceImpl(logger *zap.SugaredLogger, pipelineStatusSyncDetailRepository pipelineConfig.PipelineStatusSyncDetailRepository, ) *PipelineStatusSyncDetailServiceImpl
func (*PipelineStatusSyncDetailServiceImpl) GetLastSyncTimeForLatestCdWfrByCdPipelineId ¶ added in v0.6.11
func (impl *PipelineStatusSyncDetailServiceImpl) GetLastSyncTimeForLatestCdWfrByCdPipelineId(pipelineId int) (time.Time, error)
func (*PipelineStatusSyncDetailServiceImpl) GetSyncTimeAndCountByCdWfrId ¶ added in v0.6.11
func (*PipelineStatusSyncDetailServiceImpl) SaveOrUpdateSyncDetail ¶ added in v0.6.11
func (impl *PipelineStatusSyncDetailServiceImpl) SaveOrUpdateSyncDetail(cdWfrId int, userId int32) error
type PipelineStatusTimelineDto ¶ added in v0.5.1
type PipelineStatusTimelineDto struct { Id int `json:"id"` InstalledAppVersionHistoryId int `json:"InstalledAppVersionHistoryId,omitempty"` CdWorkflowRunnerId int `json:"cdWorkflowRunnerId"` Status pipelineConfig.TimelineStatus `json:"status"` StatusDetail string `json:"statusDetail"` StatusTime time.Time `json:"statusTime"` ResourceDetails []*SyncStageResourceDetailDto `json:"resourceDetails,omitempty"` }
type PipelineStatusTimelineResourcesService ¶ added in v0.6.11
type PipelineStatusTimelineResourcesService interface { SaveOrUpdateCdPipelineTimelineResources(cdWfrId int, application *v1alpha1.Application, tx *pg.Tx, userId int32) error GetTimelineResourcesForATimeline(cdWfrId int) ([]*SyncStageResourceDetailDto, error) }
type PipelineStatusTimelineResourcesServiceImpl ¶ added in v0.6.11
type PipelineStatusTimelineResourcesServiceImpl struct {
// contains filtered or unexported fields
}
func NewPipelineStatusTimelineResourcesServiceImpl ¶ added in v0.6.11
func NewPipelineStatusTimelineResourcesServiceImpl(dbConnection *pg.DB, logger *zap.SugaredLogger, pipelineStatusTimelineResourcesRepository pipelineConfig.PipelineStatusTimelineResourcesRepository) *PipelineStatusTimelineResourcesServiceImpl
func (*PipelineStatusTimelineResourcesServiceImpl) GetTimelineResourcesForATimeline ¶ added in v0.6.11
func (impl *PipelineStatusTimelineResourcesServiceImpl) GetTimelineResourcesForATimeline(cdWfrId int) ([]*SyncStageResourceDetailDto, error)
func (*PipelineStatusTimelineResourcesServiceImpl) SaveOrUpdateCdPipelineTimelineResources ¶ added in v0.6.11
func (impl *PipelineStatusTimelineResourcesServiceImpl) SaveOrUpdateCdPipelineTimelineResources(cdWfrId int, application *v1alpha1.Application, tx *pg.Tx, userId int32) error
type PipelineStatusTimelineService ¶ added in v0.5.1
type PipelineStatusTimelineService interface { SaveTimeline(timeline *pipelineConfig.PipelineStatusTimeline, tx *pg.Tx) error FetchTimelines(appId, envId, wfrId int) (*PipelineTimelineDetailDto, error) }
type PipelineStatusTimelineServiceImpl ¶ added in v0.5.1
type PipelineStatusTimelineServiceImpl struct {
// contains filtered or unexported fields
}
func NewPipelineStatusTimelineServiceImpl ¶ added in v0.5.1
func NewPipelineStatusTimelineServiceImpl(logger *zap.SugaredLogger, pipelineStatusTimelineRepository pipelineConfig.PipelineStatusTimelineRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, userService user.UserService, pipelineStatusTimelineResourcesService PipelineStatusTimelineResourcesService, pipelineStatusSyncDetailService PipelineStatusSyncDetailService, ) *PipelineStatusTimelineServiceImpl
func (*PipelineStatusTimelineServiceImpl) FetchTimelines ¶ added in v0.5.1
func (impl *PipelineStatusTimelineServiceImpl) FetchTimelines(appId, envId, wfrId int) (*PipelineTimelineDetailDto, error)
func (*PipelineStatusTimelineServiceImpl) SaveTimeline ¶ added in v0.6.11
func (impl *PipelineStatusTimelineServiceImpl) SaveTimeline(timeline *pipelineConfig.PipelineStatusTimeline, tx *pg.Tx) error
type PipelineTimelineDetailDto ¶ added in v0.5.1
type PipelineTimelineDetailDto struct { DeploymentStartedOn time.Time `json:"deploymentStartedOn"` DeploymentFinishedOn time.Time `json:"deploymentFinishedOn"` TriggeredBy string `json:"triggeredBy"` Timelines []*PipelineStatusTimelineDto `json:"timelines"` StatusLastFetchedAt time.Time `json:"statusLastFetchedAt"` StatusFetchCount int `json:"statusFetchCount"` WfrStatus string `json:"wfrStatus"` DeploymentAppDeleteRequest bool `json:"deploymentAppDeleteRequest"` }
type ReleaseAttributes ¶
type ReleaseDataService ¶
type ReleaseDataService interface { TriggerEventForAllRelease(appId, environmentId int) error GetDeploymentMetrics(request *lens.MetricRequest) (resBody []byte, resCode *lens.StatusCode, err error) }
type ReleaseDataServiceImpl ¶
type ReleaseDataServiceImpl struct {
// contains filtered or unexported fields
}
func NewReleaseDataServiceImpl ¶
func NewReleaseDataServiceImpl( pipelineOverrideRepository chartConfig.PipelineOverrideRepository, logger *zap.SugaredLogger, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, eventClient client.EventClient, lensClient lens.LensClient) *ReleaseDataServiceImpl
func (*ReleaseDataServiceImpl) GetDeploymentMetrics ¶
func (impl *ReleaseDataServiceImpl) GetDeploymentMetrics(request *lens.MetricRequest) (resBody []byte, resCode *lens.StatusCode, err error)
func (*ReleaseDataServiceImpl) TriggerEventForAllRelease ¶
func (impl *ReleaseDataServiceImpl) TriggerEventForAllRelease(appId, environmentId int) error
type SyncStageResourceDetailDto ¶ added in v0.6.11
type SyncStageResourceDetailDto struct { Id int `json:"id"` InstalledAppVersionHistoryId int `json:"installedAppVersionHistoryId,omitempty"` CdWorkflowRunnerId int `json:"cdWorkflowRunnerId,omitempty"` ResourceName string `json:"resourceName"` ResourceKind string `json:"resourceKind"` ResourceGroup string `json:"resourceGroup"` ResourceStatus string `json:"resourceStatus"` ResourcePhase string `json:"resourcePhase"` StatusMessage string `json:"statusMessage"` TimelineStage pipelineConfig.ResourceTimelineStage `json:"timelineStage,omitempty"` }
type TeamAppBean ¶ added in v0.6.11
Source Files ¶
Click to show internal directories.
Click to hide internal directories.