appStoreBean

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CLUSTER_ID                          = 1
	DEFAULT_NAMESPACE                           = "default"
	DEFAULT_ENVIRONMENT_OR_NAMESPACE_OR_PROJECT = "devtron"
	CLUSTER_COMPONENT_DIR_PATH                  = "/cluster/component"
	HELM_RELEASE_STATUS_FAILED                  = "Failed"
	HELM_RELEASE_STATUS_PROGRESSING             = "Progressing"
	HELM_RELEASE_STATUS_UNKNOWN                 = "Unknown"
	FAILED_TO_REGISTER_IN_ACD_ERROR             = "failed to register app on ACD with error: "
	FAILED_TO_DELETE_APP_PREFIX_ERROR           = "error deleting app with error: "
	COULD_NOT_FETCH_APP_NAME_AND_ENV_NAME_ERR   = "could not fetch app name or environment name"
	APP_NOT_DELETED_YET_ERROR                   = "App Not Yet Deleted."
)
View Source
const REFERENCE_TYPE_DEFAULT string = "DEFAULT"
View Source
const REFERENCE_TYPE_DEPLOYED string = "DEPLOYED"
View Source
const REFERENCE_TYPE_EXISTING string = "EXISTING"
View Source
const REFERENCE_TYPE_TEMPLATE string = "TEMPLATE"
View Source
const (
	RefChartProxyDirPath = "scripts/devtron-reference-helm-charts"
)

Variables

View Source
var CHART_PROXY_TEMPLATE = "reference-chart-proxy"
View Source
var REQUIREMENTS_YAML_FILE = "requirements.yaml"
View Source
var VALUES_YAML_FILE = "values.yaml"

Functions

This section is empty.

Types

type AppListDetail added in v0.7.0

type AppListDetail struct {
	// clusters to which result corresponds
	ClusterIds *[]int32 `json:"clusterIds,omitempty"`
	// application type inside the array
	ApplicationType *string `json:"applicationType,omitempty"`
	// if data fetch for that cluster produced error
	Errored *bool `json:"errored,omitempty"`
	// error msg if client failed to fetch
	ErrorMsg *string `json:"errorMsg,omitempty"`
	// all helm app list, EA+ devtronapp
	HelmApps *[]HelmAppDetails `json:"helmApps,omitempty"`
	// all helm app list, EA+ devtronapp
	DevtronApps *[]openapi.DevtronApp `json:"devtronApps,omitempty"`
}

type AppNames

type AppNames struct {
	Name          string `json:"name,omitempty"`
	Exists        bool   `json:"exists"`
	SuggestedName string `json:"suggestedName,omitempty"`
}

type AppSotoreVersionDTOWrapper

type AppSotoreVersionDTOWrapper struct {
	Values []*AppStoreVersionValuesCategoryWiseDTO `json:"values"`
}

type AppStoreApplication

type AppStoreApplication struct {
	Id                          int                                   `json:"id"`
	Name                        string                                `json:"name"`
	ChartRepoId                 int                                   `json:"chartRepoId"`
	Active                      bool                                  `json:"active"`
	ChartGitLocation            string                                `json:"chartGitLocation"`
	CreatedOn                   time.Time                             `json:"createdOn"`
	UpdatedOn                   time.Time                             `json:"updatedOn"`
	AppStoreApplicationVersions []*AppStoreApplicationVersionResponse `json:"appStoreApplicationVersions"`
}

type AppStoreApplicationVersionResponse

type AppStoreApplicationVersionResponse struct {
	Id                      int       `json:"id"`
	Version                 string    `json:"version"`
	AppVersion              string    `json:"appVersion"`
	Created                 time.Time `json:"created"`
	Deprecated              bool      `json:"deprecated"`
	Description             string    `json:"description"`
	Digest                  string    `json:"digest"`
	Icon                    string    `json:"icon"`
	Name                    string    `json:"name"`
	ChartName               string    `json:"chartName"`
	AppStoreApplicationName string    `json:"appStoreApplicationName"`
	Home                    string    `json:"home"`
	Source                  string    `json:"source"`
	ValuesYaml              string    `json:"valuesYaml"`
	ChartYaml               string    `json:"chartYaml"`
	AppStoreId              int       `json:"appStoreId"`
	Latest                  bool      `json:"latest"`
	CreatedOn               time.Time `json:"createdOn"`
	RawValues               string    `json:"rawValues"`
	Readme                  string    `json:"readme"`
	ValuesSchemaJson        string    `json:"valuesSchemaJson"`
	Notes                   string    `json:"notes"`
	UpdatedOn               time.Time `json:"updatedOn"`
	IsChartRepoActive       bool      `json:"isChartRepoActive"`
	IsOCICompliantChart     bool      `json:"isOCICompliantChart"`
}

