types

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectString added in v0.20.0

type ConnectString struct {
	Description string
	Url         string
}

type ConnectStrings added in v0.20.0

type ConnectStrings map[string]ConnectString

type GeneratedPKI added in v0.19.0

type GeneratedPKI struct {
	CA   []byte
	Cert []byte
	Key  []byte
}

type ZarfBuildData

type ZarfBuildData struct {
	Terminal     string `yaml:"terminal"`
	User         string `yaml:"user"`
	Architecture string `yaml:"architecture"`
	Timestamp    string `yaml:"timestamp"`
	Version      string `yaml:"version"`
}

ZarfBuildData is written during the packager.Create() operation to track details of the created package.

type ZarfChart

type ZarfChart struct {
	Name        string   `yaml:"name"`
	ReleaseName string   `yaml:"releaseName,omitempty"`
	Url         string   `yaml:"url"`
	Version     string   `yaml:"version"`
	Namespace   string   `yaml:"namespace"`
	ValuesFiles []string `yaml:"valuesFiles,omitempty"`
	GitPath     string   `yaml:"gitPath,omitempty"`
}

ZarfChart defines a helm chart to be deployed.

type ZarfCommonOptions added in v0.20.0

type ZarfCommonOptions struct {
	Confirm       bool
	TempDirectory string
	SetVariables  map[string]string
}

ZarfCommonOptions tracks the user-defined preferences used across commands.

type ZarfComponent

type ZarfComponent struct {
	// Name is the unique identifier for this component
	Name string `yaml:"name" jsonschema:"description=The name of the component,pattern=^[a-z0-9\\-]+$"`

	// Description is a message given to a user when deciding to enable this componenent 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 `` /* 129-byte string literal not displayed */

	// Only include compatible components during package deployment
	Only ZarfComponentOnlyTarget `yaml:"only,omitempty" jsonschema:"description=Filter when this component is included in package creation or deployment"`

	// 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
	Group string `yaml:"group,omitempty" jsonschema:"description=Create a user selector field based on all components in the same group"`

	//Path to cosign publickey for signed online resources
	CosignKeyPath string `yaml:"cosignKeyPath,omitempty" jsonschema:"description=Specify a path to a public key to validate signed online resources"`

	// Import refers to another zarf.yaml package component.
	Import ZarfComponentImport `yaml:"import,omitempty" jsonschema:"description=Import a component from another Zarf package"`

	// Scripts are custom commands that run before or after package deployment
	Scripts ZarfComponentScripts `yaml:"scripts,omitempty" jsonschema:"description=Custom commands to run before or after package deployment"`

	// Files are files to place on disk during deploy
	Files []ZarfFile `yaml:"files,omitempty" jsonschema:"description=Files to place on disk during package deployment"`

	// Charts are helm charts to install during package deploy
	Charts []ZarfChart `yaml:"charts,omitempty" jsonschema:"description=Helm charts to install during package deploy"`

	// Manifests are raw manifests that get converted into zarf-generated helm charts during deploy
	Manifests []ZarfManifest `yaml:"manifests,omitempty"`

	// Images are the online images needed to be included in the zarf package
	Images []string `yaml:"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 `yaml:"repos,omitempty" jsonschema:"description=List of git repos to include in the package"`

	// Data pacakges to push into a running cluster
	DataInjections []ZarfDataInjection `yaml:"dataInjections,omitempty" jsonschema:"description=Datasets to inject into a pod in the target cluster"`
}

ZarfComponent is the primary functional grouping of assets to deploy by zarf.

type ZarfComponentImport

type ZarfComponentImport struct {
	ComponentName string `yaml:"name,omitempty"`
	// For further explanation see https://regex101.com/library/Ldx8yG and https://regex101.com/r/Ldx8yG/1
	Path string `yaml:"path" jsonschema:"pattern=^(?!.*###ZARF_PKG_VAR_).*$"`
}

ZarfImport structure for including imported zarf components

type ZarfComponentOnlyCluster added in v0.20.0

type ZarfComponentOnlyCluster struct {
	Architecture string   `` /* 137-byte string literal not displayed */
	Distros      []string `yaml:"distros,omitempty" jsonschema:"description=Future use"`
}

type ZarfComponentOnlyTarget added in v0.20.0

type ZarfComponentOnlyTarget struct {
	LocalOS string                   `yaml:"localOS,omitempty" jsonschema:"description=Only deploy component to specified OS,enum=linux,enum=darwin,enum=windows"`
	Cluster ZarfComponentOnlyCluster `yaml:"cluster,omitempty" jsonschema:"description=Only deploy component to specified clusters"`
}

ZarfComponentOnlyTarget filters a component to only show it for a given OS/Arch

type ZarfComponentScripts

type ZarfComponentScripts struct {
	ShowOutput     bool     `yaml:"showOutput,omitempty"`
	TimeoutSeconds int      `yaml:"timeoutSeconds,omitempty"`
	Retry          bool     `yaml:"retry,omitempty"`
	Before         []string `yaml:"before,omitempty"`
	After          []string `yaml:"after,omitempty"`
}

ZarfComponentScripts are scripts that run before or after a component is deployed

type ZarfContainerTarget

type ZarfContainerTarget struct {
	Namespace string `yaml:"namespace" jsonschema:"description=The namespace to target for data injection"`
	Selector  string `yaml:"selector" jsonschema:"description=The K8s selector to target for data injection"`
	Container string `yaml:"container" jsonschema:"description=The container to target for data injection"`
	Path      string `yaml:"path" jsonschema:"description=The path to copy the data to in the container"`
}

ZarfContainerTarget defines the destination info for a ZarfData target

type ZarfCreateOptions added in v0.19.2

type ZarfCreateOptions struct {
	SkipSBOM        bool
	ImageCachePath  string
	Insecure        bool
	OutputDirectory string
}

ZarfCreeateOptions tracks the user-defined options used to create the package

type ZarfDataInjection

type ZarfDataInjection struct {
	Source   string              `yaml:"source"`
	Target   ZarfContainerTarget `yaml:"target"`
	Compress bool                `` /* 175-byte string literal not displayed */
}

ZarfDataInjection is a data-injection definition

type ZarfDeployOptions

type ZarfDeployOptions struct {
	PackagePath string
	Components  string
	SGetKeyPath string

	// Zarf init is installing the k3s component
	ApplianceMode bool

	// Zarf init override options
	StorageClass string
	Secret       string
	NodePort     string
}

ZarfDeployOptions tracks the user-defined preferences during a package deployment

type ZarfFile

type ZarfFile struct {
	Source     string   `yaml:"source"`
	Shasum     string   `yaml:"shasum,omitempty"`
	Target     string   `yaml:"target"`
	Executable bool     `yaml:"executable,omitempty"`
	Symlinks   []string `yaml:"symlinks,omitempty"`
}

ZarfFile defines a file to deploy.

type ZarfManifest

type ZarfManifest struct {
	Name                       string   `yaml:"name"`
	DefaultNamespace           string   `yaml:"namespace,omitempty"`
	Files                      []string `yaml:"files,omitempty"`
	KustomizeAllowAnyDirectory bool     `yaml:"kustomizeAllowAnyDirectory,omitempty"`
	Kustomizations             []string `yaml:"kustomizations,omitempty"`
}

ZarfManifest defines raw manifests Zarf will deploy as a helm chart

type ZarfMetadata

type ZarfMetadata struct {
	Name         string `yaml:"name" jsonschema:"description=Name to identify this Zarf package,pattern=^[a-z0-9\\-]+$"`
	Description  string `yaml:"description,omitempty" jsonschema:"description=Additional information about this package"`
	Version      string `yaml:"version,omitempty" jsonschema:"description=Generic string to track the package version by a package author"`
	Url          string `yaml:"url,omitempty" jsonschema:"description=Link to package information when online"`
	Image        string `yaml:"image,omitempty" jsonschema:"description=An image URL to embed in this package for future Zarf UI listing"`
	Uncompressed bool   `yaml:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"`
	Architecture string `yaml:"architecture,omitempty" jsonschema:"description=The target cluster architecture of this package"`
}

