target

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package target implements state for the set of all resources to customize.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KustTarget

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

KustTarget encapsulates the entirety of a kustomization build.

func NewKustTarget

func NewKustTarget(
	ldr ifc.Loader,
	rFactory *resmap.Factory,
	tFactory transformer.Factory) (*KustTarget, error)

NewKustTarget returns a new instance of KustTarget primed with a Loader.

func (*KustTarget) AccumulateTarget

func (kt *KustTarget) AccumulateTarget() (
	ra *ResAccumulator, err error)

AccumulateTarget returns a new ResAccumulator, holding customized resources and the data/rules used to do so. The name back references and vars are not yet fixed.

func (*KustTarget) MakeCustomizedResMap

func (kt *KustTarget) MakeCustomizedResMap() (resmap.ResMap, error)

MakeCustomizedResMap creates a ResMap per kustomization instructions. The Resources in the returned ResMap are fully customized.

type ResAccumulator

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

ResAccumulator accumulates resources and the rules used to customize those resources. TODO(monopole): Move to "accumulator" package and make members private. This will make a better separation between KustTarget, which should be mainly concerned with data loading, and this class, which could become the home of all transformation data and logic.

func MakeEmptyAccumulator

func MakeEmptyAccumulator() *ResAccumulator

func (*ResAccumulator) FixBackReferences

func (ra *ResAccumulator) FixBackReferences() (err error)

func (*ResAccumulator) MergeAccumulator

func (ra *ResAccumulator) MergeAccumulator(other *ResAccumulator) (err error)

func (*ResAccumulator) MergeConfig

func (ra *ResAccumulator) MergeConfig(
	tConfig *config.TransformerConfig) (err error)

func (*ResAccumulator) MergeResourcesWithErrorOnIdCollision

func (ra *ResAccumulator) MergeResourcesWithErrorOnIdCollision(
	resources resmap.ResMap) (err error)

func (*ResAccumulator) MergeResourcesWithOverride

func (ra *ResAccumulator) MergeResourcesWithOverride(
	resources resmap.ResMap) (err error)

func (*ResAccumulator) MergeVars

func (ra *ResAccumulator) MergeVars(incoming []types.Var) error

func (*ResAccumulator) ResMap

func (ra *ResAccumulator) ResMap() resmap.ResMap

ResMap returns a copy of the internal resMap.

func (*ResAccumulator) ResolveVars

func (ra *ResAccumulator) ResolveVars() error

func (*ResAccumulator) Transform

func (ra *ResAccumulator) Transform(t transformers.Transformer) error

func (*ResAccumulator) Vars

func (ra *ResAccumulator) Vars() []types.Var

Vars returns a copy of underlying vars.

Jump to

Keyboard shortcuts

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