type AppStoreFilter

type AppStoreFilter struct {
	ChartRepoId       []int    `json:"chartRepoId"`
	RegistryId        []string `json:"registryId"`
	AppStoreName      string   `json:"appStoreName"`
	AppName           string   `json:"appName"`
	IncludeDeprecated bool     `json:"includeDeprecated"`
	Offset            int      `json:"offset"`
	Size              int      `json:"size"`
	EnvIds            []int    `json:"envIds"`
	OnlyDeprecated    bool     `json:"onlyDeprecated"`
	ClusterIds        []int    `json:"clusterIds"`
	AppStatuses       []string `json:"appStatuses"`
}

type AppStoreVersionValuesCategoryWiseDTO

type AppStoreVersionValuesCategoryWiseDTO struct {
	Values []*AppStoreVersionValuesDTO `json:"values"`
	Kind   string                      `json:"kind"`
}

type AppStoreVersionValuesDTO

type AppStoreVersionValuesDTO struct {
	Id                 int       `json:"id,omitempty"`
	AppStoreVersionId  int       `json:"appStoreVersionId,omitempty,notnull"`
	Name               string    `json:"name,omitempty"`
	Values             string    `json:"values,omitempty"` //yaml format user value
	ChartVersion       string    `json:"chartVersion,omitempty"`
	EnvironmentName    string    `json:"environmentName,omitempty"`
	Description        string    `json:"description,omitempty"`
	UpdatedByUserEmail string    `json:"updatedBy,omitempty"`
	UpdatedByUserId    int32     `json:"-"`
	UpdatedOn          time.Time `json:"updatedOn"`
	UserId             int32     `json:"-"`
}

type AppStoreVersionsResponse

type AppStoreVersionsResponse struct {
	Version string `json:"version"`
	Id      int    `json:"id"`
}

type AppStoreWithVersion

type AppStoreWithVersion struct {
	Id                           int       `json:"id"`
	AppStoreApplicationVersionId int       `json:"appStoreApplicationVersionId"`
	Name                         string    `json:"name"`
	ChartRepoId                  int       `json:"chart_repo_id"`
	DockerArtifactStoreId        string    `json:"docker_artifact_store_id"`
	ChartName                    string    `json:"chart_name"`
	Icon                         string    `json:"icon"`
	Active                       bool      `json:"active"`
	ChartGitLocation             string    `json:"chart_git_location"`
	CreatedOn                    time.Time `json:"created_on"`
	UpdatedOn                    time.Time `json:"updated_on"`
	Version                      string    `json:"version"`
	Deprecated                   bool      `json:"deprecated"`
	Description                  string    `json:"description"`
}

type AppstoreDeploymentStatus

type AppstoreDeploymentStatus int
const (
	WF_UNKNOWN AppstoreDeploymentStatus = iota
	REQUEST_ACCEPTED
	ENQUEUED
	QUE_ERROR
	DEQUE_ERROR
	TRIGGER_ERROR
	DEPLOY_SUCCESS
	DEPLOY_INIT
	GIT_ERROR
	GIT_SUCCESS
	ACD_ERROR
	ACD_SUCCESS
	HELM_ERROR
	HELM_SUCCESS
)

func (AppstoreDeploymentStatus) String

func (a AppstoreDeploymentStatus) String() string

type ChartComponent added in v0.6.28

type ChartComponent struct {
	Name   string `json:"name"`
	Values string `json:"values"`
}

type ChartComponents added in v0.6.28

type ChartComponents struct {
	ChartComponent []*ChartComponent `json:"charts"`
}

type ChartInfoRes added in v0.4.28

type ChartInfoRes struct {
	AppStoreApplicationVersionId int    `json:"appStoreApplicationVersionId"`
	Readme                       string `json:"readme"`
	ValuesSchemaJson             string `json:"valuesSchemaJson"`
	Notes                        string `json:"notes"`
}

