Documentation ¶
Overview ¶
The solver package is responsible for constructing a taskqueue based on the set of resources that should be applied. This involves setting up the appropriate sequence of apply, wait and prune tasks so any dependencies between resources doesn't cause a later apply operation to fail. Currently this package assumes that the resources have already been sorted in the appropriate order. We might want to consider moving the sorting functionality into this package.
Index ¶
- type Options
- type TaskQueue
- type TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendApplyTask(applyObjs object.UnstructuredSet, applyFilters []filter.ValidationFilter, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendApplyWaitTasks(applyObjs object.UnstructuredSet, applyFilters []filter.ValidationFilter, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendDeleteInvTask(inv inventory.InventoryInfo, dryRun common.DryRunStrategy) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendInvAddTask(inv inventory.InventoryInfo, applyObjs object.UnstructuredSet, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendInvSetTask(inv inventory.InventoryInfo, dryRun common.DryRunStrategy) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendPruneTask(pruneObjs object.UnstructuredSet, pruneFilters []filter.ValidationFilter, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendPruneWaitTasks(pruneObjs object.UnstructuredSet, pruneFilters []filter.ValidationFilter, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) AppendWaitTask(waitIds object.ObjMetadataSet, condition taskrunner.Condition, ...) *TaskQueueBuilder
- func (t *TaskQueueBuilder) Build() (*TaskQueue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { ServerSideOptions common.ServerSideOptions ReconcileTimeout time.Duration Prune bool DryRunStrategy common.DryRunStrategy PrunePropagationPolicy metav1.DeletionPropagation PruneTimeout time.Duration InventoryPolicy inventory.InventoryPolicy }
type TaskQueue ¶ added in v0.26.0
type TaskQueue struct {
// contains filtered or unexported fields
}
func (*TaskQueue) ToActionGroups ¶ added in v0.26.0
func (tq *TaskQueue) ToActionGroups() []event.ActionGroup
func (*TaskQueue) ToChannel ¶ added in v0.26.0
func (tq *TaskQueue) ToChannel() chan taskrunner.Task
type TaskQueueBuilder ¶ added in v0.26.0
type TaskQueueBuilder struct { PruneOptions *prune.PruneOptions InfoHelper info.InfoHelper Factory util.Factory Mapper meta.RESTMapper InvClient inventory.InventoryClient // True if we are destroying, which deletes the inventory object // as well (possibly) the inventory namespace. Destroy bool // contains filtered or unexported fields }
func (*TaskQueueBuilder) AppendApplyTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendApplyTask(applyObjs object.UnstructuredSet, applyFilters []filter.ValidationFilter, applyMutators []mutator.Interface, o Options) *TaskQueueBuilder
AppendInvAddTask appends a task to the task queue to apply the passed objects to the cluster. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendApplyWaitTasks ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendApplyWaitTasks(applyObjs object.UnstructuredSet, applyFilters []filter.ValidationFilter, applyMutators []mutator.Interface, o Options) *TaskQueueBuilder
AppendApplyWaitTasks adds apply and wait tasks to the task queue, depending on build variables (like dry-run) and resource types (like CRD's). Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendDeleteInvTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendDeleteInvTask(inv inventory.InventoryInfo, dryRun common.DryRunStrategy) *TaskQueueBuilder
AppendInvAddTask appends to the task queue a task to delete the inventory object. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendInvAddTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendInvAddTask(inv inventory.InventoryInfo, applyObjs object.UnstructuredSet, dryRun common.DryRunStrategy) *TaskQueueBuilder
AppendInvAddTask appends an inventory add task to the task queue. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendInvSetTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendInvSetTask(inv inventory.InventoryInfo, dryRun common.DryRunStrategy) *TaskQueueBuilder
AppendInvAddTask appends an inventory set task to the task queue. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendPruneTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendPruneTask(pruneObjs object.UnstructuredSet, pruneFilters []filter.ValidationFilter, o Options) *TaskQueueBuilder
AppendInvAddTask appends a task to delete objects from the cluster to the task queue. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendPruneWaitTasks ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendPruneWaitTasks(pruneObjs object.UnstructuredSet, pruneFilters []filter.ValidationFilter, o Options) *TaskQueueBuilder
AppendPruneWaitTasks adds prune and wait tasks to the task queue based on build variables (like dry-run). Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) AppendWaitTask ¶ added in v0.26.0
func (t *TaskQueueBuilder) AppendWaitTask(waitIds object.ObjMetadataSet, condition taskrunner.Condition, waitTimeout time.Duration) *TaskQueueBuilder
AppendInvAddTask appends a task to wait on the passed objects to the task queue. Returns a pointer to the Builder to chain function calls.
func (*TaskQueueBuilder) Build ¶ added in v0.26.0
func (t *TaskQueueBuilder) Build() (*TaskQueue, error)
Build returns the queue of tasks that have been created. TODO(seans): Now that we're reporting errors, we probably want to move away from the Builder patter for the TaskBuilder.