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
type ChainWorkflowStepGenerator ¶
type ChainWorkflowStepGenerator struct {
// contains filtered or unexported fields
}
ChainWorkflowStepGenerator chains multiple workflow step generators
type Deploy2EnvWorkflowStepGenerator ¶
type Deploy2EnvWorkflowStepGenerator struct{}
Deploy2EnvWorkflowStepGenerator generate deploy2env workflow steps for all envs in the application
type DeployPreApproveWorkflowStepGenerator ¶ added in v1.3.0
type DeployPreApproveWorkflowStepGenerator struct{}
DeployPreApproveWorkflowStepGenerator generate suspend workflow steps before all deploy steps
type DeployWorkflowStepGenerator ¶ added in v1.3.0
type DeployWorkflowStepGenerator struct{}
DeployWorkflowStepGenerator generate deploy workflow steps for all topology & override in the application
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
type RefWorkflowStepGenerator struct {
context.Context
client.Client
}
RefWorkflowStepGenerator generate workflow steps from ref workflow
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