packager2

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

Package packager2 is the new implementation for packager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.47.0

func Create(ctx context.Context, packagePath string, opt CreateOptions) error

func GetPackageFromSourceOrCluster added in v0.48.0

func GetPackageFromSourceOrCluster(ctx context.Context, cluster *cluster.Cluster, src string, skipSignatureValidation bool, publicKeyPath string) (v1alpha1.ZarfPackage, error)

func LoadPackage

func LoadPackage(ctx context.Context, opt LoadOptions) (*layout.PackageLayout, error)

LoadPackage optionally fetches and loads the package from the given source.

func Mirror

func Mirror(ctx context.Context, opt MirrorOptions) error

Mirror mirrors the package contents to the given registry and git server.

func PublishFromOCI added in v0.51.0

func PublishFromOCI(ctx context.Context, src registry.Reference, dst registry.Reference, opts PublishFromOCIOpts) error

PublishFromOCI takes a source and destination registry reference and a PublishFromOCIOpts and copies the package from the source to the destination.

func PublishPackage added in v0.51.0

func PublishPackage(ctx context.Context, path string, dst registry.Reference, opts PublishPackageOpts) error

PublishPackage takes a Path to the location of the built package, a ref to a registry, and a PublishOpts and uploads to the target OCI registry.

func PublishSkeleton added in v0.51.0

func PublishSkeleton(ctx context.Context, path string, ref registry.Reference, opts PublishSkeletonOpts) error

PublishSkeleton takes a Path to the location of the build package, a ref to a registry, and a PublishOpts and uploads the skeleton package to the target OCI registry.

func Pull

func Pull(ctx context.Context, src, dir, shasum, architecture string, filter filters.ComponentFilterStrategy, publicKeyPath string, skipSignatureValidation bool) error

TODO: Add options struct Pull fetches the Zarf package from the given sources.

func Remove added in v0.41.0

func Remove(ctx context.Context, opt RemoveOptions) error

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

Types

type CreateOptions added in v0.47.0

type CreateOptions struct {
	Flavor                  string
	RegistryOverrides       map[string]string
	SigningKeyPath          string
	SigningKeyPassword      string
	SetVariables            map[string]string
	MaxPackageSizeMB        int
	SBOMOut                 string
	SkipSBOM                bool
	Output                  string
	DifferentialPackagePath string
	OCIConcurrency          int
}

type LoadOptions

type LoadOptions struct {
	Source                  string
	Shasum                  string
	Architecture            string
	PublicKeyPath           string
	SkipSignatureValidation bool
	Filter                  filters.ComponentFilterStrategy
}

LoadOptions are the options for LoadPackage.

type MirrorOptions

type MirrorOptions struct {
	Cluster         *cluster.Cluster
	PkgLayout       *layout.PackageLayout
	Filter          filters.ComponentFilterStrategy
	RegistryInfo    types.RegistryInfo
	GitInfo         types.GitServerInfo
	NoImageChecksum bool
	Retries         int
	PlainHTTP       bool
	OCIConcurrency  int
}

MirrorOptions are the options for Mirror.

type PublishFromOCIOpts added in v0.51.0

type PublishFromOCIOpts struct {
	// Concurrency configures the zoci push concurrency if empty defaults to 3.
	Concurrency int
	// SigningKeyPath points to a signing key on the local disk.
	SigningKeyPath string
	// SigningKeyPassword holds a password to use the key at SigningKeyPath.
	SigningKeyPassword string
	// SkipSignatureValidation flags whether Publish should skip validating the signature.
	SkipSignatureValidation bool
	// WithPlainHTTP falls back to plain HTTP for the registry calls instead of TLS.
	WithPlainHTTP bool
	// PublicKeyPath validates the create time signage of a package.
	PublicKeyPath string
	// Architecture is the architecture we are publishing to
	Architecture string
}

PublishFromOCIOpts declares the parameters to publish a package.

type PublishPackageOpts added in v0.51.0

type PublishPackageOpts struct {
	// Concurrency configures the zoci push concurrency if empty defaults to 3.
	Concurrency int
	// SigningKeyPath points to a signing key on the local disk.
	SigningKeyPath string
	// SigningKeyPassword holds a password to use the key at SigningKeyPath.
	SigningKeyPassword string
	// SkipSignatureValidation flags whether Publish should skip validating the signature.
	SkipSignatureValidation bool
	// WithPlainHTTP falls back to plain HTTP for the registry calls instead of TLS.
	WithPlainHTTP bool
	// PublicKeyPath validates the create time signage of a package.
	PublicKeyPath string
	// Architecture is the architecture we are publishing to
	Architecture string
}

PublishPackageOpts declares the parameters to publish a package.

type PublishSkeletonOpts added in v0.51.0

type PublishSkeletonOpts struct {
	// Concurrency configures the zoci push concurrency if empty defaults to 3.
	Concurrency int
	// SigningKeyPath points to a signing key on the local disk.
	SigningKeyPath string
	// SigningKeyPassword holds a password to use the key at SigningKeyPath.
	SigningKeyPassword string
	// WithPlainHTTP falls back to plain HTTP for the registry calls instead of TLS.
	WithPlainHTTP bool
}

PublishSkeletonOpts declares the parameters to publish a skeleton package.

type RemoveOptions added in v0.41.0

type RemoveOptions struct {
	Source                  string
	Cluster                 *cluster.Cluster
	Filter                  filters.ComponentFilterStrategy
	SkipSignatureValidation bool
	PublicKeyPath           string
}

RemoveOptions are the options for Remove.

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 filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package layout contains functions for interacting the Zarf packages.
Package layout contains functions for interacting the Zarf packages.

Jump to

Keyboard shortcuts

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