Documentation
¶
Index ¶
- Constants
- func GetRefWorkflow(ctx context.Context, cli client.Reader, appNamespace, name string) (*wfTypesv1alpha1.Workflow, error)
- 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 GetRefWorkflow ¶
func GetRefWorkflow(ctx context.Context, cli client.Reader, appNamespace, name string) (*wfTypesv1alpha1.Workflow, error)
GetRefWorkflow gets the Workflow an Application's workflow ref names: from the Application's namespace, else from the system namespace, the order a definition is looked up in. A Workflow in the Application's namespace wins over a system one of the same name.
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 []wfTypesv1alpha1.WorkflowStep, internalPolicies []v1beta1.AppPolicy, expressionsEnabled bool) ([]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. expressionsEnabled allows unresolved expression types and defers expression policy names to the workflow step.
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 []wfTypesv1alpha1.WorkflowStep) (steps []wfTypesv1alpha1.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 []wfTypesv1alpha1.WorkflowStep) (steps []wfTypesv1alpha1.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 []wfTypesv1alpha1.WorkflowStep) (steps []wfTypesv1alpha1.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 []wfTypesv1alpha1.WorkflowStep) (steps []wfTypesv1alpha1.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 []wfTypesv1alpha1.WorkflowStep) (steps []wfTypesv1alpha1.WorkflowStep, err error)
Generate generate workflow steps
type WorkflowStepGenerator ¶
type WorkflowStepGenerator interface {
Generate(app *v1beta1.Application, existingSteps []wfTypesv1alpha1.WorkflowStep) ([]wfTypesv1alpha1.WorkflowStep, error)
}
WorkflowStepGenerator generator generates workflow steps
func NewChainWorkflowStepGenerator ¶
func NewChainWorkflowStepGenerator(generators ...WorkflowStepGenerator) WorkflowStepGenerator
NewChainWorkflowStepGenerator create ChainWorkflowStepGenerator