Documentation ¶
Overview ¶
Package deployment 部署相关操作
Index ¶
- type DeployFSMContext
- func (fsm *DeployFSMContext) ExportLogInfoDetail(level apistructs.ErrorLogLevel, id string, humanlog, detaillog string)
- func (fsm *DeployFSMContext) GetProjectNamespace(workspace string) string
- func (fsm *DeployFSMContext) IsEnabledProjectNamespace() bool
- func (fsm *DeployFSMContext) Load() error
- func (fsm *DeployFSMContext) PrepareCheckProjectResource(app *apistructs.ApplicationDTO, projectID uint64, legacyDice *diceyml.Object, ...) (float64, float64, error)
- func (fsm *DeployFSMContext) PutHepaService() error
- func (fsm *DeployFSMContext) UpdateServiceGroupWithLoop(group apistructs.ServiceGroupCreateV2Request) error
- type Deployment
- func (d *Deployment) Approve(userID user.ID, orgID uint64, deploymentID uint64, reject bool, reason string, ...) error
- func (d *Deployment) CancelLastDeploy(runtimeID uint64, operator string, force bool) error
- func (d *Deployment) ContinueDeploy(deploymentID uint64) error
- func (d *Deployment) DeployStageAddons(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
- func (d *Deployment) DeployStageDomains(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
- func (d *Deployment) DeployStageServices(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
- func (d *Deployment) GetStatus(deploymentID uint64) (*apistructs.DeploymentStatusDTO, error)
- func (d *Deployment) List(userID user.ID, orgID uint64, runtimeID uint64, statuses []string, ...) (*apistructs.DeploymentListData, error)
- func (d *Deployment) ListOrg(userID user.ID, orgID uint64, needFilterProjectRole bool, needApproval *bool, ...) (*apistructs.DeploymentDetailListData, error)
- type Option
- func WithAddon(a *addon.Addon) Option
- func WithBundle(bdl *bundle.Bundle) Option
- func WithDBClient(db *dbclient.DBClient) Option
- func WithEncrypt(encrypt *encryption.EnvEncrypt) Option
- func WithEventManager(evMgr *events.EventManager) Option
- func WithMigration(m *migration.Migration) Option
- func WithResource(resource *resource.Resource) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeployFSMContext ¶
type DeployFSMContext struct { Deployment *dbclient.Deployment Runtime *dbclient.Runtime Cluster *apistructs.ClusterInfo App *apistructs.ApplicationDTO Spec *diceyml.Object ProjectNamespaces map[string]string // contains filtered or unexported fields }
func NewFSMContext ¶
func NewFSMContext(deploymentID uint64, db *dbclient.DBClient, evMgr *events.EventManager, bdl *bundle.Bundle, a *addon.Addon, m *migration.Migration, encrypt *encryption.EnvEncrypt, resource *resource.Resource) *DeployFSMContext
TODO: context should base on deployment service
func (*DeployFSMContext) ExportLogInfoDetail ¶
func (fsm *DeployFSMContext) ExportLogInfoDetail(level apistructs.ErrorLogLevel, id string, humanlog, detaillog string)
func (*DeployFSMContext) GetProjectNamespace ¶
func (fsm *DeployFSMContext) GetProjectNamespace(workspace string) string
GetProjectNamespace 获取项目命名空间
func (*DeployFSMContext) IsEnabledProjectNamespace ¶
func (fsm *DeployFSMContext) IsEnabledProjectNamespace() bool
IsEnabledProjectNamespace 是否开启了项目命名空间
func (*DeployFSMContext) Load ¶
func (fsm *DeployFSMContext) Load() error
func (*DeployFSMContext) PrepareCheckProjectResource ¶
func (fsm *DeployFSMContext) PrepareCheckProjectResource(app *apistructs.ApplicationDTO, projectID uint64, legacyDice *diceyml.Object, runtime *dbclient.Runtime) (float64, float64, error)
prepareCheckProjectResource 计算项目预留资源,是否满足发布徐局
func (*DeployFSMContext) PutHepaService ¶
func (fsm *DeployFSMContext) PutHepaService() error
putHepaService 发送给hepa的数据信息
func (*DeployFSMContext) UpdateServiceGroupWithLoop ¶ added in v1.4.0
func (fsm *DeployFSMContext) UpdateServiceGroupWithLoop(group apistructs.ServiceGroupCreateV2Request) error
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment 部署对象封装
func (*Deployment) CancelLastDeploy ¶
func (d *Deployment) CancelLastDeploy(runtimeID uint64, operator string, force bool) error
func (*Deployment) ContinueDeploy ¶
func (d *Deployment) ContinueDeploy(deploymentID uint64) error
func (*Deployment) DeployStageAddons ¶
func (d *Deployment) DeployStageAddons(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
func (*Deployment) DeployStageDomains ¶
func (d *Deployment) DeployStageDomains(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
func (*Deployment) DeployStageServices ¶
func (d *Deployment) DeployStageServices(deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
func (*Deployment) GetStatus ¶
func (d *Deployment) GetStatus(deploymentID uint64) (*apistructs.DeploymentStatusDTO, error)
GetStatus 查询部署状态
func (*Deployment) List ¶
func (d *Deployment) List(userID user.ID, orgID uint64, runtimeID uint64, statuses []string, page apistructs.PageInfo) ( *apistructs.DeploymentListData, error)
List 查询部署记录列表
func (*Deployment) ListOrg ¶
func (d *Deployment) ListOrg(userID user.ID, orgID uint64, needFilterProjectRole bool, needApproval *bool, approvedBy *user.ID, operateUsers []string, approved *bool, approvalStatus *string, types []string, ids []uint64, page apistructs.PageInfo) ( *apistructs.DeploymentDetailListData, error)
ListOrg 查询部署记录(列出orgid下所有有权限的deployments)
type Option ¶
type Option func(*Deployment)
Option 部署对象配置选项
func WithEncrypt ¶
func WithEncrypt(encrypt *encryption.EnvEncrypt) Option
WithEncrypt 配置 encrypt service
func WithEventManager ¶
func WithEventManager(evMgr *events.EventManager) Option
WithEventManager 配置 EventManager
func WithMigration ¶
WithMigration 配置 Migration service
func WithResource ¶
WithResource 配置 Runtime service
Click to show internal directories.
Click to hide internal directories.