prune

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options added in v0.8.0

type Options struct {
	// DryRunStrategy defines whether objects should actually be pruned or if
	// we should just print what would happen without actually doing it.
	DryRunStrategy common.DryRunStrategy

	PropagationPolicy metav1.DeletionPropagation
}

Options defines a set of parameters that can be used to tune the behavior of the pruner.

type PruneOptions

type PruneOptions struct {
	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
}

PruneOptions encapsulates the necessary information to implement the prune functionality.

func NewPruneOptions

func NewPruneOptions() *PruneOptions

NewPruneOptions returns a struct (PruneOptions) encapsulating the necessary information to run the prune. Returns an error if an error occurs gathering this information.

func (*PruneOptions) Initialize

func (po *PruneOptions) Initialize(factory util.Factory, invClient inventory.InventoryClient) error

func (*PruneOptions) Prune

func (po *PruneOptions) Prune(localInv *unstructured.Unstructured, localObjs []*unstructured.Unstructured, currentUIDs sets.String,
	eventChannel chan<- event.Event, o Options) error

Prune deletes the set of resources which were previously applied (retrieved from previous inventory objects) but omitted in the current apply. Prune also delete all previous inventory objects. Returns an error if there was a problem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL