v1beta1

package
v0.81.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package v1beta1 holds the definition of the v1beta1 Zarf Package. This API is work in progress and not yet used within Zarf.

Index

Constants

View Source
const (
	// ZarfPackageConfig is the default kind of Zarf package.
	ZarfPackageConfig PackageKind = "ZarfPackageConfig"
	// ZarfComponentConfig is the kind of a Zarf component config file.
	ZarfComponentConfig PackageKind = "ZarfComponentConfig"
	// APIVersion is the api version of this package.
	APIVersion string = "zarf.dev/v1beta1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildData added in v0.81.0

type BuildData struct {
	// The machine name that created this package.
	Hostname string `json:"hostname,omitempty"`
	// The username who created this package.
	User string `json:"user,omitempty"`
	// The timestamp when this package was created.
	Timestamp string `json:"timestamp,omitempty"`
	// The architecture this package was created on.
	Architecture string `json:"architecture"`
	// The version of Zarf used to build this package.
	Version string `json:"version"`
	// Any migrations that have been run on this package.
	Migrations []string `json:"migrations,omitempty"`
	// Any registry domains that were overridden on package create when pulling images.
	RegistryOverrides map[string]string `json:"registryOverrides,omitempty"`
	// Whether this package was created with differential components.
	Differential bool `json:"differential,omitempty"`
	// Version of a previously built package used as the basis for creating this differential package.
	DifferentialPackageVersion string `json:"differentialPackageVersion,omitempty"`
	// The flavor of Zarf used to build this package.
	Flavor string `json:"flavor,omitempty"`
	// Whether this package was signed.
	Signed *bool `json:"signed,omitempty"`
	// Requirements for specific Zarf versions needed to deploy this package.
	VersionRequirements []VersionRequirement `json:"versionRequirements,omitempty"`
	// ProvenanceFiles lists files present in the package that are not included in checksums.txt. These are files added after checksum generation (e.g., signature files).
	ProvenanceFiles []string `json:"provenanceFiles,omitempty"`
	// Checksum of a checksums.txt file that contains checksums all the layers within the package.
	AggregateChecksum string `json:"aggregateChecksum"`
	// contains filtered or unexported fields
}

BuildData is written during package create to track details of the created package.

func (BuildData) GetOriginalAPIVersion added in v0.81.0

func (b BuildData) GetOriginalAPIVersion() string

GetOriginalAPIVersion returns the apiVersion the package was read from before any conversion.

func (*BuildData) SetOriginalAPIVersion added in v0.81.0

func (b *BuildData) SetOriginalAPIVersion(apiVersion string)

SetOriginalAPIVersion records the apiVersion the package was read from before any conversion.

type Chart added in v0.81.0

type Chart struct {
	// The name of the chart within Zarf; note that this must be unique and does not need to be the same as the name in the chart repository.
	Name string `json:"name"`

	// The Helm repository where the chart is stored.
	HelmRepository *HelmRepositorySource `json:"helmRepository,omitempty"`
	// The Git repository where the chart is stored.
	Git *GitSource `json:"git,omitempty"`
	// The local path where the chart is stored.
	Local *LocalSource `json:"local,omitempty"`
	// The OCI registry where the chart is stored.
	OCI *OCISource `json:"oci,omitempty"`
	// The namespace to deploy the chart to.
	Namespace string `json:"namespace,omitempty"`
	// The name of the Helm release to create (defaults to the Zarf name of the chart).
	ReleaseName string `json:"releaseName,omitempty"`
	// Whether to skip waiting for chart resources to be ready before continuing.
	SkipWait bool `json:"skipWait,omitempty"`
	// List of local values file paths or remote URLs to include in the package; these will be merged together when deployed.
	ValuesFiles []string `json:"valuesFiles,omitempty"`
	// List of value sources mapped to their Helm override targets.
	Values []ChartValue `json:"values,omitempty"`
	// Skip validation of the chart's values against its JSON schema. Defaults to false.
	SkipSchemaValidation bool `json:"skipSchemaValidation,omitempty"`
	// Controls whether Helm uses Server-Side Apply (SSA) or client-side apply (CSA) when deploying this chart. Defaults to "auto" when omitted.
	ServerSideApply ServerSideApplyMode `json:"serverSideApply,omitempty" jsonschema:"enum=true,enum=false,enum=auto"`
	// contains filtered or unexported fields
}

Chart defines a helm chart to be deployed.

func (Chart) GetDeprecatedVariables deprecated added in v0.81.0

func (c Chart) GetDeprecatedVariables() []ZarfChartVariable

GetDeprecatedVariables returns the v1alpha1 chart variables carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

func (Chart) GetDeprecatedVersion deprecated added in v0.81.0

func (c Chart) GetDeprecatedVersion() string

GetDeprecatedVersion returns the deprecated top-level chart version, used as a v1alpha1 backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

type ChartValue added in v0.81.0

type ChartValue struct {
	// The source path for the value.
	SourcePath string `json:"sourcePath"`
	// The target path within the Helm chart values.
	TargetPath string `json:"targetPath"`
}

ChartValue maps a values source path to a Helm chart target path.

type Component added in v0.81.0

type Component struct {
	// The name of the component.
	Name string `json:"name" jsonschema:"pattern=^[a-z0-9][a-z0-9\\-]*$"`
	// Message to include during package deploy describing the purpose of this component.
	Description string `json:"description,omitempty"`
	// Do not install this component unless explicitly requested. Defaults to false, meaning the component is required.
	Optional      bool `json:"optional,omitempty"`
	ComponentSpec `json:",inline"`
	// contains filtered or unexported fields
}

Component is the primary functional grouping of assets to deploy by Zarf.

func (Component) GetDeprecatedDataInjections deprecated added in v0.81.0

func (c Component) GetDeprecatedDataInjections() []ZarfDataInjection

GetDeprecatedDataInjections returns the v1alpha1 data injections carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

func (Component) GetDeprecatedGroup deprecated added in v0.81.0

func (c Component) GetDeprecatedGroup() string

GetDeprecatedGroup returns the v1alpha1 group carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

func (Component) GetImages added in v0.81.0

func (c Component) GetImages() []string

GetImages returns all image names specified in the component, including those from ImageArchives.

func (Component) RequiresCluster added in v0.81.0

func (c Component) RequiresCluster() bool

RequiresCluster returns true if the component requires a cluster connection to deploy.

type ComponentAction added in v0.81.0

type ComponentAction struct {
	// Hide the output of the command during package deployment (default false).
	Silent *bool `json:"silent,omitempty"`
	// Timeout in seconds for the command (default 0, no timeout for cmd actions and 300, 5 minutes for wait actions).
	MaxTotalSeconds *int32 `json:"maxTotalSeconds,omitempty"`
	// Retry the command if it fails up to a given number of times (default 0).
	Retries *int32 `json:"retries,omitempty"`
	// The working directory to run the command in (default is CWD).
	Dir *string `json:"dir,omitempty"`
	// Additional environment variables to set for the command.
	Env []string `json:"env,omitempty"`
	// The command to run. Must specify either cmd or wait for the action to do anything.
	Cmd string `json:"cmd,omitempty"`
	// Indicates a preference for a shell for the provided cmd.
	Shell *Shell `json:"shell,omitempty"`
	// An array of values to set with the output of the command.
	SetValues []SetValue `json:"setValues,omitempty"`
	// Description of the action to be displayed during package execution instead of the command.
	Description string `json:"description,omitempty"`
	// Wait for a condition to be met before continuing.
	Wait *ComponentActionWait `json:"wait,omitempty"`
	// EnableTemplating enables go-template processing on the cmd field.
	EnableTemplating bool `json:"enableTemplating,omitempty"`
	// contains filtered or unexported fields
}

ComponentAction represents a single action to run during a Zarf package operation.

func (ComponentAction) GetDeprecatedSetVariables deprecated added in v0.81.0

func (a ComponentAction) GetDeprecatedSetVariables() []Variable

GetDeprecatedSetVariables returns the v1alpha1 setVariables carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

type ComponentActionDefaults added in v0.81.0

type ComponentActionDefaults struct {
	// Hide the output of commands during execution (default false).
	Silent bool `json:"silent,omitempty"`
	// Default timeout in seconds for commands (default 0, no timeout).
	MaxTotalSeconds int32 `json:"maxTotalSeconds,omitempty"`
	// Retry commands a given number of times if they fail (default 0).
	Retries int32 `json:"retries,omitempty"`
	// Working directory for commands (default CWD).
	Dir string `json:"dir,omitempty"`
	// Additional environment variables for commands.
	Env []string `json:"env,omitempty"`
	// Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems.
	Shell Shell `json:"shell,omitempty"`
}

ComponentActionDefaults sets the default configs for child actions.

type ComponentActionSet added in v0.81.0

type ComponentActionSet struct {
	// Default configuration for all actions in this set.
	Defaults ComponentActionDefaults `json:"defaults,omitempty"`
	// Actions to run at the start of an operation.
	Before []ComponentAction `json:"before,omitempty"`
	// Actions to run at the end of an operation if it succeeds.
	OnSuccess []ComponentAction `json:"onSuccess,omitempty"`
	// Actions to run if any operation in this set fails.
	OnFailure []ComponentAction `json:"onFailure,omitempty"`
}

ComponentActionSet is a set of actions to run during a Zarf package operation.

type ComponentActionWait added in v0.81.0

type ComponentActionWait struct {
	// Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified.
	Cluster *ComponentActionWaitCluster `json:"cluster,omitempty"`
	// Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified.
	Network *ComponentActionWaitNetwork `json:"network,omitempty"`
}

ComponentActionWait specifies a condition to wait for before continuing.

type ComponentActionWaitCluster added in v0.81.0

type ComponentActionWaitCluster struct {
	// The kind of resource to wait for.
	Kind string `json:"kind" jsonschema:"example=Pod,example=Deployment"`
	// The name of the resource or selector to wait for.
	Name string `json:"name" jsonschema:"example=podinfo,example=app=podinfo"`
	// The namespace of the resource to wait for.
	Namespace string `json:"namespace,omitempty"`
	// The condition or jsonpath state to wait for; defaults to kstatus readiness checks.
	Condition string `json:"condition,omitempty" jsonschema:"example=Available,'{.status.availableReplicas}'=23"`
}

ComponentActionWaitCluster specifies a cluster-level condition to wait for.

type ComponentActionWaitNetwork added in v0.81.0

type ComponentActionWaitNetwork struct {
	// The protocol to wait for.
	Protocol string `json:"protocol" jsonschema:"enum=tcp,enum=http,enum=https"`
	// The address to wait for.
	Address string `json:"address" jsonschema:"example=localhost:8080,example=1.1.1.1"`
	// The HTTP status code to wait for if using http or https.
	Code int32 `json:"code,omitempty" jsonschema:"example=200,example=404"`
}

ComponentActionWaitNetwork specifies a network-level condition to wait for.

type ComponentActions added in v0.81.0

type ComponentActions struct {
	// Actions to run during package creation.
	OnCreate ComponentActionSet `json:"onCreate,omitempty"`
	// Actions to run during package deployment.
	OnDeploy ComponentActionSet `json:"onDeploy,omitempty"`
	// Actions to run during package removal.
	OnRemove ComponentActionSet `json:"onRemove,omitempty"`
}

ComponentActions are ActionSets that map to different Zarf package operations.

type ComponentConfig added in v0.81.0

type ComponentConfig struct {
	// The API version of the component config.
	APIVersion string `json:"apiVersion" jsonschema:"enum=zarf.dev/v1beta1"`
	// The kind of component config.
	Kind PackageKind `json:"kind" jsonschema:"enum=ZarfComponentConfig,default=ZarfComponentConfig"`
	// Component metadata.
	Metadata ComponentMetadata `json:"metadata"`
	// The single component this config defines.
	Component ComponentSpec `json:"component"`
	// Values imports Zarf values files for templating and overriding Helm values.
	Values Values `json:"values,omitempty"`
	// Zarf-generated publish data for the component config.
	PublishData ComponentPublishData `json:"publishData,omitempty"`
}

ComponentConfig is the top-level structure of a Zarf component config file.

type ComponentImport added in v0.81.0

type ComponentImport struct {
	// Local file path references to component config files to import.
	Local []ComponentImportLocal `json:"local,omitempty"`
	// OCI URL references to remote component config files to import; pulled at create time.
	Remote []ComponentImportRemote `json:"remote,omitempty"`
}

ComponentImport is a reference to imported Zarf component configs.

type ComponentImportLocal added in v0.81.0

type ComponentImportLocal struct {
	// The local file path to the component config.
	Path string `json:"path"`
}

ComponentImportLocal is a local file path reference to a component config.

type ComponentImportRemote added in v0.81.0

type ComponentImportRemote struct {
	// The OCI URL of the remote component config.
	URL string `json:"url"`
}

ComponentImportRemote is a remote OCI URL reference to a component config.

type ComponentMetadata added in v0.81.0

type ComponentMetadata struct {
	// Name to identify this component config.
	Name string `json:"name" jsonschema:"pattern=^[a-z0-9][a-z0-9\\-]*$"`
	// Additional information about this component config.
	Description string `json:"description,omitempty"`
	// Generic string to track the component config version.
	Version string `json:"version,omitempty"`
	// Annotations contains arbitrary metadata about the component config.
	Annotations map[string]string `json:"annotations,omitempty"`
}

ComponentMetadata holds metadata about a component config.

type ComponentPublishData added in v0.81.0

type ComponentPublishData struct {
	// The version of Zarf used to build this component config.
	ZarfVersion string `json:"zarfVersion"`
	// Any migrations that have been run on this component config.
	Migrations []string `json:"migrations,omitempty"`
	// Requirements for specific package operations.
	VersionRequirements []VersionRequirement `json:"versionRequirements,omitempty"`
}

ComponentPublishData is written during publish to track details of the component config.

type ComponentSelector added in v0.81.0

type ComponentSelector struct {
	// Only include component for the given package architecture.
	Architecture string `json:"architecture,omitempty" jsonschema:"enum=amd64,enum=arm64"`
	// Only include this component when a matching '--flavor' is specified on 'zarf package create'.
	Flavor string `json:"flavor,omitempty"`
}

ComponentSelector filters a component for inclusion at package create time.

type ComponentSpec added in v0.81.0

type ComponentSpec struct {
	// Import a component from another Zarf component config.
	Import ComponentImport `json:"import,omitempty"`
	// Filter when this component is deployed based on OS.
	Target ComponentTarget `json:"target,omitempty"`
	// Filter when this component is included during package creation based on architecture or flavor.
	Selector ComponentSelector `json:"selector,omitempty"`
	// Kubernetes manifests to be included in a generated Helm chart on package deploy.
	Manifests []Manifest `json:"manifests,omitempty"`
	// Helm charts to install during package deploy.
	Charts []Chart `json:"charts,omitempty"`
	// Files or folders to place on disk during package deployment.
	Files []File `json:"files,omitempty"`
	// List of OCI images to include in the package.
	Images []Image `json:"images,omitempty"`
	// List of tar archives of images to include in the package.
	ImageArchives []ImageArchive `json:"imageArchives,omitempty"`
	// List of git repositories to include in the package.
	Repositories []Repository `json:"repositories,omitempty"`
	// Custom commands to run at various stages of a package lifecycle.
	Actions ComponentActions `json:"actions,omitempty"`
	// The Zarf CLI service this component provides, such as the registry, injector, or agent.
	Service Service `json:"service,omitempty" jsonschema:"enum=registry,enum=seed-registry,enum=injector,enum=agent,enum=git-server"`
	// Groups of sensitive .State fields this component may access in Go templates (manifests, files, actions with template: true).
	// Valid values: "registryCredentials", "gitCredentials", "agentCerts".
	StateAccess []StateAccessKey `json:"stateAccess,omitempty"`
}

ComponentSpec is a reduced component definition used in component configs.

type ComponentTarget added in v0.81.0

type ComponentTarget struct {
	// Only deploy component to specified OS.
	OS string `json:"os,omitempty" jsonschema:"enum=linux,enum=darwin,enum=windows"`
}

ComponentTarget filters a component to only apply for a given local OS at deploy time.

type Constant

type Constant struct {
	// The name to be used for the constant.
	Name string
	// The value to set for the constant during deploy.
	Value string
	// A description of the constant to explain its purpose on package create or deploy confirmation prompts.
	Description string
	// Whether to automatically indent the variable's value (if multiline) when templating.
	AutoIndent bool
	// An optional regex pattern that a constant value must match before a package can be created.
	Pattern string
}

Constant are constants that can be used to dynamically template K8s resources or run in actions.

type File added in v0.81.0

type File struct {
	// Local folder or file path or remote URL to pull into the package.
	Source string `json:"source"`
	// Optional checksum of the file in the format <algorithm>:<checksum> (e.g. sha256:abc123). Defaults to sha256 if no algorithm is specified.
	Checksum string `json:"checksum,omitempty"`
	// The absolute or relative path where the file or folder should be copied to during package deploy.
	Destination string `json:"destination"`
	// Determines if the file should be made executable during package deploy.
	Executable bool `json:"executable,omitempty"`
	// List of symlinks to create during package deploy.
	Symlinks []string `json:"symlinks,omitempty"`
	// Local folder or file to be extracted from a 'source' archive.
	ExtractPath string `json:"extractPath,omitempty"`
	// EnableTemplating enables go-template processing on this file during deploy.
	EnableTemplating bool `json:"enableTemplating,omitempty"`
}

File defines a file to deploy.

type GitSource added in v0.81.0

type GitSource struct {
	// The URL of the Git repository where the Helm chart is stored.
	URL string `json:"url"`
	// The subdirectory containing the chart within a Git repo.
	Path string `json:"path,omitempty"`
}

GitSource represents a Helm chart stored in a Git repository.

type HelmRepositorySource added in v0.81.0

type HelmRepositorySource struct {
	// The name of a chart within a Helm repository.
	Name string `json:"name,omitempty"`
	// The URL of the chart repository where the Helm chart is stored.
	URL string `json:"url"`
	// The version of the chart in the Helm repository.
	Version string `json:"version"`
}

HelmRepositorySource represents a Helm chart stored in a Helm repository.

type Image added in v0.81.0

type Image struct {
	// The image reference.
	Name string `json:"name"`
	// The source to pull the image from. Defaults to "registry".
	Source string `json:"source,omitempty" jsonschema:"enum=registry,enum=daemon"`
}

Image defines an OCI image to include in the package.

type ImageArchive added in v0.81.0

type ImageArchive struct {
	// The path to the tar archive.
	Path string `json:"path"`
	// The list of images contained in the archive.
	Images []string `json:"images"`
}

ImageArchive defines a tar archive of images to include in the package.

type InteractiveVariable

type InteractiveVariable struct {
	Variable
	// A description of the variable to be used when prompting the user a value.
	Description string
	// The default value to use for the variable.
	Default string
	// Whether to prompt the user for input for this variable.
	Prompt bool
}

InteractiveVariable is a variable that can be used to prompt a user for more information.

type KustomizeManifest added in v0.81.0

type KustomizeManifest struct {
	// List of local kustomization paths or remote URLs to include in the package.
	Files []string `json:"files,omitempty"`
	// Allow traversing directory above the current directory if needed for kustomization.
	AllowAnyDirectory bool `json:"allowAnyDirectory,omitempty"`
	// Enable kustomize plugins when building manifests.
	EnablePlugins bool `json:"enablePlugins,omitempty"`
}

KustomizeManifest defines kustomization settings for a manifest.

type LocalSource added in v0.81.0

type LocalSource struct {
	// The path to a local chart's folder or .tgz archive.
	Path string `json:"path"`
}

LocalSource represents a Helm chart stored locally.

type Manifest added in v0.81.0

type Manifest struct {
	// A name to give this collection of manifests; this will become the name of the dynamically-created helm chart.
	Name string `json:"name" jsonschema:"maxLength=40"`
	// The namespace to deploy the manifests to.
	Namespace string `json:"namespace,omitempty"`
	// List of local K8s YAML files or remote URLs to deploy (in order).
	Files []string `json:"files,omitempty"`
	// Kustomize settings for this manifest.
	Kustomize *KustomizeManifest `json:"kustomize,omitempty"`
	// Whether to skip waiting for manifest resources to be ready before continuing.
	SkipWait bool `json:"skipWait,omitempty"`
	// Controls whether Server-Side Apply (SSA) or client-side apply (CSA) is used during deploy. Defaults to "auto" when omitted.
	ServerSideApply ServerSideApplyMode `json:"serverSideApply,omitempty" jsonschema:"enum=true,enum=false,enum=auto"`
	// EnableTemplating enables go-template processing on these manifests during deploy.
	EnableTemplating bool `json:"enableTemplating,omitempty"`
}

Manifest defines raw manifests Zarf will deploy as a helm chart.

type OCISource

type OCISource struct {
	// The URL of the OCI registry where the Helm chart is stored.
	URL string `json:"url"`
	// The version of the chart in the OCI registry.
	Version string `json:"version"`
}

OCISource represents a Helm chart stored in an OCI registry.

type Package added in v0.81.0

type Package struct {
	// The API version of the Zarf package.
	APIVersion string `json:"apiVersion" jsonschema:"enum=zarf.dev/v1beta1"`
	// The kind of Zarf package.
	Kind PackageKind `json:"kind" jsonschema:"enum=ZarfPackageConfig"`
	// Package metadata.
	Metadata PackageMetadata `json:"metadata,omitempty"`
	// Zarf-generated package build data.
	Build BuildData `json:"build,omitempty"`
	// List of components to deploy in this package.
	Components []Component `json:"components" jsonschema:"minItems=1"`
	// Values imports Zarf values files for templating and overriding Helm values.
	Values Values `json:"values,omitempty"`
	// Documentation files included in the package.
	Documentation map[string]string `json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

Package is the top-level structure of a Zarf package definition.

func (Package) GetDeprecatedConstants deprecated added in v0.81.0

func (pkg Package) GetDeprecatedConstants() []Constant

GetDeprecatedConstants returns the v1alpha1 constants carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

func (Package) GetDeprecatedVariables deprecated added in v0.81.0

func (pkg Package) GetDeprecatedVariables() []InteractiveVariable

GetDeprecatedVariables returns the v1alpha1 variables carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

func (Package) HasImages added in v0.81.0

func (pkg Package) HasImages() bool

HasImages returns true if one of the components contains an image.

func (Package) IsSBOMAble added in v0.81.0

func (pkg Package) IsSBOMAble() bool

IsSBOMAble checks if a package has contents that an SBOM can be created on (i.e. images, files, or image archives).

type PackageKind added in v0.81.0

type PackageKind string

PackageKind is an enum of the different kinds of Zarf packages.

type PackageMetadata added in v0.81.0

type PackageMetadata struct {
	// Name to identify this Zarf package.
	Name string `json:"name" jsonschema:"pattern=^[a-z0-9][a-z0-9\\-]*$"`
	// Additional information about this Zarf package.
	Description string `json:"description,omitempty"`
	// Generic string set by a package author to track the package version.
	Version string `json:"version,omitempty"`
	// Disable compression of this package.
	Uncompressed bool `json:"uncompressed,omitempty"`
	// The target cluster architecture for this package.
	Architecture string `json:"architecture,omitempty" jsonschema:"example=arm64,example=amd64"`
	// Annotations are key-value pairs that can be used to store metadata about the package.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Prevent namespace overrides for this package.
	PreventNamespaceOverride bool `json:"preventNamespaceOverride,omitempty"`
	// contains filtered or unexported fields
}

PackageMetadata holds information about the package.

func (PackageMetadata) GetDeprecatedYOLO deprecated added in v0.81.0

func (m PackageMetadata) GetDeprecatedYOLO() bool

GetDeprecatedYOLO returns the v1alpha1 YOLO field carried as a backwards-compatibility shim.

Deprecated: only used to convert v1alpha1 packages; will be removed once v1alpha1 support is dropped.

type Repository added in v0.81.0

type Repository struct {
	// The URL of the git repository.
	URL string `json:"url"`
}

Repository defines a git repository to include in the package.

type ServerSideApplyMode added in v0.81.0

type ServerSideApplyMode string

ServerSideApplyMode controls when server-side apply is used during deploy.

const (
	// ServerSideApplyEnabled always uses server-side apply.
	ServerSideApplyEnabled ServerSideApplyMode = "true"
	// ServerSideApplyDisabled always uses client-side apply.
	ServerSideApplyDisabled ServerSideApplyMode = "false"
	// ServerSideApplyAuto uses server-side apply for fresh installs and matches the prior strategy on upgrade.
	ServerSideApplyAuto ServerSideApplyMode = "auto"
)

type Service added in v0.81.0

type Service string

Service identifies which Zarf CLI service a component provides.

const (
	// ServiceRegistry indicates a component that provides the in-cluster registry.
	ServiceRegistry Service = "registry"
	// ServiceSeedRegistry indicates a component that provides the seed registry used during init.
	ServiceSeedRegistry Service = "seed-registry"
	// ServiceInjector indicates a component that provides the Zarf injector.
	ServiceInjector Service = "injector"
	// ServiceAgent indicates a component that provides the Zarf agent.
	ServiceAgent Service = "agent"
	// ServiceGitServer indicates a component that provides the in-cluster git server.
	ServiceGitServer Service = "git-server"
)

type SetValue added in v0.81.0

type SetValue struct {
	// Key represents which value to assign to.
	Key string `json:"key,omitempty"`
	// Type declares the kind of data being stored in the value.
	Type SetValueType `json:"type,omitempty"`
}

SetValue declares a value that can be set during a package deploy.

type SetValueType added in v0.81.0

type SetValueType string

SetValueType declares the expected input back from the cmd, allowing structured data to be parsed.

const (
	// SetValueYAML enables YAML parsing.
	SetValueYAML SetValueType = "yaml"
	// SetValueJSON enables JSON parsing.
	SetValueJSON SetValueType = "json"
	// SetValueString sets the raw value.
	SetValueString SetValueType = "string"
)

type Shell

type Shell struct {
	// Windows shell preference.
	Windows string `json:"windows,omitempty" jsonschema:"example=powershell,example=cmd,example=pwsh"`
	// Linux shell preference.
	Linux string `json:"linux,omitempty" jsonschema:"example=sh,example=bash,example=zsh"`
	// Darwin (macOS) shell preference.
	Darwin string `json:"darwin,omitempty" jsonschema:"example=sh,example=bash,example=zsh"`
}

Shell represents the desired shell to use for a given command.

type StateAccessKey added in v0.81.0

type StateAccessKey string

StateAccessKey identifies a named group of sensitive state fields available in {{ .State }} Go templates.

const (
	// StateAccessRegistryCredentials unlocks .State.Registry.{PushPassword,PullPassword,Secret,Htpasswd}.
	StateAccessRegistryCredentials StateAccessKey = "registryCredentials"
	// StateAccessGitCredentials unlocks .State.Git.{PushPassword,PullPassword}.
	StateAccessGitCredentials StateAccessKey = "gitCredentials"
	// StateAccessAgentCerts unlocks .State.Agent.{CA,Cert,Key} (base64-encoded) and adds the .State.Agent sub-object.
	StateAccessAgentCerts StateAccessKey = "agentCerts"
)

type Values added in v0.81.0

type Values struct {
	// List of values file paths to include.
	Files []string `json:"files,omitempty"`
	// Path to a JSON schema file for validating values.
	Schema string `json:"schema,omitempty"`
}

Values defines values files and schema for templating and overriding Helm values.

type Variable

type Variable struct {
	// The name to be used for the variable.
	Name string
	// Whether to mark this variable as sensitive to not print it in the log.
	Sensitive bool
	// Whether to automatically indent the variable's value (if multiline) when templating.
	AutoIndent bool
	// An optional regex pattern that a variable value must match before a package deployment can continue.
	Pattern string
	// Changes the handling of a variable to load contents differently (i.e. from a file rather than as a raw variable).
	Type VariableType
}

Variable represents a variable that has a value set programmatically.

type VariableType

type VariableType string

VariableType represents a type of a Zarf package variable.

const (
	// RawVariableType is the default type for a Zarf package variable.
	RawVariableType VariableType = "raw"
	// FileVariableType is a type for a Zarf package variable that loads its contents from a file.
	FileVariableType VariableType = "file"
)

type VersionRequirement added in v0.81.0

type VersionRequirement struct {
	// The minimum version of Zarf required.
	Version string `json:"version"`
	// The reason this version is required.
	Reason string `json:"reason"`
}

VersionRequirement specifies a minimum Zarf version needed and the reason for the requirement.

type ZarfChartVariable

type ZarfChartVariable struct {
	// The name of the variable.
	Name string
	// A brief description of what the variable controls.
	Description string
	// The path within the Helm chart values where this variable applies.
	Path string
}

ZarfChartVariable represents a variable that can be set for a Helm chart overrides.

type ZarfContainerTarget

type ZarfContainerTarget struct {
	// The namespace to target for data injection.
	Namespace string
	// The K8s selector to target for data injection.
	Selector string
	// The container name to target for data injection.
	Container string
	// The path within the container to copy the data into.
	Path string
}

ZarfContainerTarget defines the destination info for a ZarfDataInjection target.

type ZarfDataInjection

type ZarfDataInjection struct {
	// Either a path to a local folder/file or a remote URL of a file to inject into the given target pod + container.
	Source string
	// The target pod + container to inject the data into.
	Target ZarfContainerTarget
	// Compress the data before transmitting using gzip.
	Compress bool
}

ZarfDataInjection is a data-injection definition.

Jump to

Keyboard shortcuts

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