Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteWorkflow(ctx context.Context, wfClient Client) error
- func GetNamespace() string
- func IsFailed(ctx context.Context, wfClient Client) (bool, error)
- func IsSucceeded(ctx context.Context, wfClient Client) (bool, error)
- func Run(ctx context.Context, wfClient Client) error
- func SetFailed(wfClient Client, message string)
- func SetProgressing(wfClient Client)
- func SetSucceeded(wfClient Client)
- func SetSuspended(wfClient Client)
- func Suspend(ctx context.Context, wfClient Client) error
- func UpdateStatus(ctx context.Context, wfClient Client) error
- type Builder
- func (builder *Builder) Build() Client
- func (builder *Builder) Forward(appGroup *v1alpha1.ApplicationGroup) *Builder
- func (builder *Builder) InNamespace(namespace string) *Builder
- func (builder *Builder) Reverse(appGroup *v1alpha1.ApplicationGroup) *Builder
- func (builder *Builder) Rollback(appGroup *v1alpha1.ApplicationGroup) *Builder
- func (builder *Builder) WithExecutor(executor ExecutorFunc) *Builder
- func (builder *Builder) WithParallelism(numNodes int64) *Builder
- func (builder *Builder) WithStagingRepo(stagingURL string) *Builder
- type Client
- type ClientOptions
- type ClientType
- type ExecutorAction
- type ExecutorFunc
- type ForwardWorkflowClient
- func (wc *ForwardWorkflowClient) Generate(ctx context.Context) error
- func (wc *ForwardWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *ForwardWorkflowClient) GetClient() client.Client
- func (wc *ForwardWorkflowClient) GetLogger() logr.Logger
- func (wc *ForwardWorkflowClient) GetNamespace() string
- func (wc *ForwardWorkflowClient) GetOptions() ClientOptions
- func (wc *ForwardWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *ForwardWorkflowClient) GetWorkflow(ctx context.Context) (*v1alpha13.Workflow, error)
- func (wc *ForwardWorkflowClient) Submit(ctx context.Context) error
- type Graph
- type Node
- type ReverseWorkflowClient
- func (wc *ReverseWorkflowClient) Generate(ctx context.Context) error
- func (wc *ReverseWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *ReverseWorkflowClient) GetClient() client.Client
- func (wc *ReverseWorkflowClient) GetLogger() logr.Logger
- func (wc *ReverseWorkflowClient) GetNamespace() string
- func (wc *ReverseWorkflowClient) GetOptions() ClientOptions
- func (wc *ReverseWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *ReverseWorkflowClient) GetWorkflow(ctx context.Context) (*v1alpha13.Workflow, error)
- func (wc *ReverseWorkflowClient) Submit(ctx context.Context) error
- type RollbackWorkflowClient
- func (wc *RollbackWorkflowClient) Generate(ctx context.Context) error
- func (wc *RollbackWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *RollbackWorkflowClient) GetClient() client.Client
- func (wc *RollbackWorkflowClient) GetLogger() logr.Logger
- func (wc *RollbackWorkflowClient) GetNamespace() string
- func (wc *RollbackWorkflowClient) GetOptions() ClientOptions
- func (wc *RollbackWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *RollbackWorkflowClient) GetWorkflow(ctx context.Context) (*v1alpha13.Workflow, error)
- func (wc *RollbackWorkflowClient) Submit(ctx context.Context) error
Constants ¶
View Source
const ( EntrypointTemplateName = "entry" HelmReleaseArg = "helmrelease" TimeoutArg = "timeout" HelmReleaseExecutorName = "helmrelease-executor" HelmReleaseReverseExecutorName = "helmrelease-reverse-executor" ValuesKeyGlobal = "global" ChartLabelKey = "chart" DefaultTimeout = "5m" ExecutorName = "executor" ExecutorImage = "azureorkestra/executor" ExecutorImageTag = "v0.4.1" ChartMuseumName = "chartmuseum" Project = "orkestra" OwnershipLabel = "owner" HeritageLabel = "heritage" )
Variables ¶
View Source
var ( ErrNoNodesFound = errors.New("no nodes found in the graph") ErrEntryNodeNotFound = errors.New("\"entry\" node not found") )
Functions ¶
func DeleteWorkflow ¶ added in v0.7.0
DeleteWorkflow removes the workflow from the api server associated with the workflow client
func GetNamespace ¶ added in v0.7.0
func GetNamespace() string
func IsFailed ¶ added in v0.7.0
IsFailed checks if the workflow created by the workflow client is in a failed state
func IsSucceeded ¶ added in v0.7.0
IsSucceeded checks if the workflow created by the workflow client is in a succeeded state
func SetProgressing ¶ added in v0.7.0
func SetProgressing(wfClient Client)
SetProgressing sets one of the workflow conditions in the progressing state
func SetSucceeded ¶ added in v0.7.0
func SetSucceeded(wfClient Client)
SetSucceeded sets one of the workflow conditions in the succeeded state
func SetSuspended ¶ added in v0.7.0
func SetSuspended(wfClient Client)
SetSuspended sets one of the workflow conditions in the suspended state
Types ¶
type Builder ¶ added in v0.7.0
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶ added in v0.7.0
func NewBuilderFromClient ¶ added in v0.7.0
func (*Builder) Forward ¶ added in v0.7.0
func (builder *Builder) Forward(appGroup *v1alpha1.ApplicationGroup) *Builder
func (*Builder) InNamespace ¶ added in v0.7.0
func (*Builder) Reverse ¶ added in v0.7.0
func (builder *Builder) Reverse(appGroup *v1alpha1.ApplicationGroup) *Builder
func (*Builder) Rollback ¶ added in v0.7.0
func (builder *Builder) Rollback(appGroup *v1alpha1.ApplicationGroup) *Builder
func (*Builder) WithExecutor ¶ added in v0.7.0
func (builder *Builder) WithExecutor(executor ExecutorFunc) *Builder
func (*Builder) WithParallelism ¶ added in v0.7.0
func (*Builder) WithStagingRepo ¶ added in v0.7.0
type Client ¶ added in v0.7.0
type Client interface { // Generate the object required by the workflow engine Generate(ctx context.Context) error // Submit the object required by the workflow engine generated by the Generate method Submit(ctx context.Context) error // GetType returns the workflow client type GetType() v1alpha1.WorkflowType // GetLogger returns the logger associated with the workflow client GetLogger() logr.Logger // GetNamespace returns the namespace that the workflow should run in GetNamespace() string // GetOptions returns the client options used with the workflow client GetOptions() ClientOptions // GetWorkflow returns the workflow from the k8s apiserver associated with the workflow client GetWorkflow(context.Context) (*v1alpha13.Workflow, error) // GetClient returns the k8s client associated with the workflow GetClient() client.Client // GetAppGroup returns the app group from the workflow client GetAppGroup() *v1alpha1.ApplicationGroup }
type ClientOptions ¶ added in v0.7.0
type ClientOptions struct {
// contains filtered or unexported fields
}
type ClientType ¶ added in v0.7.0
type ClientType string
type ExecutorAction ¶ added in v0.6.0
type ExecutorAction string
ExecutorAction defines the set of executor actions which can be performed on a helmrelease object
const ( Install ExecutorAction = "install" Delete ExecutorAction = "delete" )
type ExecutorFunc ¶ added in v0.7.0
type ExecutorFunc func(string, ExecutorAction) v1alpha13.Template
type ForwardWorkflowClient ¶ added in v0.7.0
type ForwardWorkflowClient struct { client.Client logr.Logger ClientOptions // contains filtered or unexported fields }
func (*ForwardWorkflowClient) Generate ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) Generate(ctx context.Context) error
func (*ForwardWorkflowClient) GetAppGroup ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
func (*ForwardWorkflowClient) GetClient ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetClient() client.Client
func (*ForwardWorkflowClient) GetLogger ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetLogger() logr.Logger
func (*ForwardWorkflowClient) GetNamespace ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetNamespace() string
func (*ForwardWorkflowClient) GetOptions ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetOptions() ClientOptions
func (*ForwardWorkflowClient) GetType ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetType() v1alpha1.WorkflowType
func (*ForwardWorkflowClient) GetWorkflow ¶ added in v0.7.0
type Graph ¶ added in v0.3.0
type Graph struct {
// contains filtered or unexported fields
}
func (*Graph) Reverse ¶ added in v0.3.0
func (g *Graph) Reverse() [][]fluxhelmv2beta1.HelmRelease
type Node ¶ added in v0.3.0
type Node struct { Status v1alpha13.NodeStatus Level int }
type ReverseWorkflowClient ¶ added in v0.7.0
type ReverseWorkflowClient struct { client.Client logr.Logger ClientOptions // contains filtered or unexported fields }
func (*ReverseWorkflowClient) Generate ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) Generate(ctx context.Context) error
func (*ReverseWorkflowClient) GetAppGroup ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
func (*ReverseWorkflowClient) GetClient ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetClient() client.Client
func (*ReverseWorkflowClient) GetLogger ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetLogger() logr.Logger
func (*ReverseWorkflowClient) GetNamespace ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetNamespace() string
func (*ReverseWorkflowClient) GetOptions ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetOptions() ClientOptions
func (*ReverseWorkflowClient) GetType ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetType() v1alpha1.WorkflowType
func (*ReverseWorkflowClient) GetWorkflow ¶ added in v0.7.0
type RollbackWorkflowClient ¶ added in v0.7.0
type RollbackWorkflowClient struct { client.Client logr.Logger ClientOptions // contains filtered or unexported fields }
func (*RollbackWorkflowClient) Generate ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) Generate(ctx context.Context) error
func (*RollbackWorkflowClient) GetAppGroup ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
func (*RollbackWorkflowClient) GetClient ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetClient() client.Client
func (*RollbackWorkflowClient) GetLogger ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetLogger() logr.Logger
func (*RollbackWorkflowClient) GetNamespace ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetNamespace() string
func (*RollbackWorkflowClient) GetOptions ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetOptions() ClientOptions
func (*RollbackWorkflowClient) GetType ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetType() v1alpha1.WorkflowType
func (*RollbackWorkflowClient) GetWorkflow ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.