Documentation ¶
Overview ¶
Package types contains all the types used by Zarf.
Package types contains all the types used by Zarf.
Package types contains all the types used by Zarf.
Package types contains all the types used by Zarf.
Package types contains all the types used by Zarf.
Package types contains all the types used by Zarf.
Index ¶
- Constants
- Variables
- func SupportedOS() []string
- type ArtifactServerInfo
- type ComponentStatus
- type ConnectString
- type ConnectStrings
- type DeployedComponent
- type DeployedPackage
- type DeprecatedZarfComponentScripts
- type DifferentialData
- type GeneratedPKI
- type GitServerInfo
- type InstalledChart
- type PackageFinding
- type PackagerConfig
- type RegistryInfo
- type Severity
- type Webhook
- type WebhookStatus
- type ZarfBuildData
- type ZarfChart
- type ZarfChartVariable
- type ZarfCommonOptions
- type ZarfComponent
- type ZarfComponentAction
- type ZarfComponentActionDefaults
- type ZarfComponentActionSet
- type ZarfComponentActionWait
- type ZarfComponentActionWaitCluster
- type ZarfComponentActionWaitNetwork
- type ZarfComponentActions
- type ZarfComponentImport
- type ZarfComponentOnlyCluster
- type ZarfComponentOnlyTarget
- type ZarfContainerTarget
- type ZarfCreateOptions
- type ZarfDataInjection
- type ZarfDeployOptions
- type ZarfFile
- type ZarfFindImagesOptions
- type ZarfGenerateOptions
- type ZarfInitOptions
- type ZarfInspectOptions
- type ZarfManifest
- type ZarfMetadata
- type ZarfMirrorOptions
- type ZarfPackage
- type ZarfPackageKind
- type ZarfPackageOptions
- type ZarfPublishOptions
- type ZarfPullOptions
- type ZarfSplitPackageData
- type ZarfState
Constants ¶
const ( WebhookStatusSucceeded WebhookStatus = "Succeeded" WebhookStatusFailed WebhookStatus = "Failed" WebhookStatusRunning WebhookStatus = "Running" WebhookStatusRemoving WebhookStatus = "Removing" ComponentStatusSucceeded ComponentStatus = "Succeeded" ComponentStatusFailed ComponentStatus = "Failed" ComponentStatusDeploying ComponentStatus = "Deploying" ComponentStatusRemoving ComponentStatus = "Removing" )
All the different status options for a Zarf Component or a webhook that is running for a Zarf Component deployment.
const ( ZarfGeneratedPasswordLen = 24 ZarfGeneratedSecretLen = 48 ZarfInClusterContainerRegistryNodePort = 31999 ZarfRegistryPushUser = "zarf-push" ZarfRegistryPullUser = "zarf-pull" ZarfGitPushUser = "zarf-git-user" ZarfGitReadUser = "zarf-git-read-user" ZarfInClusterGitServiceURL = "http://zarf-gitea-http.zarf.svc.cluster.local:3000" ZarfInClusterArtifactServiceURL = ZarfInClusterGitServiceURL + "/api/packages/" + ZarfGitPushUser )
Values during setup of the initial zarf state
const ( ZarfPackageTemplatePrefix = "###ZARF_PKG_TMPL_" ZarfPackageVariablePrefix = "###ZARF_PKG_VAR_" ZarfPackageArch = "###ZARF_PKG_ARCH###" ZarfComponentName = "###ZARF_COMPONENT_NAME###" )
Zarf looks for these strings in zarf.yaml to make dynamic changes
const DefaultWebhookWaitDuration = time.Minute * 5
DefaultWebhookWaitDuration is the default amount of time Zarf will wait for a webhook to complete.
const (
// ZarfMaxChartNameLength limits helm chart name size to account for K8s/helm limits and zarf prefix
ZarfMaxChartNameLength = 40
)
Variables ¶
var ( // IsLowercaseNumberHyphenNoStartHyphen is a regex for lowercase, numbers and hyphens that cannot start with a hyphen. // https://regex101.com/r/FLdG9G/2 IsLowercaseNumberHyphenNoStartHyphen = regexp.MustCompile(`^[a-z0-9][a-z0-9\-]*$`).MatchString )
Functions ¶
func SupportedOS ¶ added in v0.34.0
func SupportedOS() []string
SupportedOS returns the supported operating systems.
The supported operating systems are: linux, darwin, windows.
An empty string signifies no OS restrictions.
Types ¶
type ArtifactServerInfo ¶ added in v0.26.0
type ArtifactServerInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the artifact registry"` PushToken string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the artifact registry"` Address string `json:"address" jsonschema:"description=URL address of the artifact registry"` InternalServer bool `json:"internalServer" jsonschema:"description=Indicates if we are using a artifact registry that Zarf is directly managing"` }
ArtifactServerInfo contains information Zarf uses to communicate with a artifact registry to push/pull repositories to.
func (*ArtifactServerInfo) FillInEmptyValues ¶ added in v0.32.5
func (as *ArtifactServerInfo) FillInEmptyValues()
FillInEmptyValues sets every necessary value that's currently empty to a reasonable default
type ComponentStatus ¶ added in v0.30.0
type ComponentStatus string
ComponentStatus defines the deployment status of a Zarf component within a package.
type ConnectString ¶ added in v0.20.0
type ConnectString struct { Description string `` /* 131-byte string literal not displayed */ URL string `json:"url" jsonschema:"description=URL path that gets appended to the k8s port-forward result"` }
ConnectString contains information about a connection made with Zarf connect.
type ConnectStrings ¶ added in v0.20.0
type ConnectStrings map[string]ConnectString
ConnectStrings is a map of connect names to connection information.
type DeployedComponent ¶ added in v0.22.0
type DeployedComponent struct { Name string `json:"name"` InstalledCharts []InstalledChart `json:"installedCharts"` Status ComponentStatus `json:"status"` ObservedGeneration int `json:"observedGeneration"` }
DeployedComponent contains information about a Zarf Package Component that has been deployed to a cluster.
type DeployedPackage ¶ added in v0.22.0
type DeployedPackage struct { Name string `json:"name"` Data ZarfPackage `json:"data"` CLIVersion string `json:"cliVersion"` Generation int `json:"generation"` DeployedComponents []DeployedComponent `json:"deployedComponents"` ComponentWebhooks map[string]map[string]Webhook `json:"componentWebhooks,omitempty"` ConnectStrings ConnectStrings `json:"connectStrings,omitempty"` }
DeployedPackage contains information about a Zarf Package that has been deployed to a cluster This object is saved as the data of a k8s secret within the 'Zarf' namespace (not as part of the ZarfState secret).
type DeprecatedZarfComponentScripts ¶ added in v0.24.0
type DeprecatedZarfComponentScripts struct { ShowOutput bool `json:"showOutput,omitempty" jsonschema:"description=Show the output of the script during package deployment"` TimeoutSeconds int `json:"timeoutSeconds,omitempty" jsonschema:"description=Timeout in seconds for the script"` Retry bool `json:"retry,omitempty" jsonschema:"description=Retry the script if it fails"` Prepare []string `json:"prepare,omitempty" jsonschema:"description=Scripts to run before the component is added during package create"` Before []string `json:"before,omitempty" jsonschema:"description=Scripts to run before the component is deployed"` After []string `json:"after,omitempty" jsonschema:"description=Scripts to run after the component successfully deploys"` }
DeprecatedZarfComponentScripts are scripts that run before or after a component is deployed
type DifferentialData ¶ added in v0.26.2
type DifferentialData struct { DifferentialImages map[string]bool DifferentialRepos map[string]bool DifferentialPackageVersion string }
DifferentialData contains image and repository information about the package a Differential Package is Based on.
type GeneratedPKI ¶ added in v0.19.0
type GeneratedPKI struct { CA []byte `json:"ca"` Cert []byte `json:"cert"` Key []byte `json:"key"` }
GeneratedPKI is a struct for storing generated PKI data.
type GitServerInfo ¶ added in v0.22.0
type GitServerInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the git repository"` PushPassword string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the git repository"` PullUsername string `` /* 178-byte string literal not displayed */ PullPassword string `` /* 178-byte string literal not displayed */ Address string `json:"address" jsonschema:"description=URL address of the git server"` InternalServer bool `json:"internalServer" jsonschema:"description=Indicates if we are using a git server that Zarf is directly managing"` }
GitServerInfo contains information Zarf uses to communicate with a git repository to push/pull repositories to.
func (*GitServerInfo) FillInEmptyValues ¶ added in v0.32.5
func (gs *GitServerInfo) FillInEmptyValues() error
FillInEmptyValues sets every necessary value that's currently empty to a reasonable default
type InstalledChart ¶ added in v0.22.0
type InstalledChart struct { Namespace string `json:"namespace"` ChartName string `json:"chartName"` }
InstalledChart contains information about a Helm Chart that has been deployed to a cluster.
type PackageFinding ¶ added in v0.36.0
type PackageFinding struct { // YqPath is the path to the key where the error originated from, this is sometimes empty in the case of a general error YqPath string Description string // Item is the value of a key that is causing an error, for example a bad image name Item string // PackageNameOverride shows the name of the package that the error originated from // If it is not set the base package will be used when displaying the error PackageNameOverride string // PackagePathOverride shows the path to the package that the error originated from // If it is not set the base package will be used when displaying the error PackagePathOverride string Severity Severity }
PackageFinding is a struct that contains a finding about something wrong with a package
type PackagerConfig ¶ added in v0.23.0
type PackagerConfig struct { // CreateOpts tracks the user-defined options used to create the package CreateOpts ZarfCreateOptions // PkgOpts tracks user-defined options PkgOpts ZarfPackageOptions // DeployOpts tracks user-defined values for the active deployment DeployOpts ZarfDeployOptions // MirrorOpts tracks user-defined values for the active mirror MirrorOpts ZarfMirrorOptions // InitOpts tracks user-defined values for the active Zarf initialization. InitOpts ZarfInitOptions // InspectOpts tracks user-defined options used to inspect the package InspectOpts ZarfInspectOptions // PublishOpts tracks user-defined options used to publish the package PublishOpts ZarfPublishOptions // PullOpts tracks user-defined options used to pull packages PullOpts ZarfPullOptions // FindImagesOpts tracks user-defined options used to find images FindImagesOpts ZarfFindImagesOptions // GenerateOpts tracks user-defined values for package generation. GenerateOpts ZarfGenerateOptions // The package data Pkg ZarfPackage }
PackagerConfig is the main struct that the packager uses to hold high-level options.
type RegistryInfo ¶ added in v0.22.0
type RegistryInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the registry"` PushPassword string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the registry"` PullUsername string `` /* 170-byte string literal not displayed */ PullPassword string `` /* 170-byte string literal not displayed */ Address string `json:"address" jsonschema:"description=URL address of the registry"` NodePort int `` /* 135-byte string literal not displayed */ InternalRegistry bool `json:"internalRegistry" jsonschema:"description=Indicates if we are using a registry that Zarf is directly managing"` Secret string `json:"secret" jsonschema:"description=Secret value that the registry was seeded with"` }
RegistryInfo contains information Zarf uses to communicate with a container registry to push/pull images.
func (*RegistryInfo) FillInEmptyValues ¶ added in v0.32.5
func (ri *RegistryInfo) FillInEmptyValues() error
FillInEmptyValues sets every necessary value not already set to a reasonable default
type Severity ¶ added in v0.36.0
type Severity int
Severity is the type of package error Either Err or Warning
type Webhook ¶ added in v0.30.0
type Webhook struct { Name string `json:"name"` WaitDurationSeconds int `json:"waitDurationSeconds,omitempty"` Status WebhookStatus `json:"status"` ObservedGeneration int `json:"observedGeneration"` }
Webhook contains information about a Component Webhook operating on a Zarf package secret.
type WebhookStatus ¶ added in v0.30.0
type WebhookStatus string
WebhookStatus defines the status of a Component Webhook operating on a Zarf package secret.
type ZarfBuildData ¶
type ZarfBuildData struct { Terminal string `json:"terminal" jsonschema:"description=The machine name that created this package"` User string `json:"user" jsonschema:"description=The username who created this package"` Architecture string `json:"architecture" jsonschema:"description=The architecture this package was created on"` Timestamp string `json:"timestamp" jsonschema:"description=The timestamp when this package was created"` Version string `json:"version" jsonschema:"description=The version of Zarf used to build this package"` Migrations []string `json:"migrations,omitempty" jsonschema:"description=Any migrations that have been run on this package"` RegistryOverrides map[string]string `` /* 139-byte string literal not displayed */ Differential bool `json:"differential,omitempty" jsonschema:"description=Whether this package was created with differential components"` DifferentialPackageVersion string `` /* 163-byte string literal not displayed */ DifferentialMissing []string `` /* 149-byte string literal not displayed */ LastNonBreakingVersion string `` /* 146-byte string literal not displayed */ Flavor string `json:"flavor,omitempty" jsonschema:"description=The flavor of Zarf used to build this package"` }
ZarfBuildData is written during the packager.Create() operation to track details of the created package.
type ZarfChart ¶
type ZarfChart struct { Name string `` /* 164-byte string literal not displayed */ Version string `` /* 198-byte string literal not displayed */ URL string `` /* 390-byte string literal not displayed */ RepoName string `` /* 136-byte string literal not displayed */ GitPath string `` /* 140-byte string literal not displayed */ LocalPath string `json:"localPath,omitempty" jsonschema:"description=The path to a local chart's folder or .tgz archive"` Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace to deploy the chart to"` ReleaseName string `` /* 133-byte string literal not displayed */ NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for chart resources to be ready before continuing"` ValuesFiles []string `` /* 171-byte string literal not displayed */ Variables []ZarfChartVariable `json:"variables,omitempty" jsonschema:"description=[alpha] List of variables to set in the Helm chart"` }
ZarfChart defines a helm chart to be deployed.
type ZarfChartVariable ¶ added in v0.33.0
type ZarfChartVariable struct { Name string `json:"name" jsonschema:"description=The name of the variable,pattern=^[A-Z0-9_]+$"` Description string `json:"description" jsonschema:"description=A brief description of what the variable controls"` Path string `json:"path" jsonschema:"description=The path within the Helm chart values where this variable applies"` }
ZarfChartVariable represents a variable that can be set for a Helm chart overrides.
type ZarfCommonOptions ¶ added in v0.20.0
type ZarfCommonOptions struct { Confirm bool `json:"confirm" jsonschema:"description=Verify that Zarf should perform an action"` Insecure bool `json:"insecure" jsonschema:"description=Allow insecure connections for remote packages"` CachePath string `json:"cachePath" jsonschema:"description=Path to use to cache images and git repos on package create"` TempDirectory string `` /* 157-byte string literal not displayed */ OCIConcurrency int `jsonschema:"description=Number of concurrent layer operations to perform when interacting with a remote package"` }
ZarfCommonOptions tracks the user-defined preferences used across commands.
type ZarfComponent ¶
type ZarfComponent struct { // Name is the unique identifier for this component Name string `json:"name" jsonschema:"description=The name of the component,pattern=^[a-z0-9][a-z0-9\\-]*$"` // Description is a message given to a user when deciding to enable this component or not Description string `` /* 135-byte string literal not displayed */ // Default changes the default option when deploying this component Default bool `` /* 130-byte string literal not displayed */ // Required makes this component mandatory for package deployment Required *bool `` /* 130-byte string literal not displayed */ // Only include compatible components during package deployment Only ZarfComponentOnlyTarget `json:"only,omitempty" jsonschema:"description=Filter when this component is included in package creation or deployment"` // DeprecatedGroup is a key to match other components to produce a user selector field, used to create a BOOLEAN XOR for a set of components // // Note: ignores default and required flags DeprecatedGroup string `` /* 223-byte string literal not displayed */ // DeprecatedCosignKeyPath to cosign public key for signed online resources DeprecatedCosignKeyPath string `` /* 189-byte string literal not displayed */ // Import refers to another zarf.yaml package component. Import ZarfComponentImport `json:"import,omitempty" jsonschema:"description=Import a component from another Zarf package"` // Manifests are raw manifests that get converted into zarf-generated helm charts during deploy Manifests []ZarfManifest `` /* 131-byte string literal not displayed */ // Charts are helm charts to install during package deploy Charts []ZarfChart `json:"charts,omitempty" jsonschema:"description=Helm charts to install during package deploy"` // Data packages to push into a running cluster DataInjections []ZarfDataInjection `json:"dataInjections,omitempty" jsonschema:"description=Datasets to inject into a container in the target cluster"` // Files are files to place on disk during deploy Files []ZarfFile `json:"files,omitempty" jsonschema:"description=Files or folders to place on disk during package deployment"` // Images are the online images needed to be included in the zarf package Images []string `json:"images,omitempty" jsonschema:"description=List of OCI images to include in the package"` // Repos are any git repos that need to be pushed into the git server Repos []string `json:"repos,omitempty" jsonschema:"description=List of git repos to include in the package"` // Extensions provide additional functionality to a component Extensions extensions.ZarfComponentExtensions `json:"extensions,omitempty" jsonschema:"description=Extend component functionality with additional features"` // DeprecatedScripts are custom commands that run before or after package deployment DeprecatedScripts DeprecatedZarfComponentScripts `` /* 197-byte string literal not displayed */ // Replaces scripts, fine-grained control over commands to run at various stages of a package lifecycle Actions ZarfComponentActions `json:"actions,omitempty" jsonschema:"description=Custom commands to run at various stages of a package lifecycle"` }
ZarfComponent is the primary functional grouping of assets to deploy by Zarf.
func (ZarfComponent) IsRequired ¶ added in v0.34.0
func (c ZarfComponent) IsRequired() bool
IsRequired returns if the component is required or not.
func (ZarfComponent) RequiresCluster ¶ added in v0.32.6
func (c ZarfComponent) RequiresCluster() bool
RequiresCluster returns if the component requires a cluster connection to deploy
func (ZarfComponent) Validate ¶ added in v0.35.0
func (c ZarfComponent) Validate() error
Validate validates the component trying to be imported.
type ZarfComponentAction ¶ added in v0.24.0
type ZarfComponentAction struct { Mute *bool `json:"mute,omitempty" jsonschema:"description=Hide the output of the command during package deployment (default false)"` MaxTotalSeconds *int `` /* 171-byte string literal not displayed */ MaxRetries *int `json:"maxRetries,omitempty" jsonschema:"description=Retry the command if it fails up to given number of times (default 0)"` Dir *string `json:"dir,omitempty" jsonschema:"description=The working directory to run the command in (default is CWD)"` Env []string `json:"env,omitempty" jsonschema:"description=Additional environment variables to set for the command"` Cmd string `` /* 128-byte string literal not displayed */ Shell *exec.Shell `` /* 163-byte string literal not displayed */ DeprecatedSetVariable string `` /* 323-byte string literal not displayed */ SetVariables []variables.Variable `` /* 228-byte string literal not displayed */ Description string `` /* 143-byte string literal not displayed */ Wait *ZarfComponentActionWait `` /* 197-byte string literal not displayed */ }
ZarfComponentAction represents a single action to run during a zarf package operation
func (ZarfComponentAction) Validate ¶ added in v0.34.0
func (action ZarfComponentAction) Validate() error
Validate runs all validation checks on an action.
type ZarfComponentActionDefaults ¶ added in v0.24.0
type ZarfComponentActionDefaults struct { Mute bool `json:"mute,omitempty" jsonschema:"description=Hide the output of commands during execution (default false)"` MaxTotalSeconds int `json:"maxTotalSeconds,omitempty" jsonschema:"description=Default timeout in seconds for commands (default to 0, no timeout)"` MaxRetries int `json:"maxRetries,omitempty" jsonschema:"description=Retry commands given number of times if they fail (default 0)"` Dir string `json:"dir,omitempty" jsonschema:"description=Working directory for commands (default CWD)"` Env []string `json:"env,omitempty" jsonschema:"description=Additional environment variables for commands"` Shell exec.Shell `` /* 163-byte string literal not displayed */ }
ZarfComponentActionDefaults sets the default configs for child actions
type ZarfComponentActionSet ¶ added in v0.24.0
type ZarfComponentActionSet struct { Defaults ZarfComponentActionDefaults `json:"defaults,omitempty" jsonschema:"description=Default configuration for all actions in this set"` Before []ZarfComponentAction `json:"before,omitempty" jsonschema:"description=Actions to run at the start of an operation"` After []ZarfComponentAction `json:"after,omitempty" jsonschema:"description=Actions to run at the end of an operation"` OnSuccess []ZarfComponentAction `json:"onSuccess,omitempty" jsonschema:"description=Actions to run if all operations succeed"` OnFailure []ZarfComponentAction `json:"onFailure,omitempty" jsonschema:"description=Actions to run if all operations fail"` }
ZarfComponentActionSet is a set of actions to run during a zarf package operation
func (ZarfComponentActionSet) HasSetVariables ¶ added in v0.34.0
func (as ZarfComponentActionSet) HasSetVariables() bool
HasSetVariables returns true if any of the actions contain setVariables.
func (ZarfComponentActionSet) Validate ¶ added in v0.34.0
func (as ZarfComponentActionSet) Validate() error
Validate runs all validation checks on component action sets.
type ZarfComponentActionWait ¶ added in v0.24.3
type ZarfComponentActionWait struct { Cluster *ZarfComponentActionWaitCluster `` /* 163-byte string literal not displayed */ Network *ZarfComponentActionWaitNetwork `` /* 163-byte string literal not displayed */ }
ZarfComponentActionWait specifies a condition to wait for before continuing
type ZarfComponentActionWaitCluster ¶ added in v0.24.3
type ZarfComponentActionWaitCluster struct { Kind string `json:"kind" jsonschema:"description=The kind of resource to wait for,example=Pod,example=Deployment)"` Identifier string `json:"name" jsonschema:"description=The name of the resource or selector to wait for,example=podinfo,example=app=podinfo"` Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace of the resource to wait for"` Condition string `` /* 241-byte string literal not displayed */ }
ZarfComponentActionWaitCluster specifies a condition to wait for before continuing
type ZarfComponentActionWaitNetwork ¶ added in v0.24.3
type ZarfComponentActionWaitNetwork struct { Protocol string `json:"protocol" jsonschema:"description=The protocol to wait for,enum=tcp,enum=http,enum=https"` Address string `json:"address" jsonschema:"description=The address to wait for,example=localhost:8080,example=1.1.1.1"` Code int `` /* 126-byte string literal not displayed */ }
ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing
type ZarfComponentActions ¶ added in v0.24.0
type ZarfComponentActions struct { OnCreate ZarfComponentActionSet `json:"onCreate,omitempty" jsonschema:"description=Actions to run during package creation"` OnDeploy ZarfComponentActionSet `json:"onDeploy,omitempty" jsonschema:"description=Actions to run during package deployment"` OnRemove ZarfComponentActionSet `json:"onRemove,omitempty" jsonschema:"description=Actions to run during package removal"` }
ZarfComponentActions are ActionSets that map to different zarf package operations
type ZarfComponentImport ¶
type ZarfComponentImport struct { ComponentName string `json:"name,omitempty" jsonschema:"description=The name of the component to import from the referenced zarf.yaml"` // For further explanation see https://regex101.com/r/nxX8vx/1 Path string `json:"path,omitempty" jsonschema:"description=The relative path to a directory containing a zarf.yaml to import from"` // For further explanation see https://regex101.com/r/nxX8vx/1 URL string `json:"url,omitempty" jsonschema:"description=[beta] The URL to a Zarf package to import via OCI,pattern=^oci://.*$"` }
ZarfComponentImport structure for including imported Zarf components.
func (ZarfComponentImport) JSONSchemaExtend ¶ added in v0.36.0
func (ZarfComponentImport) JSONSchemaExtend(schema *jsonschema.Schema)
JSONSchemaExtend extends the generated json schema during `zarf internal gen-config-schema`
type ZarfComponentOnlyCluster ¶ added in v0.20.0
type ZarfComponentOnlyCluster struct { Architecture string `` /* 137-byte string literal not displayed */ Distros []string `` /* 152-byte string literal not displayed */ }
ZarfComponentOnlyCluster represents the architecture and K8s cluster distribution to filter on.
type ZarfComponentOnlyTarget ¶ added in v0.20.0
type ZarfComponentOnlyTarget struct { LocalOS string `json:"localOS,omitempty" jsonschema:"description=Only deploy component to specified OS,enum=linux,enum=darwin,enum=windows"` Cluster ZarfComponentOnlyCluster `json:"cluster,omitempty" jsonschema:"description=Only deploy component to specified clusters"` Flavor string `` /* 141-byte string literal not displayed */ }
ZarfComponentOnlyTarget filters a component to only show it for a given local OS and cluster.
type ZarfContainerTarget ¶
type ZarfContainerTarget struct { Namespace string `json:"namespace" jsonschema:"description=The namespace to target for data injection"` Selector string `json:"selector" jsonschema:"description=The K8s selector to target for data injection,example=app=data-injection"` Container string `json:"container" jsonschema:"description=The container name to target for data injection"` Path string `json:"path" jsonschema:"description=The path within the container to copy the data into"` }
ZarfContainerTarget defines the destination info for a ZarfData target
type ZarfCreateOptions ¶ added in v0.19.2
type ZarfCreateOptions struct { SkipSBOM bool `json:"skipSBOM" jsonschema:"description=Disable the generation of SBOM materials during package creation"` BaseDir string `json:"baseDir" jsonschema:"description=Location where the Zarf package will be created from"` Output string `json:"output" jsonschema:"description=Location where the finalized Zarf package will be placed"` ViewSBOM bool `json:"sbom" jsonschema:"description=Whether to pause to allow for viewing the SBOM post-creation"` SBOMOutputDir string `json:"sbomOutput" jsonschema:"description=Location to output an SBOM into after package creation"` SetVariables map[string]string `` /* 173-byte string literal not displayed */ MaxPackageSizeMB int `` /* 133-byte string literal not displayed */ SigningKeyPath string `json:"signingKeyPath" jsonschema:"description=Location where the private key component of a cosign key-pair can be found"` SigningKeyPassword string `` /* 139-byte string literal not displayed */ DifferentialPackagePath string `` /* 144-byte string literal not displayed */ RegistryOverrides map[string]string `json:"registryOverrides" jsonschema:"description=A map of domains to override on package create when pulling images"` Flavor string `json:"flavor" jsonschema:"description=An optional variant that controls which components will be included in a package"` IsSkeleton bool `json:"isSkeleton" jsonschema:"description=Whether to create a skeleton package"` NoYOLO bool `json:"noYOLO" jsonschema:"description=Whether to create a YOLO package"` }
ZarfCreateOptions tracks the user-defined options used to create the package.
type ZarfDataInjection ¶
type ZarfDataInjection struct { Source string `` /* 149-byte string literal not displayed */ Target ZarfContainerTarget `json:"target" jsonschema:"description=The target pod + container to inject the data into"` Compress bool `` /* 175-byte string literal not displayed */ }
ZarfDataInjection is a data-injection definition.
type ZarfDeployOptions ¶
type ZarfDeployOptions struct { AdoptExistingResources bool `` /* 139-byte string literal not displayed */ SkipWebhooks bool `` /* 133-byte string literal not displayed */ Timeout time.Duration `json:"timeout" jsonschema:"description=Timeout for performing Helm operations"` // TODO (@WSTARR): This is a library only addition to Zarf and should be refactored in the future (potentially to utilize component composability). As is it should NOT be exposed directly on the CLI ValuesOverridesMap map[string]map[string]map[string]interface{} `` /* 163-byte string literal not displayed */ }
ZarfDeployOptions tracks the user-defined preferences during a package deploy.
type ZarfFile ¶
type ZarfFile struct { Source string `json:"source" jsonschema:"description=Local folder or file path or remote URL to pull into the package"` Shasum string `json:"shasum,omitempty" jsonschema:"description=(files only) Optional SHA256 checksum of the file"` Target string `` /* 135-byte string literal not displayed */ Executable bool `` /* 136-byte string literal not displayed */ Symlinks []string `json:"symlinks,omitempty" jsonschema:"description=List of symlinks to create during package deploy"` ExtractPath string `json:"extractPath,omitempty" jsonschema:"description=Local folder or file to be extracted from a 'source' archive"` }
ZarfFile defines a file to deploy.
type ZarfFindImagesOptions ¶ added in v0.30.0
type ZarfFindImagesOptions struct { RepoHelmChartPath string `json:"repoHelmChartPath" jsonschema:"description=Path to the helm chart directory"` KubeVersionOverride string `json:"kubeVersionOverride" jsonschema:"description=Kubernetes version to use for the helm chart"` RegistryURL string `json:"registryURL" jsonschema:"description=Manual override for ###ZARF_REGISTRY###"` Why string `json:"why" jsonschema:"description=Find the location of the image given as an argument and print it to the console"` SkipCosign bool `json:"skip-cosign" jsonschema:"description=Optionally skip lookup of cosign artifacts when finding images"` }
ZarfFindImagesOptions tracks the user-defined preferences during a prepare find-images search.
type ZarfGenerateOptions ¶ added in v0.32.6
type ZarfGenerateOptions struct { Name string `json:"name" jsonschema:"description=Name of the package being generated"` URL string `json:"url" jsonschema:"description=URL to the source git repository"` Version string `json:"version" jsonschema:"description=Version of the chart to use"` GitPath string `json:"gitPath" jsonschema:"description=Relative path to the chart in the git repository"` Output string `json:"output" jsonschema:"description=Location where the finalized zarf.yaml will be placed"` }
ZarfGenerateOptions tracks the user-defined options during package generation.
type ZarfInitOptions ¶ added in v0.22.0
type ZarfInitOptions struct { // Zarf init is installing the k3s component ApplianceMode bool `json:"applianceMode" jsonschema:"description=Indicates if Zarf was initialized while deploying its own k8s cluster"` // Using alternative services GitServer GitServerInfo `json:"gitServer" jsonschema:"description=Information about the repository Zarf is going to be using"` RegistryInfo RegistryInfo `json:"registryInfo" jsonschema:"description=Information about the container registry Zarf is going to be using"` ArtifactServer ArtifactServerInfo `json:"artifactServer" jsonschema:"description=Information about the artifact registry Zarf is going to be using"` StorageClass string `json:"storageClass" jsonschema:"description=StorageClass of the k8s cluster Zarf is initializing"` }
ZarfInitOptions tracks the user-defined options during cluster initialization.
type ZarfInspectOptions ¶ added in v0.30.0
type ZarfInspectOptions struct { // View SBOM contents while inspecting the package ViewSBOM bool // Location to output an SBOM into after package inspection SBOMOutputDir string // ListImages will list the images in the package ListImages bool }
ZarfInspectOptions tracks the user-defined preferences during a package inspection.
type ZarfManifest ¶
type ZarfManifest struct { Name string `` /* 145-byte string literal not displayed */ Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace to deploy the manifests to"` Files []string `json:"files,omitempty" jsonschema:"description=List of local K8s YAML files or remote URLs to deploy (in order)"` KustomizeAllowAnyDirectory bool `` /* 151-byte string literal not displayed */ Kustomizations []string `` /* 131-byte string literal not displayed */ NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for manifest resources to be ready before continuing"` }
ZarfManifest defines raw manifests Zarf will deploy as a helm chart.
func (ZarfManifest) Validate ¶ added in v0.34.0
func (manifest ZarfManifest) Validate() error
Validate runs all validation checks on a manifest.
type ZarfMetadata ¶
type ZarfMetadata struct { Name string `json:"name" jsonschema:"description=Name to identify this Zarf package,pattern=^[a-z0-9][a-z0-9\\-]*$"` Description string `json:"description,omitempty" jsonschema:"description=Additional information about this package"` Version string `` /* 207-byte string literal not displayed */ URL string `json:"url,omitempty" jsonschema:"description=Link to package information when online"` Uncompressed bool `json:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"` Architecture string `` /* 131-byte string literal not displayed */ YOLO bool `` /* 264-byte string literal not displayed */ Authors string `` /* 209-byte string literal not displayed */ Documentation string `json:"documentation,omitempty" jsonschema:"description=Link to package documentation when online"` Source string `json:"source,omitempty" jsonschema:"description=Link to package source code when online"` Vendor string `json:"vendor,omitempty" jsonschema_description:"Name of the distributing entity, organization or individual."` AggregateChecksum string `` /* 151-byte string literal not displayed */ }
ZarfMetadata lists information about the current ZarfPackage.
type ZarfMirrorOptions ¶ added in v0.29.2
type ZarfMirrorOptions struct {
NoImgChecksum bool `json:"noImgChecksum" jsonschema:"description=Whether to skip adding a Zarf checksum to image references."`
}
ZarfMirrorOptions tracks the user-defined preferences during a package mirror.
type ZarfPackage ¶
type ZarfPackage struct { Kind ZarfPackageKind `` /* 130-byte string literal not displayed */ Metadata ZarfMetadata `json:"metadata,omitempty" jsonschema:"description=Package metadata"` Build ZarfBuildData `json:"build,omitempty" jsonschema:"description=Zarf-generated package build data"` Components []ZarfComponent `json:"components" jsonschema:"description=List of components to deploy in this package,minItems=1"` Constants []variables.Constant `json:"constants,omitempty" jsonschema:"description=Constant template values applied on deploy for K8s resources"` Variables []variables.InteractiveVariable `json:"variables,omitempty" jsonschema:"description=Variable template values applied on deploy for K8s resources"` }
ZarfPackage the top-level structure of a Zarf config file.
func (ZarfPackage) IsInitConfig ¶ added in v0.32.6
func (pkg ZarfPackage) IsInitConfig() bool
IsInitConfig returns whether a Zarf package is an init config.
func (ZarfPackage) IsSBOMAble ¶ added in v0.32.6
func (pkg ZarfPackage) IsSBOMAble() bool
IsSBOMAble checks if a package has contents that an SBOM can be created on (i.e. images, files, or data injections).
func (ZarfPackage) Validate ¶ added in v0.34.0
func (pkg ZarfPackage) Validate() error
Validate runs all validation checks on the package.
type ZarfPackageKind ¶ added in v0.29.0
type ZarfPackageKind string
ZarfPackageKind is an enum of the different kinds of Zarf packages.
const ( // ZarfInitConfig is the kind of Zarf package used during `zarf init`. ZarfInitConfig ZarfPackageKind = "ZarfInitConfig" // ZarfPackageConfig is the default kind of Zarf package, primarily used during `zarf package`. ZarfPackageConfig ZarfPackageKind = "ZarfPackageConfig" )
type ZarfPackageOptions ¶ added in v0.29.0
type ZarfPackageOptions struct { Shasum string `json:"shasum" jsonschema:"description=The SHA256 checksum of the package"` PackageSource string `json:"packageSource" jsonschema:"description=Location where a Zarf package can be found"` OptionalComponents string `json:"optionalComponents" jsonschema:"description=Comma separated list of optional components"` SGetKeyPath string `json:"sGetKeyPath" jsonschema:"description=Location where the public key component of a cosign key-pair can be found"` SetVariables map[string]string `` /* 177-byte string literal not displayed */ PublicKeyPath string `json:"publicKeyPath" jsonschema:"description=Location where the public key component of a cosign key-pair can be found"` Retries int `` /* 134-byte string literal not displayed */ }
ZarfPackageOptions tracks the user-defined preferences during common package operations.
type ZarfPublishOptions ¶ added in v0.25.0
type ZarfPublishOptions struct { PackageDestination string `json:"packageDestination" jsonschema:"description=Location where the Zarf package will be published to"` SigningKeyPassword string `` /* 141-byte string literal not displayed */ SigningKeyPath string `json:"signingKeyPath" jsonschema:"description=Location where the private key component of a cosign key-pair can be found"` }
ZarfPublishOptions tracks the user-defined preferences during a package publish.
type ZarfPullOptions ¶ added in v0.25.1
type ZarfPullOptions struct {
OutputDirectory string `json:"outputDirectory" jsonschema:"description=Location where the pulled Zarf package will be placed"`
}
ZarfPullOptions tracks the user-defined preferences during a package pull.
type ZarfSplitPackageData ¶ added in v0.30.0
type ZarfSplitPackageData struct { Sha256Sum string `json:"sha256Sum" jsonschema:"description=The sha256sum of the package"` Bytes int64 `json:"bytes" jsonschema:"description=The size of the package in bytes"` Count int `json:"count" jsonschema:"description=The number of parts the package is split into"` }
ZarfSplitPackageData contains info about a split package.
type ZarfState ¶
type ZarfState struct { ZarfAppliance bool `json:"zarfAppliance" jsonschema:"description=Indicates if Zarf was initialized while deploying its own k8s cluster"` Distro string `json:"distro" jsonschema:"description=K8s distribution of the cluster Zarf was deployed to"` Architecture string `json:"architecture" jsonschema:"description=Machine architecture of the k8s node(s)"` StorageClass string `json:"storageClass" jsonschema:"Default StorageClass value Zarf uses for variable templating"` AgentTLS GeneratedPKI `json:"agentTLS" jsonschema:"PKI certificate information for the agent pods Zarf manages"` GitServer GitServerInfo `json:"gitServer" jsonschema:"description=Information about the repository Zarf is configured to use"` RegistryInfo RegistryInfo `json:"registryInfo" jsonschema:"description=Information about the container registry Zarf is configured to use"` ArtifactServer ArtifactServerInfo `json:"artifactServer" jsonschema:"description=Information about the artifact registry Zarf is configured to use"` }
ZarfState is maintained as a secret in the Zarf namespace to track Zarf init data.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package extensions contains the types for all official extensions.
|
Package extensions contains the types for all official extensions. |