creator

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Package creator contains functions for creating Zarf packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeComponents

func ComposeComponents(pkg types.ZarfPackage, flavor string) (types.ZarfPackage, []string, error)

ComposeComponents composes components and their dependencies into a single Zarf package using an import chain.

func FillActiveTemplate

func FillActiveTemplate(pkg types.ZarfPackage, setVariables map[string]string) (types.ZarfPackage, []string, error)

FillActiveTemplate merges user-specified variables into the configuration templates of a zarf.yaml.

func ReloadComponentTemplate

func ReloadComponentTemplate(component *types.ZarfComponent) error

ReloadComponentTemplate appends ###ZARF_COMPONENT_NAME### for the component, assigns value, and reloads Any instance of ###ZARF_COMPONENT_NAME### within a component will be replaced with that components name

func ReloadComponentTemplatesInPackage

func ReloadComponentTemplatesInPackage(zarfPackage *types.ZarfPackage) error

ReloadComponentTemplatesInPackage appends ###ZARF_COMPONENT_NAME### for each component, assigns value, and reloads

Types

type Creator

type Creator interface {
	LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.ZarfPackage, warnings []string, err error)
	Assemble(dst *layout.PackagePaths, components []types.ZarfComponent, arch string) error
	Output(dst *layout.PackagePaths, pkg *types.ZarfPackage) error
}

Creator is an interface for creating Zarf packages.

type PackageCreator

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

PackageCreator provides methods for creating normal (not skeleton) Zarf packages.

func NewPackageCreator

func NewPackageCreator(createOpts types.ZarfCreateOptions, cwd string) *PackageCreator

NewPackageCreator returns a new PackageCreator.

func (*PackageCreator) Assemble

func (pc *PackageCreator) Assemble(dst *layout.PackagePaths, components []types.ZarfComponent, arch string) error

Assemble assembles all of the package assets into Zarf's tmp directory layout.

func (*PackageCreator) LoadPackageDefinition

func (pc *PackageCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.ZarfPackage, warnings []string, err error)

LoadPackageDefinition loads and configures a zarf.yaml file during package create.

func (*PackageCreator) Output

func (pc *PackageCreator) Output(dst *layout.PackagePaths, pkg *types.ZarfPackage) (err error)

Output does the following:

- archives components

- generates checksums for all package files

- writes the loaded zarf.yaml to disk

- signs the package

- writes the Zarf package as a tarball to a local directory, or an OCI registry based on the --output flag

type SkeletonCreator

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

SkeletonCreator provides methods for creating skeleton Zarf packages.

func NewSkeletonCreator

func NewSkeletonCreator(createOpts types.ZarfCreateOptions, publishOpts types.ZarfPublishOptions) *SkeletonCreator

NewSkeletonCreator returns a new SkeletonCreator.

func (*SkeletonCreator) Assemble

func (sc *SkeletonCreator) Assemble(dst *layout.PackagePaths, components []types.ZarfComponent, _ string) error

Assemble updates all components of the loaded Zarf package with necessary modifications for package assembly.

It processes each component to ensure correct structure and resource locations.

func (*SkeletonCreator) LoadPackageDefinition

func (sc *SkeletonCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.ZarfPackage, warnings []string, err error)

LoadPackageDefinition loads and configure a zarf.yaml file when creating and publishing a skeleton package.

func (*SkeletonCreator) Output

func (sc *SkeletonCreator) Output(dst *layout.PackagePaths, pkg *types.ZarfPackage) (err error)

Output does the following:

- archives components

- generates checksums for all package files

- writes the loaded zarf.yaml to disk

- signs the package

Jump to

Keyboard shortcuts

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