type ChartRepoSearch

type ChartRepoSearch struct {
	AppStoreApplicationVersionId int    `json:"appStoreApplicationVersionId"`
	ChartId                      int    `json:"chartId"`
	ChartName                    string `json:"chartName"`
	ChartRepoId                  int    `json:"chartRepoId"`
	ChartRepoName                string `json:"chartRepoName"`
	Version                      string `json:"version"`
	Deprecated                   bool   `json:"deprecated"`
}

type Dependencies

type Dependencies struct {
	Dependencies []Dependency `json:"dependencies"`
}

type Dependency

type Dependency struct {
	Name       string `json:"name"`
	Version    string `json:"version"`
	Repository string `json:"repository"`
}

type EnvironmentDetails added in v0.7.0

type EnvironmentDetails struct {
	EnvironmentName *string `json:"environmentName,omitempty"`
	// id in which app is deployed
	EnvironmentId *int32 `json:"environmentId,omitempty"`
	// namespace corresponding to the environemnt
	Namespace *string `json:"namespace,omitempty"`
	// if given environemnt is marked as production or not, nullable
	IsPrduction *bool `json:"isPrduction,omitempty"`
	// cluster corresponding to the environemt where application is deployed
	ClusterName *string `json:"clusterName,omitempty"`
	// clusterId corresponding to the environemt where application is deployed
	ClusterId *int32 `json:"clusterId,omitempty"`

	IsVirtualEnvironment *bool `json:"isVirtualEnvironment"`
}

type HelmAppDetails added in v0.7.0

type HelmAppDetails struct {
	// time when this application was last deployed/updated
	LastDeployedAt *time.Time `json:"lastDeployedAt,omitempty"`
	// name of the helm application/helm release name
	AppName *string `json:"appName,omitempty"`
	// unique identifier for app
	AppId *string `json:"appId,omitempty"`
	// name of the chart
	ChartName *string `json:"chartName,omitempty"`
	// url/location of the chart icon
	ChartAvatar *string `json:"chartAvatar,omitempty"`
	// unique identifier for the project, APP with no project will have id `0`
	ProjectId *int32 `json:"projectId,omitempty"`
	// chart version
	ChartVersion      *string             `json:"chartVersion,omitempty"`
	EnvironmentDetail *EnvironmentDetails `json:"environmentDetail,omitempty"`
	AppStatus         *string             `json:"appStatus,omitempty"`
}

type HelmReleaseStatusConfig added in v0.6.24

type HelmReleaseStatusConfig struct {
	InstallAppVersionHistoryId int
	Message                    string
	IsReleaseInstalled         bool
	ErrorInInstallation        bool
}

type IAVHistory added in v0.3.21

type IAVHistory struct {
	ChartMetaData         IAVHistoryChartMetaData `json:"chartMetadata"`
	DeployedAt            IAVHistoryDeployedAt    `json:"deployedAt"`
	DockerImages          []string                `json:"dockerImages"`
	Version               int                     `json:"version"`
	InstalledAppVersionId int                     `json:"installedAppVersionId"`
}

type IAVHistoryChartMetaData added in v0.3.21

type IAVHistoryChartMetaData struct {
	ChartName    string   `json:"chartName"`
	ChartVersion string   `json:"chartVersion"`
	Description  string   `json:"description"`
	Home         string   `json:"home"`
	Sources      []string `json:"sources"`
}

type IAVHistoryDeployedAt added in v0.3.21

type IAVHistoryDeployedAt struct {
	Nanos   int   `json:"nanos,omitempty"`
	Seconds int64 `json:"seconds,omitempty"`
}

type IAVHistoryValues added in v0.3.21

type IAVHistoryValues struct {
	Manifest   string `json:"manifest"`
	ValuesYaml string `json:"valuesYaml"`
}

type InstallAppVersionChartDTO added in v0.3.17

type InstallAppVersionChartDTO struct {
	AppStoreChartId               int                            `json:"-"`
	ChartName                     string                         `json:"-"`
	ChartVersion                  string                         `json:"-"`
	InstallAppVersionChartRepoDTO *InstallAppVersionChartRepoDTO `json:"-"`
}

