packager

package
v0.30.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 52 Imported by: 0

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.

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 (
	// Find zarf-packages on the local system (https://regex101.com/r/TUUftK/1)
	ZarfPackagePattern = regexp.MustCompile(`zarf-package[^\s\\\/]*\.tar(\.zst)?$`)

	// Find zarf-init packages on the local system
	ZarfInitPattern = regexp.MustCompile(GetInitPackageName("") + "$")
)

Zarf Packager Variables.

Functions

func GetInitPackageName

func GetInitPackageName(arch string) string

GetInitPackageName returns the formatted name of the init package.

Types

type Modifier added in v0.30.0

type Modifier func(*Packager)

Modifier is a function that modifies the packager.

func WithCluster added in v0.30.0

func WithCluster(cluster *cluster.Cluster) Modifier

WithCluster sets the cluster client for the packager.

func WithSource added in v0.30.0

func WithSource(source sources.PackageSource) Modifier

WithSource sets the source for the packager.

func WithTemp added in v0.30.0

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 NewOrDie

func NewOrDie(config *types.PackagerConfig, mods ...Modifier) *Packager

NewOrDie creates a new package instance with the provided config or throws a fatal error.

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() (err error)

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

func (*Packager) Deploy

func (p *Packager) Deploy() (err error)

Deploy attempts to deploy the given PackageConfig.

func (*Packager) FindImages

func (p *Packager) FindImages() (imgMap map[string][]string, err error)

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

func (*Packager) GetPackageName

func (p *Packager) GetPackageName() string

GetPackageName returns the formatted name of the package.

func (*Packager) Inspect

func (p *Packager) Inspect() (err error)

Inspect list the contents of a package.

func (*Packager) Mirror added in v0.29.2

func (p *Packager) Mirror() (err error)

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

func (*Packager) Publish added in v0.25.0

func (p *Packager) Publish() (err error)

Publish publishes the package to a registry

func (*Packager) Pull added in v0.25.0

func (p *Packager) Pull() (err error)

Pull pulls a Zarf package and saves it as a compressed tarball.

func (*Packager) Remove

func (p *Packager) Remove() (err error)

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

Directories

Path Synopsis
Package deprecated handles package deprecations and migrations
Package deprecated handles package deprecations and migrations
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