Documentation
¶
Overview ¶
Package v1alpha1 contains functions for converting between the public v1alpha1 Zarf package and the internal generic representation.
Package v1alpha1 contains functions for validating and converting v1alpha1 structs
Index ¶
Constants ¶
View Source
const ( ScriptsToActionsMigrated = "scripts-to-actions" PluralizeSetVariable = "pluralize-set-variable" )
List of migrations tracked in the zarf.yaml build data.
View Source
const ( PkgValidateErrInitNoYOLO = "sorry, you can't YOLO an init package" PkgValidateErrConstant = "invalid package constant: %w" PkgValidateErrYOLONoOCI = "OCI images not allowed in YOLO" PkgValidateErrYOLONoGit = "git repos not allowed in YOLO" PkgValidateErrYOLONoArch = "cluster architecture not allowed in YOLO" PkgValidateErrYOLONoDistro = "cluster distros not allowed in YOLO" PkgValidateErrComponentNameNotUnique = "component name %q is not unique" PkgValidateErrComponentReqDefault = "component %q cannot be both required and default" PkgValidateErrComponentReqGrouped = "component %q cannot be both required and grouped" PkgValidateErrChartNameNotUnique = "chart name %q is not unique" PkgValidateErrChart = "invalid chart definition: %w" PkgValidateErrManifestNameNotUnique = "manifest name %q is not unique" PkgValidateErrManifest = "invalid manifest definition: %w" PkgValidateErrGroupMultipleDefaults = "group %q has multiple defaults (%q, %q)" PkgValidateErrGroupOneComponent = "group %q only has one component (%q)" 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" PkgValidateErrChartName = "chart %q exceed the maximum length of %d characters" PkgValidateErrChartNamespaceMissing = "chart %q must include a namespace" PkgValidateErrChartURLOrPath = "chart %q must have either a url or localPath" PkgValidateErrChartVersion = "chart %q must include a chart version" PkgValidateErrChartValueExcludePath = "chart %q excludePath %q must be a descendant of sourcePath %q" PkgValidateErrManifestFileOrKustomize = "manifest %q must have at least one file or kustomization" PkgValidateErrManifestNameLength = "manifest %q exceed the maximum length of %d characters" PkgValidateErrVariable = "invalid package variable: %w" PkgValidateErrNoComponents = "package does not contain any compatible components" PkgValidateErrActionTemplateOnCreate = "templating is not supported in onCreate actions" )
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 ApplyMigrations ¶ added in v0.84.0
func ApplyMigrations(ctx context.Context, pkg v1alpha1.ZarfPackage) v1alpha1.ZarfPackage
ApplyMigrations applies all v1alpha1 schema migrations to pkg, logging any warnings to ctx.
func PackageFromV1alpha1 ¶ added in v0.87.0
func PackageFromV1alpha1(pkg v1alpha1.ZarfPackage) api.Package
PackageFromV1alpha1 converts a v1alpha1 ZarfPackage to the internal generic representation.
func PackageToV1alpha1 ¶ added in v0.87.0
func PackageToV1alpha1(g api.Package) v1alpha1.ZarfPackage
PackageToV1alpha1 converts the internal generic representation to a v1alpha1 ZarfPackage.
func ValidatePackage ¶
func ValidatePackage(pkg v1alpha1.ZarfPackage) error
ValidatePackage runs all validation checks on the package.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.