type InstallAppVersionChartRepoDTO added in v0.3.17

type InstallAppVersionChartRepoDTO struct {
	RepoName string `json:"-"`
	RepoUrl  string `json:"-"`
	UserName string `json:"-"`
	Password string `json:"-"`
}

type InstallAppVersionDTO

type InstallAppVersionDTO struct {
	Id                           int                            `json:"id,omitempty"` // TODO: redundant data; refers to InstalledAppVersionId
	AppId                        int                            `json:"appId,omitempty"`
	AppName                      string                         `json:"appName,omitempty"` // AppName can be display_name in case of external-apps (which is not unique in that case)
	TeamId                       int                            `json:"teamId,omitempty"`
	TeamName                     string                         `json:"teamName,omitempty"`
	EnvironmentId                int                            `json:"environmentId,omitempty"`
	InstalledAppId               int                            `json:"installedAppId,omitempty,notnull"`
	InstalledAppVersionId        int                            `json:"installedAppVersionId,omitempty,notnull"`
	InstalledAppVersionHistoryId int                            `json:"installedAppVersionHistoryId,omitempty"`
	AppStoreVersion              int                            `json:"appStoreVersion,omitempty,notnull"`
	ValuesOverrideYaml           string                         `json:"valuesOverrideYaml,omitempty"`
	Readme                       string                         `json:"readme,omitempty"`
	ReferenceValueId             int                            `json:"referenceValueId, omitempty" validate:"required,number"`                            // TODO: ineffective usage of omitempty; can be removed
	ReferenceValueKind           string                         `json:"referenceValueKind, omitempty" validate:"oneof=DEFAULT TEMPLATE DEPLOYED EXISTING"` // TODO: ineffective usage of omitempty; can be removed
	AppStoreId                   int                            `json:"appStoreId"`
	AppStoreName                 string                         `json:"appStoreName"`
	Deprecated                   bool                           `json:"deprecated"`
	ClusterId                    int                            `json:"clusterId"` // needed for hyperion mode
	Namespace                    string                         `json:"namespace"` // needed for hyperion mode
	AppOfferingMode              string                         `json:"appOfferingMode"`
	GitOpsPath                   string                         `json:"gitOpsPath"`
	GitHash                      string                         `json:"gitHash"`
	DeploymentAppType            string                         `json:"deploymentAppType"` // TODO: instead of string, use enum
	AcdPartialDelete             bool                           `json:"acdPartialDelete"`
	InstalledAppDeleteResponse   *InstalledAppDeleteResponseDTO `json:"deleteResponse,omitempty"`
	UpdatedOn                    time.Time                      `json:"updatedOn"`
	IsVirtualEnvironment         bool                           `json:"isVirtualEnvironment"`
	HelmPackageName              string                         `json:"helmPackageName"`
	GitOpsRepoURL                string                         `json:"gitRepoURL"`
	IsCustomRepository           bool                           `json:"-"`
	IsNewGitOpsRepo              bool                           `json:"-"`
	ACDAppName                   string                         `json:"-"`
	Environment                  *bean.EnvironmentBean          `json:"-"`
	ChartGroupEntryId            int                            `json:"-"`
	DefaultClusterComponent      bool                           `json:"-"`
	Status                       AppstoreDeploymentStatus       `json:"-"`
	UserId                       int32                          `json:"-"`
	ForceDelete                  bool                           `json:"-"`
	NonCascadeDelete             bool                           `json:"-"`
	EnvironmentName              string                         `json:"-"`
	InstallAppVersionChartDTO    *InstallAppVersionChartDTO     `json:"-"`
	AppStoreApplicationVersionId int
	DisplayName                  string `json:"-"` // used only for external apps
}

func (*InstallAppVersionDTO) UpdateACDAppName added in v0.7.0

func (chart *InstallAppVersionDTO) UpdateACDAppName()

UpdateACDAppName updates ArgoCd app object name to InstallAppVersionDTO

func (*InstallAppVersionDTO) UpdateCustomGitOpsRepoUrl added in v0.6.29

func (chart *InstallAppVersionDTO) UpdateCustomGitOpsRepoUrl(allowCustomRepository bool, installAppVersionRequestType InstallAppVersionRequestType)

