Documentation ¶
Index ¶
- Constants
- func ConvertSteps(steps []common.WorkflowStep) []v1beta1.WorkflowStep
- func LoadExternalPoliciesForWorkflow(ctx context.Context, cli client.Client, appNs string, ...) ([]v1beta1.AppPolicy, error)
- type ApplyComponentWorkflowStepGenerator
- type ChainWorkflowStepGenerator
- type Deploy2EnvWorkflowStepGenerator
- type DeployPreApproveWorkflowStepGenerator
- type DeployWorkflowStepGenerator
- type DeployWorkflowStepSpec
- type RefWorkflowStepGenerator
- type WorkflowStepGenerator
Constants ¶
const (
// DeployWorkflowStep identifies the step of deploy components in multi-clusters
DeployWorkflowStep = "deploy"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertSteps ¶ added in v1.3.0
func ConvertSteps(steps []common.WorkflowStep) []v1beta1.WorkflowStep
ConvertSteps convert common steps in to v1beta1 steps for compatibility
func LoadExternalPoliciesForWorkflow ¶ added in v1.3.0
func LoadExternalPoliciesForWorkflow(ctx context.Context, cli client.Client, appNs string, steps []v1beta1.WorkflowStep, internalPolicies []v1beta1.AppPolicy) ([]v1beta1.AppPolicy, error)
LoadExternalPoliciesForWorkflow detects policies used in workflow steps which are not declared in internal policies try to load them from external policy objects in the application's namespace
Types ¶
type ApplyComponentWorkflowStepGenerator ¶
type ApplyComponentWorkflowStepGenerator struct{}
ApplyComponentWorkflowStepGenerator generate apply-component workflow steps for all components in the application
func (*ApplyComponentWorkflowStepGenerator) Generate ¶
func (g *ApplyComponentWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type ChainWorkflowStepGenerator ¶
type ChainWorkflowStepGenerator struct {
// contains filtered or unexported fields
}
ChainWorkflowStepGenerator chains multiple workflow step generators
func (*ChainWorkflowStepGenerator) Generate ¶
func (g *ChainWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type Deploy2EnvWorkflowStepGenerator ¶
type Deploy2EnvWorkflowStepGenerator struct{}
Deploy2EnvWorkflowStepGenerator generate deploy2env workflow steps for all envs in the application
func (*Deploy2EnvWorkflowStepGenerator) Generate ¶
func (g *Deploy2EnvWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type DeployPreApproveWorkflowStepGenerator ¶ added in v1.3.0
type DeployPreApproveWorkflowStepGenerator struct{}
DeployPreApproveWorkflowStepGenerator generate suspend workflow steps before all deploy steps
func (*DeployPreApproveWorkflowStepGenerator) Generate ¶ added in v1.3.0
func (g *DeployPreApproveWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type DeployWorkflowStepGenerator ¶ added in v1.3.0
type DeployWorkflowStepGenerator struct{}
DeployWorkflowStepGenerator generate deploy workflow steps for all topology & override in the application
func (*DeployWorkflowStepGenerator) Generate ¶ added in v1.3.0
func (g *DeployWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type DeployWorkflowStepSpec ¶ added in v1.3.0
type DeployWorkflowStepSpec struct { // Auto nil/true mean auto deploy, false means additional pre-approve step will be injected before the deploy step Auto *bool `json:"auto,omitempty"` // Policies specifies the policies to use in the step Policies []string `json:"policies,omitempty"` // Parallelism allows setting parallelism for the component deploy process Parallelism *int `json:"parallelism,omitempty"` }
DeployWorkflowStepSpec the spec of `deploy` WorkflowStep
type RefWorkflowStepGenerator ¶ added in v1.3.0
RefWorkflowStepGenerator generate workflow steps from ref workflow
func (*RefWorkflowStepGenerator) Generate ¶ added in v1.3.0
func (g *RefWorkflowStepGenerator) Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) (steps []v1beta1.WorkflowStep, err error)
Generate generate workflow steps
type WorkflowStepGenerator ¶
type WorkflowStepGenerator interface {
Generate(app *v1beta1.Application, existingSteps []v1beta1.WorkflowStep) ([]v1beta1.WorkflowStep, error)
}
WorkflowStepGenerator generator generates workflow steps
func NewChainWorkflowStepGenerator ¶
func NewChainWorkflowStepGenerator(generators ...WorkflowStepGenerator) WorkflowStepGenerator
NewChainWorkflowStepGenerator create ChainWorkflowStepGenerator