packager

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 61 Imported by: 2

Documentation

Overview

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Package packager contains functions for interacting with, managing and deploying Zarf packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	ReferenceRegexp = re(referencePat)
)

Functions

func Pull added in v0.55.0

func Pull(ctx context.Context, source, destination string, opts PullOptions) error

Pull takes a source URL and destination directory and fetches the Zarf package from the given sources.

Types

type Modifier

type Modifier func(*Packager)

Modifier is a function that modifies the packager.

func WithCluster

func WithCluster(cluster *cluster.Cluster) Modifier

WithCluster sets the cluster client for the packager.

func WithContext added in v0.42.1

func WithContext(ctx context.Context) Modifier

WithContext sets the packager's context

func WithSource

func WithSource(source sources.PackageSource) Modifier

WithSource sets the source for the packager.

func WithTemp

func WithTemp(base string) Modifier

WithTemp sets the temp directory for the packager.

This temp directory is used as the destination where p.source loads the package.

type Packager

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

Packager is the main struct for managing packages.

func New

func New(cfg *types.PackagerConfig, mods ...Modifier) (*Packager, error)

New creates a new package instance with the provided config.

Note: This function creates a tmp directory that should be cleaned up with p.ClearTempPaths().

func (*Packager) ClearTempPaths

func (p *Packager) ClearTempPaths()

ClearTempPaths removes the temp directory and any files within it.

func (*Packager) Create

func (p *Packager) Create(ctx context.Context) error

Create generates a Zarf package tarball for a given PackageConfig and optional base directory.

func (*Packager) Deploy

func (p *Packager) Deploy(ctx context.Context) error

Deploy attempts to deploy the given PackageConfig.

func (*Packager) DevDeploy

func (p *Packager) DevDeploy(ctx context.Context) error

DevDeploy creates + deploys a package in one shot

func (*Packager) FindImages

func (p *Packager) FindImages(ctx context.Context) (map[string][]string, error)

FindImages iterates over a Zarf.yaml and attempts to parse any images.

func (*Packager) Generate

func (p *Packager) Generate(ctx context.Context) error

Generate generates a Zarf package definition.

func (*Packager) GetVariableConfig

func (p *Packager) GetVariableConfig() *variables.VariableConfig

GetVariableConfig returns the variable configuration for the packager.

func (*Packager) Inspect

func (p *Packager) Inspect(ctx context.Context) error

Inspect list the contents of a package.

func (*Packager) Mirror

func (p *Packager) Mirror(ctx context.Context) error

Mirror pulls resources from a package (images, git repositories, etc) and pushes them to remotes in the airgap without deploying them

func (*Packager) Publish

func (p *Packager) Publish(ctx context.Context) (err error)

Publish publishes the package to a registry

func (*Packager) Remove

func (p *Packager) Remove(ctx context.Context) error

Remove removes a package that was already deployed onto a cluster, uninstalling all installed helm charts.

type PullOptions added in v0.55.0

type PullOptions struct {
	// SHASum uniquely identifies a package based on its contents.
	SHASum string
	// SkipSignatureValidation flags whether Pull should skip validating the signature.
	SkipSignatureValidation bool
	// Architecture is the package architecture.
	Architecture string
	// Filters describes a Filter strategy to include or exclude certain components from the package.
	Filters filters.ComponentFilterStrategy
	// PublicKeyPath validates the create-time signage of a package.
	PublicKeyPath string
}

PullOptions declares optional configuration for a Pull operation.

Directories

Path Synopsis
Package actions contains functions for running component actions within Zarf packages.
Package actions contains functions for running component actions within Zarf packages.
Package composer contains functions for composing components within Zarf packages.
Package composer contains functions for composing components within Zarf packages.
Package creator contains functions for creating Zarf packages.
Package creator contains functions for creating Zarf packages.
Package deprecated handles package deprecations and migrations
Package deprecated handles package deprecations and migrations
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package sources contains core implementations of the PackageSource interface.
Package sources contains core implementations of the PackageSource interface.

Jump to

Keyboard shortcuts

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