Documentation
¶
Overview ¶
Package packager2 is the new implementation for packager.
Index ¶
- func Create(ctx context.Context, packagePath string, opt CreateOptions) error
- func GetPackageFromSourceOrCluster(ctx context.Context, cluster *cluster.Cluster, src string, ...) (v1alpha1.ZarfPackage, error)
- func LoadPackage(ctx context.Context, opt LoadOptions) (*layout.PackageLayout, error)
- func Mirror(ctx context.Context, opt MirrorOptions) error
- func PublishFromOCI(ctx context.Context, src registry.Reference, dst registry.Reference, ...) error
- func PublishPackage(ctx context.Context, path string, dst registry.Reference, ...) error
- func PublishSkeleton(ctx context.Context, path string, ref registry.Reference, ...) error
- func Pull(ctx context.Context, src, dir, shasum, architecture string, ...) error
- func Remove(ctx context.Context, opt RemoveOptions) error
- type ComponentImageScan
- type CreateOptions
- type FindImagesOptions
- type FindImagesResult
- type InspectDefinitionManifestResults
- type InspectDefinitionManifestsOptions
- type InspectPackageManifestResults
- type InspectPackageManifestsOptions
- type LoadOptions
- type MirrorOptions
- type PublishFromOCIOpts
- type PublishPackageOpts
- type PublishSkeletonOpts
- type RemoveOptions
- type Resource
- type ResourceType
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 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.
Types ¶
type ComponentImageScan ¶ added in v0.52.0
type ComponentImageScan struct {
// ComponentName is the name of the component where the images were found
ComponentName string
// Matches contains definitively identified container images, such as those in an image: field
Matches []string
// PotentialMatches contains potential container images found by a regex
PotentialMatches []string
// CosignArtifacts contains found cosign artifacts for images
CosignArtifacts []string
// WhyResources contains the resources where specific images were found (when Why option is used)
WhyResources []Resource
}
ComponentImageScan contains the results of FindImages for a component
type CreateOptions ¶ added in v0.47.0
type FindImagesOptions ¶ added in v0.52.0
type FindImagesOptions struct {
// RepoHelmChartPath specifies the path to helm charts in git repos defined in the zarf.yaml
RepoHelmChartPath string
// RegistryURL specifies the value of the ###ZARF_REGISTRY### variable during templating
RegistryURL string
// KubeVersionOverride specifies the kubernetes version to provide the Helm chart
KubeVersionOverride string
// CreateSetVariables specifies the package create templates
CreateSetVariables map[string]string
// DeploySetVariables specifies the package deploy variables
DeploySetVariables map[string]string
// Flavor specifies the flavor to use
Flavor string
// Why specifies the image to look for so we can print the containing manifest
Why string
// SkipCosign specifies whether to skip cosign artifact lookups
SkipCosign bool
}
FindImagesOptions declares the parameters to find images.
type FindImagesResult ¶ added in v0.52.0
type FindImagesResult struct {
ComponentImageScans []ComponentImageScan
}
FindImagesResult contains the results of FindImages for a package
func FindImages ¶ added in v0.52.0
func FindImages(ctx context.Context, packagePath string, opts FindImagesOptions) (FindImagesResult, error)
FindImages iterates over the manifests and charts within each component to find any container images It returns a FindImageResults which contains a scan result for each component
type InspectDefinitionManifestResults ¶ added in v0.52.0
type InspectDefinitionManifestResults struct {
Resources []Resource
}
func InspectDefinitionManifests ¶ added in v0.52.0
func InspectDefinitionManifests(ctx context.Context, packagePath string, opts InspectDefinitionManifestsOptions) (results InspectDefinitionManifestResults, err error)
InspectDefinitionManifests templates and returns the manifests and Helm chart manifests found in the zarf.yaml at the given path
type InspectDefinitionManifestsOptions ¶ added in v0.52.0
type InspectPackageManifestResults ¶ added in v0.52.0
type InspectPackageManifestResults struct {
Resources []Resource
}
func InspectPackageManifests ¶ added in v0.52.0
func InspectPackageManifests(ctx context.Context, pkgLayout *layout2.PackageLayout, opts InspectPackageManifestsOptions) (results InspectPackageManifestResults, err error)
InspectPackageManifests templates and returns the manifests and charts in the package as they would be on deploy
type InspectPackageManifestsOptions ¶ added in v0.52.0
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
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.
type Resource ¶ added in v0.52.0
type Resource struct {
Content string
Name string
ResourceType ResourceType
}
Resource contains a Kubernetes Manifest or Chart
type ResourceType ¶ added in v0.52.0
type ResourceType string
const ( ManifestResource ResourceType = "manifest" ChartResource ResourceType = "chart" )
Source Files
¶
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 with Zarf packages.
|
Package layout contains functions for interacting with Zarf packages. |