plan

package
v0.0.0-...-5a1439f Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

README

Determines which kapps should be installed, deleted or ignored based on a stack config (and list of manifests), and the current state of the cluster.

This package can generate and apply plans.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dag

type Dag struct {
	// contains filtered or unexported fields
}

Wrapper around a directed graph so we can define our own methods on it

func BuildDagForSelected

func BuildDagForSelected(stackObj interfaces.IStack, workspaceDir string, includeSelector []string,
	excludeSelector []string, includeParents bool) (*Dag, error)

Creates a DAG for installables matched by selectors. If an optional state (e.g. present, absent, etc.) is provided, only installables with the same state will be included in the returned DAG

func Create

func Create(stackObj interfaces.IStack, selectedInstallableIds []string, includeParents bool) (*Dag, error)

Creates a DAG for installables in the given manifests. If a list of selected installable IDs is given a subgraph will be returned containing only those installables and their ancestors.

func (*Dag) Execute

func (d *Dag) Execute(action string, stackObj interfaces.IStack, plan bool, approved bool, skipPreActions bool,
	skipPostActions bool, ignoreErrors bool, dryRun bool) error

Traverses the DAG executing the named action on marked/processable nodes depending on the given options

func (*Dag) ExecuteGetVars

func (d *Dag) ExecuteGetVars(action string, stackObj interfaces.IStack, loadOutputs bool, suppress []string) error

Traverses the DAG printing vars for all marked nodes, optionally suppressing output for certain keys

func (*Dag) GetInstallables

func (g *Dag) GetInstallables() []interfaces.IInstallable

Returns a list of all marked installables in the DAG (in any order).

func (*Dag) Print

func (g *Dag) Print() error

Prints the DAG

func (*Dag) Visualise

func (g *Dag) Visualise(clusterName string) string

Returns a definition of the DAG compatible with GraphViz for visualising it

type NamedNode

type NamedNode struct {
	// contains filtered or unexported fields
}

A node in a graph that also has a string name

func (NamedNode) ID

func (n NamedNode) ID() int64

Jump to

Keyboard shortcuts

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