Documentation ¶
Index ¶
- Constants
- func IsBuiltinWorkflowStepType(wfType string) bool
- func LoadExternalPoliciesForWorkflow(ctx context.Context, cli client.Client, appNs string, ...) ([]v1beta1.AppPolicy, error)
- type ApplyComponentWorkflowStepGenerator
- type ChainWorkflowStepGenerator
- type Deploy2EnvWorkflowStepGenerator
- 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 IsBuiltinWorkflowStepType ¶ added in v1.6.0
IsBuiltinWorkflowStepType checks if workflow step type is builtin type
func LoadExternalPoliciesForWorkflow ¶ added in v1.3.0
func LoadExternalPoliciesForWorkflow(ctx context.Context, cli client.Client, appNs string, steps []workflowv1alpha1.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 []workflowv1alpha1.WorkflowStep) (steps []workflowv1alpha1.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 []workflowv1alpha1.WorkflowStep) (steps []workflowv1alpha1.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 []workflowv1alpha1.WorkflowStep) (steps []workflowv1alpha1.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 []workflowv1alpha1.WorkflowStep) (steps []workflowv1alpha1.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"` // IgnoreTerraformComponent default is true, true means this step will apply the components without the terraform workload. IgnoreTerraformComponent *bool `json:"ignoreTerraformComponent,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 []workflowv1alpha1.WorkflowStep) (steps []workflowv1alpha1.WorkflowStep, err error)
Generate generate workflow steps
type WorkflowStepGenerator ¶
type WorkflowStepGenerator interface {
Generate(app *v1beta1.Application, existingSteps []workflowv1alpha1.WorkflowStep) ([]workflowv1alpha1.WorkflowStep, error)
}
WorkflowStepGenerator generator generates workflow steps
func NewChainWorkflowStepGenerator ¶
func NewChainWorkflowStepGenerator(generators ...WorkflowStepGenerator) WorkflowStepGenerator
NewChainWorkflowStepGenerator create ChainWorkflowStepGenerator