config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Overview

Package config stores the global configuration and constants.

Index

Constants

View Source
const (
	GithubProject = "zarf-dev/zarf"

	ZarfCleanupScriptsPath = "/opt/zarf"

	ZarfPackagePrefix = "zarf-package-"

	ZarfDeployStage = "Deploy"
	ZarfCreateStage = "Create"
	ZarfMirrorStage = "Mirror"
)

Zarf Global Configuration Constants.

View Source
const (
	ZarfImagePullSecretName = "private-registry"
	ZarfGitServerSecretName = "private-git-server"

	UnsetCLIVersion = "unset-development-only"
)

Zarf Constants for In-Cluster Services.

Variables

View Source
var (
	// CLIVersion track the version of the CLI
	CLIVersion = UnsetCLIVersion

	// ActionsUseSystemZarf sets whether to use Zarf from the system path if Zarf is being used as a library
	ActionsUseSystemZarf = true

	// ActionsCommandZarfPrefix sets a sub command prefix that Zarf commands are under in the current binary if Zarf is being used as a library (and use system Zarf is not specified)
	ActionsCommandZarfPrefix = ""

	// CommonOptions tracks user-defined values that apply across commands
	CommonOptions types.ZarfCommonOptions

	ZarfDefaultCachePath = filepath.Join("~", ".zarf-cache")

	// Default Time Vars
	ZarfDefaultTimeout       = 15 * time.Minute
	ZarfDefaultRetries       = 3
	ZarfDefaultRetryDelay    = 500 * time.Millisecond
	ZarfDefaultRetryMaxDelay = 8 * time.Second
)

Zarf Global Configuration Variables.

Functions

func GetAbsHomePath

func GetAbsHomePath(path string) (string, error)

GetAbsHomePath replaces ~ with the absolute path to a user's home dir

func GetDataInjectionMarker deprecated

func GetDataInjectionMarker() string

GetDataInjectionMarker returns the data injection marker based on the current CLI start time.

Deprecated: Only supported by deprecated v1alpha1 packages.

func GetInitPackageName added in v0.56.0

func GetInitPackageName(architecture string) string

GetInitPackageName returns the init filename for the architecture (or host) and CLI version.

func GetStartTime

func GetStartTime() int64

GetStartTime returns the timestamp of when the CLI was started.

Types

This section is empty.

Directories

Path Synopsis
Package lang contains the language strings for english used by Zarf Alternative languages can be created by duplicating this file and changing the build tag to "//go:build alt_language && <language>".
Package lang contains the language strings for english used by Zarf Alternative languages can be created by duplicating this file and changing the build tag to "//go:build alt_language && <language>".

Jump to

Keyboard shortcuts

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