Documentation ¶
Overview ¶
Package composer contains functions for composing components within Zarf packages.
Package composer contains functions for composing components within Zarf packages.
Package composer contains functions for composing components within Zarf packages.
Package composer contains functions for composing components within Zarf packages.
Index ¶
- func CompatibleComponent(c v1alpha1.ZarfComponent, arch, flavor string) bool
- type ImportChain
- func (ic *ImportChain) Compose(ctx context.Context) (composed *v1alpha1.ZarfComponent, err error)
- func (ic *ImportChain) ContainsOCIImport() bool
- func (ic *ImportChain) Head() *Node
- func (ic *ImportChain) MergeConstants(existing []v1alpha1.Constant) (merged []v1alpha1.Constant)
- func (ic *ImportChain) MergeVariables(existing []v1alpha1.InteractiveVariable) (merged []v1alpha1.InteractiveVariable)
- func (ic *ImportChain) Migrate(build v1alpha1.ZarfBuildData) (warnings []string)
- func (ic *ImportChain) String() string
- func (ic *ImportChain) Tail() *Node
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompatibleComponent ¶
func CompatibleComponent(c v1alpha1.ZarfComponent, arch, flavor string) bool
CompatibleComponent determines if this component is compatible with the given create options
Types ¶
type ImportChain ¶
type ImportChain struct {
// contains filtered or unexported fields
}
ImportChain is a doubly linked list of component import definitions
func NewImportChain ¶
func NewImportChain(ctx context.Context, head v1alpha1.ZarfComponent, index int, originalPackageName, arch, flavor string) (*ImportChain, error)
NewImportChain creates a new import chain from a component Returning the chain on error so we can have additional information to use during lint
func (*ImportChain) Compose ¶
func (ic *ImportChain) Compose(ctx context.Context) (composed *v1alpha1.ZarfComponent, err error)
Compose merges the import chain into a single component fixing paths, overriding metadata, etc
func (*ImportChain) ContainsOCIImport ¶
func (ic *ImportChain) ContainsOCIImport() bool
ContainsOCIImport returns true if the import chain contains a remote import
func (*ImportChain) Head ¶
func (ic *ImportChain) Head() *Node
Head returns the first node in the import chain
func (*ImportChain) MergeConstants ¶
func (ic *ImportChain) MergeConstants(existing []v1alpha1.Constant) (merged []v1alpha1.Constant)
MergeConstants merges constants from the import chain
func (*ImportChain) MergeVariables ¶
func (ic *ImportChain) MergeVariables(existing []v1alpha1.InteractiveVariable) (merged []v1alpha1.InteractiveVariable)
MergeVariables merges variables from the import chain
func (*ImportChain) Migrate ¶
func (ic *ImportChain) Migrate(build v1alpha1.ZarfBuildData) (warnings []string)
Migrate performs migrations on the import chain
func (*ImportChain) String ¶
func (ic *ImportChain) String() string
String returns a string representation of the import chain
func (*ImportChain) Tail ¶
func (ic *ImportChain) Tail() *Node
Tail returns the last node in the import chain
type Node ¶
type Node struct { v1alpha1.ZarfComponent // contains filtered or unexported fields }
Node is a node in the import chain
func (*Node) ImportLocation ¶
ImportLocation gets the path from the base `zarf.yaml` to the imported `zarf.yaml`
func (*Node) ImportName ¶
ImportName returns the name of the component to import If the component import has a ComponentName defined, that will be used otherwise the name of the component will be used
func (*Node) Index ¶
Index returns the .components index location for this node's source `zarf.yaml`
func (*Node) OriginalPackageName ¶
OriginalPackageName returns the .metadata.name for this node's source `zarf.yaml`