bundle

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

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

Index

Constants

View Source
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

func CheckOCISourcePath(source string) (string, error)

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 ValidateArch

func ValidateArch(arch string) error

ValidateArch validates that the passed in arch matches the cluster arch

func ValidateBundleSignature

func ValidateBundleSignature(bundleYAMLPath, signaturePath, publicKeyPath string) error

ValidateBundleSignature validates the bundle signature

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

Bundle handles bundler operations

func New

func New(cfg *types.BundleConfig) (*Bundle, error)

New creates a new Bundle

func NewOrDie

func NewOrDie(cfg *types.BundleConfig) *Bundle

NewOrDie creates a new Bundle or dies

func (*Bundle) CalculateBuildInfo

func (b *Bundle) CalculateBuildInfo() error

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 added in v0.10.0

func (b *Bundle) ConfirmBundleDeploy() (confirm bool)

ConfirmBundleDeploy uses Zarf's pterm logging to prompt the user to confirm bundle creation

func (*Bundle) Create

func (b *Bundle) Create() error

Create creates a bundle

func (*Bundle) CreateZarfPkgs added in v0.10.4

func (b *Bundle) CreateZarfPkgs()

CreateZarfPkgs creates a zarf package if its missing when in dev mode

func (*Bundle) Deploy

func (b *Bundle) Deploy() error

Deploy deploys a bundle

func (*Bundle) Inspect

func (b *Bundle) Inspect() error

Inspect pulls/unpacks a bundle's metadata and shows it

func (*Bundle) PreDeployValidation added in v0.10.0

func (b *Bundle) PreDeployValidation() (string, string, string, error)

PreDeployValidation validates the bundle before deployment

func (*Bundle) Publish

func (b *Bundle) Publish() error

Publish publishes a bundle to a remote OCI registry

func (*Bundle) Pull

func (b *Bundle) Pull() error

Pull pulls a bundle and saves it locally

func (*Bundle) Remove

func (b *Bundle) Remove() error

Remove removes packages deployed from a bundle

func (*Bundle) SetDevSource added in v0.10.4

func (b *Bundle) SetDevSource(srcDir string)

SetDevSource sets the source for the bundle when in dev mode

func (*Bundle) ValidateBundleResources

func (b *Bundle) ValidateBundleResources(spinner *message.Spinner) error

ValidateBundleResources validates the bundle's metadata and package references

type PkgOverrideMap added in v0.10.2

type PkgOverrideMap map[string]map[string]map[string]interface{}

PkgOverrideMap is a map of Zarf packages -> components -> Helm charts -> values/namespace

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) 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

func NewBundleProvider(source, destination string) (Provider, error)

NewBundleProvider returns a new bundler Provider based on the source type

Directories

Path Synopsis
tui
Package tui contains logic for the TUI operations
Package tui contains logic for the TUI operations
deploy
Package deploy contains the TUI logic for bundle deploys
Package deploy contains the TUI logic for bundle deploys

Jump to

Keyboard shortcuts

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