Documentation
¶
Overview ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages ¶
Package Bundle contains functions for interacting with, managing and deploying UDS packages
Index ¶
- Constants
- func CheckOCISourcePath(source string) (string, error)
- func GetDeployedPackageNames() []string
- func PrintBundleList(bundles []BundleDeployment)
- func ValidateArch(arch string) error
- func ValidateBundleSignature(bundleYAMLPath, signaturePath, publicKeyPath string) error
- type Bundle
- func (b *Bundle) CalculateBuildInfo() error
- func (b *Bundle) ClearPaths()
- func (b *Bundle) ConfirmBundleDeploy() (confirm bool)
- func (b *Bundle) Create(ctx context.Context) error
- func (b *Bundle) CreateZarfPkgs() error
- func (b *Bundle) Deploy(ctx context.Context) error
- func (b *Bundle) Inspect() error
- func (b *Bundle) PreDeployValidation() (string, string, string, error)
- func (b *Bundle) Publish() error
- func (b *Bundle) Pull() error
- func (b *Bundle) Remove() error
- func (b *Bundle) SetDeploySource(srcDir string)
- func (b *Bundle) ValidateBundleResources(spinner *message.Spinner) error
- type BundleDeployment
- type NamespaceOverrideMap
- type PkgView
- type Provider
Constants ¶
const ( // Annotation keys for Bundle metadata (following OCI image spec) AnnotationBundleName = "dev.uds.Bundle.name" AnnotationBundleVersion = "dev.uds.Bundle.version" )
const ( // GHCRPackagesPath is the default package path GHCRPackagesPath = "oci://ghcr.io/defenseunicorns/packages/" // GHCRUDSBundlePath is the default path for uds bundles GHCRUDSBundlePath = GHCRPackagesPath + "uds/bundles/" // GHCRDeliveryBundlePath is the default path for delivery bundles GHCRDeliveryBundlePath = GHCRPackagesPath + "delivery/" )
Variables ¶
This section is empty.
Functions ¶
func CheckOCISourcePath ¶
CheckOCISourcePath checks that provided oci source path is valid, and updates it if it's missing the full path
func GetDeployedPackageNames ¶
func GetDeployedPackageNames() []string
GetDeployedPackageNames returns the names of the packages that have been deployed
func PrintBundleList ¶
func PrintBundleList(bundles []BundleDeployment)
PrintBundleList prints the deployed bundles in a formatted table to stdout
func ValidateArch ¶
ValidateArch validates that the passed in arch matches the cluster arch
func ValidateBundleSignature ¶
ValidateBundleSignature validates the Bundle signature
Types ¶
type Bundle ¶
type Bundle struct {
// Bundle is the Bundle's metadata read into memory
Bundle types.UDSBundle
// contains filtered or unexported fields
}
Bundle handles bundler operations
func (*Bundle) CalculateBuildInfo ¶
CalculateBuildInfo calculates the build info for the Bundle
func (*Bundle) ClearPaths ¶
func (b *Bundle) ClearPaths()
ClearPaths closes any files and clears out the paths used by Bundle
func (*Bundle) ConfirmBundleDeploy ¶
ConfirmBundleDeploy prompts the user to confirm Bundle creation
func (*Bundle) CreateZarfPkgs ¶
CreateZarfPkgs creates a zarf package if its missing when in dev mode
func (*Bundle) PreDeployValidation ¶
PreDeployValidation validates the Bundle before deployment
func (*Bundle) SetDeploySource ¶
SetDeploySource sets the source for the Bundle when in dev mode
type BundleDeployment ¶
BundleDeployment represents a deployed Bundle with its packages
func ListDeployedBundles ¶
func ListDeployedBundles(ctx context.Context) ([]BundleDeployment, error)
ListDeployedBundles retrieves all deployed Zarf packages and maps them to bundles This is an entrypoint to extension if required (beyond zarf package annotation mapping)
type NamespaceOverrideMap ¶
type Provider ¶
type Provider interface {
// LoadBundleMetadata loads a Bundle's metadata and signature into the temporary directory and returns a map of the Bundle's metadata files
//
// these two files are placed in the `dst` directory
//
// : if tarball
// : : extracts the metadata from the tarball
//
// : if OCI ref
// : : pulls the metadata from the OCI ref
LoadBundleMetadata() (types.PathMap, error)
// LoadBundle loads a Bundle into the temporary directory and returns a map of the Bundle's files
//
// (currently only the remote provider utilizes the concurrency parameter)
LoadBundle(options types.BundlePullOptions, concurrency int) (*types.UDSBundle, types.PathMap, error)
// CreateBundleSBOM creates a Bundle-level SBOM from the underlying Zarf packages, if the Zarf package contains an SBOM
CreateBundleSBOM(extractSBOM bool, bundleName string) ([]string, error)
// PublishBundle publishes a Bundle to a remote OCI repo
PublishBundle(bundle types.UDSBundle, remote *oci.OrasRemote) error
// contains filtered or unexported methods
}
Provider is an interface for processing bundles
operations that are common no matter the source should be implemented on bundler
func NewBundleProvider ¶
NewBundleProvider returns a new bundler Provider based on the source type