config

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package config stores the global configuration and constants.

Index

Constants

View Source
const (
	GithubProject = "zarf-dev/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 (
	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

	CosignPublicKey string

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

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

Zarf Global Configuration Variables.

Functions

func GetAbsCachePath

func GetAbsCachePath() string

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

func GetAbsHomePath

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

func GetDataInjectionMarker() string

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

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