ZarfMetadata lists information about the current ZarfPackage.

type ZarfPackage

type ZarfPackage struct {
	Kind       string                `` /* 130-byte string literal not displayed */
	Metadata   ZarfMetadata          `yaml:"metadata,omitempty" jsonschema:"description=Package metadata"`
	Build      ZarfBuildData         `yaml:"build,omitempty" jsonschema:"description=Zarf-generated package build data"`
	Components []ZarfComponent       `yaml:"components" jsonschema:"description=List of components to deploy in this package"`
	Seed       string                `` /* 131-byte string literal not displayed */
	Variables  []ZarfPackageVariable `yaml:"variables,omitempty" jsonschema:"description=Variable template values applied on deploy for K8s resources"`
	Constants  []ZarfPackageConstant `yaml:"constants,omitempty" jsonschema:"description=Constant template values applied on deploy for K8s resources"`
}

ZarfPackage the top-level structure of a Zarf config file.

type ZarfPackageConstant added in v0.21.0

type ZarfPackageConstant struct {
	Name  string `yaml:"name" jsonschema:"description=The name to be used for the constant,pattern=^[A-Z_]+$"`
	Value string `yaml:"value" jsonschema:"description=The value to set for the constant during deploy"`
}

ZarfPackageConstant are constants that can be used to dynaically template K8s resources.

type ZarfPackageVariable added in v0.21.0

type ZarfPackageVariable struct {
	Name    string `yaml:"name" jsonschema:"description=The name to be used for the variable,pattern=^[A-Z_]+$"`
	Default string `yaml:"default,omitempty" jsonschema:"description=The default value to use for the variable"`
	Prompt  bool   `yaml:"prompt,omitempty" jsonschema:"description=Whether to prompt the user for input for this variable"`
}

ZarfPackageVariable are variables that can be used to dynaically template K8s resources.

type ZarfState

type ZarfState struct {
	ZarfAppliance bool         `json:"zarfAppliance"`
	Distro        string       `json:"distro"`
	Architecture  string       `json:"architecture"`
	StorageClass  string       `json:"storageClass"`
	Secret        string       `json:"secret"`
	NodePort      string       `json:"nodePort"`
	AgentTLS      GeneratedPKI `json:"agentTLS"`
}

ZarfState is maintained as a secret in the Zarf namespace to track Zarf init data

Jump to

Keyboard shortcuts

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