types

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 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 APIZarfPackage added in v0.22.0

type APIZarfPackage struct {
	Path        string      `json:"path"`
	ZarfPackage ZarfPackage `json:"zarfPackage"`
}

type ClusterSummary added in v0.22.0

type ClusterSummary struct {
	Reachable bool      `json:"reachable"`
	HasZarf   bool      `json:"hasZarf"`
	Distro    string    `json:"distro"`
	ZarfState ZarfState `json:"zarfState"`
}

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"`
}

type ConnectStrings added in v0.20.0

type ConnectStrings map[string]ConnectString

type DeployedComponent added in v0.22.0

type DeployedComponent struct {
	Name            string           `json:"name"`
	InstalledCharts []InstalledChart `json:"installedCharts"`
}

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"`

	DeployedComponents []DeployedComponent `json:"deployedComponents"`
}

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 GeneratedPKI added in v0.19.0

type GeneratedPKI struct {
	CA   []byte `json:"ca"`
	Cert []byte `json:"cert"`
	Key  []byte `json:"key"`
}

GeneratedPKI

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.

type InstalledChart added in v0.22.0

type InstalledChart struct {
	Namespace string `json:"namespace"`
	ChartName string `json:"chartName"`
}

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.

type RestAPI added in v0.22.0

type RestAPI struct {
	ZarfPackage       ZarfPackage       `json:"zarfPackage"`
	ZarfState         ZarfState         `json:"zarfState"`
	ZarfCommonOptions ZarfCommonOptions `json:"zarfCommonOptions"`
	ZarfCreateOptions ZarfCreateOptions `json:"zarfCreateOptions"`
	ZarfDeployOptions ZarfDeployOptions `json:"zarfDeployOptions"`
	ConnectStrings    ConnectStrings    `json:"connectStrings"`
	ClusterSummary    ClusterSummary    `json:"clusterSummary"`
	DeployedPackage   DeployedPackage   `json:"deployedPackage"`
	APIZarfPackage    APIZarfPackage    `json:"apiZarfPackage"`
}

type ZarfBuildData

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

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

type ZarfChart

type ZarfChart struct {
	Name        string   `` /* 142-byte string literal not displayed */
	ReleaseName string   `json:"releaseName,omitempty" jsonschema:"description=The name of the release to create, defaults to the name of the chart"`
	Url         string   `` /* 180-byte string literal not displayed */
	Version     string   `` /* 133-byte string literal not displayed */
	Namespace   string   `json:"namespace" jsonschema:"description=The namespace to deploy the chart to"`
	ValuesFiles []string `` /* 131-byte string literal not displayed */
	GitPath     string   `` /* 138-byte string literal not displayed */
	LocalPath   string   `json:"localPath,omitempty" jsonschema:"oneof_required=chartLocationGroup,description=The path to the chart folder"`
	NoWait      bool     `json:"noWait,omitempty" jsonschema:"description=Wait for chart resources to be ready before continuing"`
}

ZarfChart defines a helm chart to be deployed.

type ZarfCommonOptions added in v0.20.0

type ZarfCommonOptions struct {
	Confirm       bool   `json:"confirm" jsonschema:"description=Verify that Zarf should perform an action"`
	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 */
}

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\\-]+$"`

	// 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 `json:"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 `json:"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 `json:"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 `json:"import,omitempty" jsonschema:"description=Import a component from another Zarf package"`

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

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

	// Charts are helm charts to install during package deploy
	Charts []ZarfChart `json:"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 `json:"manifests,omitempty"`

	// 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"`

	// Data pacakges to push into a running cluster
	DataInjections []ZarfDataInjection `json:"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 `json:"name,omitempty"`
	// For further explanation see https://regex101.com/library/Ldx8yG and https://regex101.com/r/Ldx8yG/1
	Path string `json:"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 `json:"distros,omitempty" jsonschema:"description=Future use"`
}

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"`
}

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

type ZarfComponentScripts

