v1beta1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1beta1 contains functions for converting between the public v1beta1 Zarf package and the internal generic representation.

Index

Constants

View Source
const (
	PkgValidateErrComponentNameNotUnique  = "component name %q is not unique"
	PkgValidateErrChartNameNotUnique      = "chart name %q is not unique"
	PkgValidateErrChart                   = "invalid chart definition: %w"
	PkgValidateErrManifestNameNotUnique   = "manifest name %q is not unique"
	PkgValidateErrManifest                = "invalid manifest definition: %w"
	PkgValidateErrAction                  = "invalid action: %w"
	PkgValidateErrActionCmdWait           = "action %q cannot be both a command and wait action"
	PkgValidateErrActionClusterNetwork    = "a single wait action must contain only one of cluster or network"
	PkgValidateErrActionSetValueOnDeploy  = "setValues is not supported in onCreate actions"
	PkgValidateErrActionTemplateOnCreate  = "templating is not supported in onCreate actions"
	PkgValidateErrChartName               = "chart %q exceed the maximum length of %d characters"
	PkgValidateErrChartSource             = "chart %q must include exactly one source (helmRepository, git, local, or oci)"
	PkgValidateErrChartNamespaceMissing   = "chart %q must include a namespace"
	PkgValidateErrManifestFileOrKustomize = "manifest %q must have at least one file or kustomization"
	PkgValidateErrManifestNameLength      = "manifest %q exceed the maximum length of %d characters"
	PkgValidateErrManifestNamePath        = "manifest %q must not contain path separators"
	PkgValidateErrAttachmentsKeyPath      = "attachment key %q must not contain path separators"
	PkgValidateErrAttachmentsKeyTraversal = "attachment key %q must not be a traversal path"
	PkgValidateErrNoComponents            = "package does not contain any compatible components"
	PkgValidateErrGitURLWithRef           = "git URL %q must not contain an embedded ref; use the ref field instead"
	PkgValidateErrServiceRequiresInit     = "component %q declares service %q, but only ZarfInitConfig packages may declare services"
	PkgValidateErrServiceNotUnique        = "service %q is declared by multiple components (%q, %q)"
	PkgValidateErrFileChecksumAlgorithm   = "component %q file %q has unsupported checksum algorithm %q (expected sha256 or sha512)"
	PkgValidateErrFileChecksumDigest      = "component %q file %q has an empty checksum digest"
	PkgValidateErrImageConflictingSources = "image %q has conflicting sources %q and %q"
	PkgValidateErrMapKeyLength            = "%s key %q exceeds the maximum length of %d characters"
	PkgValidateErrAnnotationsSize         = "metadata.annotations exceeds the maximum total size of %d bytes"
)

Package errors found during validation.

View Source
const (
	// ZarfMaxChartNameLength limits helm chart name size to account for K8s/helm limits and zarf prefix
	ZarfMaxChartNameLength = 40
)

Variables

This section is empty.

Functions

func PackageFromV1beta1 added in v0.87.0

func PackageFromV1beta1(pkg v1beta1.Package) api.Package

PackageFromV1beta1 converts a v1beta1 Package to the internal generic representation.

func PackageToV1beta1 added in v0.87.0

func PackageToV1beta1(g api.Package) v1beta1.Package

PackageToV1beta1 converts the internal generic representation to a v1beta1 Package.

func VersionRequirementsToGeneric added in v0.88.0

func VersionRequirementsToGeneric(requirements []v1beta1.VersionRequirement) []api.VersionRequirement

VersionRequirementsToGeneric converts v1beta1 minimum-version requirements to the operational model.

Types

type ValidationErrors added in v0.84.0

type ValidationErrors []error

ValidationErrors contains all errors found during package validation.

func ValidateAnnotations added in v0.89.0

func ValidateAnnotations(annotations map[string]string) ValidationErrors

ValidateAnnotations checks metadata annotation key lengths and total size.

func ValidateComponent added in v0.87.0

func ValidateComponent(component v1beta1.Component) ValidationErrors

ValidateComponent runs the component-local validation shared by packages and standalone component configs. The component name is used in diagnostics.

func ValidateImageIDs added in v0.89.0

func ValidateImageIDs(spec v1beta1.ComponentSpec) ValidationErrors

ValidateImageIDs checks that non-empty IDs are unique across all images in a component. Import resolution checks authored definitions before merging; component validation checks the resolved result so regular-image overrides remain allowed.

func ValidatePackage added in v0.84.0

func ValidatePackage(pkg v1beta1.Package) ValidationErrors

ValidatePackage runs all validation checks on the package.

func (ValidationErrors) Error added in v0.84.0

func (errs ValidationErrors) Error() string

Error returns the validation errors separated by newlines.

func (ValidationErrors) Unwrap added in v0.84.0

func (errs ValidationErrors) Unwrap() []error

Unwrap returns the individual validation errors.

Jump to

Keyboard shortcuts

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