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.
Package packager contains functions for interacting with, managing and deploying Zarf packages.
Index ¶
- Variables
- func GetInitPackageName(arch string) string
- func ValidatePackageSignature(directory string, publicKeyPath string) error
- type Packager
- func (p *Packager) ClearTempPaths()
- func (p *Packager) Create(baseDir string) error
- func (p *Packager) Deploy() (err error)
- func (p *Packager) FindImages(baseDir, repoHelmChartPath string, kubeVersionOverride string) (map[string][]string, error)
- func (p *Packager) GetPackageName() string
- func (p *Packager) Inspect(includeSBOM bool, outputSBOM string, inspectPublicKey string) error
- func (p *Packager) Mirror() (err error)
- func (p *Packager) Publish() error
- func (p *Packager) Pull() error
- func (p *Packager) Remove() (err error)
- func (p *Packager) SetOCIRemote(url string) error
- func (p *Packager) SetTempDirectory(path string) error
Constants ¶
This section is empty.
Variables ¶
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.
var ( // ErrPkgKeyButNoSig is returned when a key was provided but the package is not signed ErrPkgKeyButNoSig = errors.New("a key was provided but the package is not signed - remove the --key flag and run the command again") // ErrPkgSigButNoKey is returned when a package is signed but no key was provided ErrPkgSigButNoKey = errors.New("package is signed but no key was provided - add a key with the --key flag or use the --insecure flag and run the command again") )
Functions ¶
func GetInitPackageName ¶
GetInitPackageName returns the formatted name of the init package.
func ValidatePackageSignature ¶ added in v0.29.0
ValidatePackageSignature validates the signature of a package
Types ¶
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) (*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) *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 ¶
Create generates a Zarf package tarball for a given PackageConfig and optional base directory.
func (*Packager) FindImages ¶
func (p *Packager) FindImages(baseDir, repoHelmChartPath string, kubeVersionOverride string) (map[string][]string, error)
FindImages iterates over a Zarf.yaml and attempts to parse any images.
func (*Packager) GetPackageName ¶
GetPackageName returns the formatted name of the package.
func (*Packager) Mirror ¶ added in v0.29.2
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
Publish publishes the package to a registry
This is a wrapper around the oras library and much of the code was adapted from the oras CLI - https://github.com/oras-project/oras/blob/main/cmd/oras/push.go
Authentication is handled via the Docker config file created w/ `zarf tools registry login`
func (*Packager) Pull ¶ added in v0.25.0
Pull pulls a Zarf package and saves it as a compressed tarball.
func (*Packager) Remove ¶
Remove removes a package that was already deployed onto a cluster, uninstalling all installed helm charts.
func (*Packager) SetOCIRemote ¶ added in v0.28.0
SetOCIRemote sets the remote OCI client for the package.
func (*Packager) SetTempDirectory ¶ added in v0.29.0
SetTempDirectory sets the temp directory for the packager.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package deprecated handles package deprecations and migrations
|
Package deprecated handles package deprecations and migrations |