type ZarfComponentScripts 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"`
}

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

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"`
	Container string `json:"container" jsonschema:"description=The container to target for data injection"`
	Path      string `json:"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              `json:"skipSBOM" jsonschema:"description=Disable the generation of SBOM materials during package creation"`
	Insecure        bool              `json:"insecure" jsonschema:"description=Disable the need for shasum validations when pulling down files from the internet"`
	OutputDirectory string            `json:"outputDirectory" jsonschema:"description=Location where the finalized Zarf package will be placed"`
	SetVariables    map[string]string `` /* 173-byte string literal not displayed */
}

ZarfCreateOptions tracks the user-defined options used to create the package.

type ZarfDataInjection

type ZarfDataInjection struct {
	Source   string              `json:"source" jsonschema:"description=A path to a local folder or file to inject into the given target pod + container"`
	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 {
	PackagePath  string            `json:"packagePath" jsonschema:"description=Location where a Zarf package to deploy can be found"`
	Components   string            `json:"components" jsonschema:"description=Comma separated list of optional components to deploy"`
	SGetKeyPath  string            `json:"sGetKeyPath" jsonschema:"description=Location where the public key component of a cosign key-pair can be found"`
	SetVariables map[string]string `` /* 173-byte string literal not displayed */
}

ZarfDeployOptions tracks the user-defined preferences during a package deployment

type ZarfFile

type ZarfFile struct {
	Source     string   `json:"source" jsonschema:"description=Local file path or remote URL to add to the package"`
	Shasum     string   `json:"shasum,omitempty" jsonschema:"description=SHA256 checksum of the file if the source is a URL"`
	Target     string   `json:"target" jsonschema:"description=The absolute or relative path where the file should be copied to during package deploy"`
	Executable bool     `json:"executable,omitempty" jsonschema:"description=Determines if the file should be made executable during package deploy"`
	Symlinks   []string `json:"symlinks,omitempty" jsonschema:"description=List of symlinks to create during package deploy"`
}

ZarfFile defines a file to deploy.

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 a remote git server
	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 registry Zarf is going to be using"`

	Components string `json:"components" jsonschema:"description=Comma separated list of optional components to deploy"`

	StorageClass string `json:"storageClass" jsonschema:"description=StorageClass of the k8s cluster Zarf is initializing"`
}

ZarfInitOptions tracks the user-defined options during cluster initialization.

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 individual K8s YAML files to deploy (in order)"`
	KustomizeAllowAnyDirectory bool     `` /* 151-byte string literal not displayed */
	Kustomizations             []string `json:"kustomizations,omitempty" jsonschema:"description=List of kustomization paths to include in the package"`
	NoWait                     bool     `json:"noWait,omitempty" jsonschema:"description=Wait for manifest resources to be ready before continuing"`
}

ZarfManifest defines raw manifests Zarf will deploy as a helm chart

type ZarfMetadata

type ZarfMetadata struct {
	Name         string `json:"name" jsonschema:"description=Name to identify this Zarf package,pattern=^[a-z0-9\\-]+$"`
	Description  string `json:"description,omitempty" jsonschema:"description=Additional information about this package"`
	Version      string `json:"version,omitempty" jsonschema:"description=Generic string to track the package version by a package author"`
	Url          string `json:"url,omitempty" jsonschema:"description=Link to package information when online"`
	Image        string `json:"image,omitempty" jsonschema:"description=An image URL to embed in this package for future Zarf UI listing"`
	Uncompressed bool   `json:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"`
	Architecture string `json:"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          `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"`
	Variables  []ZarfPackageVariable `json:"variables,omitempty" jsonschema:"description=Variable template values applied on deploy for K8s resources"`
	Constants  []ZarfPackageConstant `json:"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 `json:"name" jsonschema:"description=The name to be used for the constant,pattern=^[A-Z_]+$"`
	Value string `json:"value" jsonschema:"description=The value to set for the constant during deploy"`
	// Include a description that will only be displayed during package create/deploy confirm prompts
	Description string `` /* 155-byte string literal not displayed */
}

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

type ZarfPackageVariable added in v0.21.0

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

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

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 registry Zarf is configured to use"`
	LoggingSecret string        `json:"loggingSecret" jsonschema:"description=Secret value that the internal Grafana server was seeded with"`
}

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