config

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config stores the global configuration and constants.

Index

Constants

View Source
const (
	GithubProject = "defenseunicorns/zarf"

	ZarfAgentHost = "agent-hook.zarf.svc"

	ZarfCleanupScriptsPath = "/opt/zarf"

	ZarfPackagePrefix = "zarf-package-"

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

Zarf Global Configuration Constants.

View Source
const (
	ZarfArtifactTokenName = "zarf-artifact-registry-token"

	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 = false

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

	// CLIArch is the computer architecture of the device executing the CLI commands
	CLIArch string

	// ZarfSeedPort is the NodePort Zarf uses for the 'seed registry'
	ZarfSeedPort string

	// SkipLogFile is a flag to skip logging to a file
	SkipLogFile bool

	// NoColor is a flag to disable colors in output
	NoColor bool

	CosignPublicKey string

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

	// Default Time Vars
	ZarfDefaultTimeout = 15 * time.Minute
	ZarfDefaultRetries = 3
)

Zarf Global Configuration Variables.

Functions

func GetAbsCachePath added in v0.22.0

func GetAbsCachePath() string

GetAbsCachePath gets the absolute cache path for images and git repos.

func GetAbsHomePath added in v0.28.1

func GetAbsHomePath(path string) string

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

func GetArch

func GetArch(archs ...string) string

GetArch returns the arch based on a priority list with options for overriding.

func GetDataInjectionMarker added in v0.21.0

func GetDataInjectionMarker() string

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

func GetStartTime added in v0.21.0

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