func (*InstallAppVersionDTO) UpdateDeploymentAppType added in v0.6.29

func (chart *InstallAppVersionDTO) UpdateDeploymentAppType(deploymentAppType string)

UpdateDeploymentAppType updates deploymentAppType to InstallAppVersionDTO

type InstallAppVersionHistoryDto added in v0.3.21

type InstallAppVersionHistoryDto struct {
	InstalledAppInfo *InstalledAppDto `json:"installedAppInfo"`
	IAVHistory       []*IAVHistory    `json:"deploymentHistory"`
}

v1

type InstallAppVersionRequestType added in v0.6.29

type InstallAppVersionRequestType int
const (
	INSTALL_APP_REQUEST InstallAppVersionRequestType = iota
	BULK_DEPLOY_REQUEST
	DEFAULT_COMPONENT_DEPLOYMENT_REQUEST
)

type InstalledAppDeleteResponseDTO added in v0.6.18

type InstalledAppDeleteResponseDTO struct {
	DeleteInitiated  bool   `json:"deleteInitiated"`
	ClusterReachable bool   `json:"clusterReachable"`
	ClusterName      string `json:"clusterName"`
}

type InstalledAppDeploymentAction added in v0.6.29

type InstalledAppDeploymentAction struct {
	PerformGitOpsForHelmApp bool
	PerformGitOps           bool
	PerformACDDeployment    bool
	PerformHelmDeployment   bool
}

InstalledAppDeploymentAction is an internal struct for Helm App deployment; used to decide the deployment steps to be performed

type InstalledAppDto added in v0.3.21

type InstalledAppDto struct {
	AppId           int    `json:"appId"`
	InstalledAppId  int    `json:"installedAppId"`
	EnvironmentName string `json:"environmentName"`
	AppOfferingMode string `json:"appOfferingMode"`
	ClusterId       int    `json:"clusterId"`
	EnvironmentId   int    `json:"environmentId"`
}

type InstalledAppsResponse

type InstalledAppsResponse struct {
	AppStoreApplicationName      string    `json:"appStoreApplicationName"`
	ChartName                    string    `json:"chartName"`
	Icon                         string    `json:"icon"`
	Status                       string    `json:"status"`
	AppName                      string    `json:"appName"`
	InstalledAppVersionId        int       `json:"installedAppVersionId"`
	AppStoreApplicationVersionId int       `json:"appStoreApplicationVersionId"`
	EnvironmentName              string    `json:"environmentName"`
	DeployedAt                   time.Time `json:"deployedAt"`
	DeployedBy                   string    `json:"deployedBy"`
	DeploymentAppType            string    `json:"deploymentAppType,omitempty"` // TODO: instead of string, use enum
	InstalledAppsId              int       `json:"installedAppId"`
	Readme                       string    `json:"readme"`
	EnvironmentId                int       `json:"environmentId"`
	Deprecated                   bool      `json:"deprecated"`
	AppOfferingMode              string    `json:"appOfferingMode" validate:"oneof=EA_ONLY FULL"`
	ClusterId                    int       `json:"clusterId"` // needed for hyperion app
	Namespace                    string    `json:"namespace"` // needed for hyperion app
}

type RefChartProxyDir

type RefChartProxyDir string

/

type UpdateProjectHelmAppDTO added in v0.6.11

type UpdateProjectHelmAppDTO struct {
	AppId          string `json:"appId"`
	InstalledAppId int    `json:"installedAppId"`
	AppName        string `json:"appName"`
	TeamId         int    `json:"teamId"`
	UserId         int32  `json:"userId"`
}

type ValuesCategoryResponse

type ValuesCategoryResponse struct {
	ReferenceType      json.RawMessage      `json:"referenceType,omitempty"` //json format user value
	ValuesListCategory []ValuesListCategory `json:"valuesListCategory,omitempty"`
}

type ValuesListCategory

type ValuesListCategory struct {
	Id                int             `json:"id,omitempty"`
	AppStoreVersionId int             `json:"appStoreVersionId,omitempty,notnull"`
	ReferenceId       int             `json:"referenceId,omitempty,notnull"`
	Name              string          `json:"name,omitempty"`
	ValuesOverride    json.RawMessage `json:"valuesOverride,omitempty"` //json format user value
}

Jump to

Keyboard shortcuts

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