Documentation ¶
Overview ¶
Package config stores the global configuration and constants.
Index ¶
- Constants
- Variables
- func GetAbsCachePath() string
- func GetAbsHomePath(path string) string
- func GetArch(archs ...string) string
- func GetCraneAuthOption(username string, secret string) crane.Option
- func GetCraneOptions(insecure bool, archs ...string) []crane.Option
- func GetDataInjectionMarker() string
- func GetStartTime() int64
- func GetValidPackageExtensions() [2]string
- func IsValidFileExtension(filename string) bool
Constants ¶
const ( GithubProject = "defenseunicorns/zarf" // ZarfMaxChartNameLength limits helm chart name size to account for K8s/helm limits and zarf prefix ZarfMaxChartNameLength = 40 ZarfGeneratedPasswordLen = 24 ZarfGeneratedSecretLen = 48 ZarfAgentHost = "agent-hook.zarf.svc" ZarfConnectLabelName = "zarf.dev/connect-name" ZarfConnectAnnotationDescription = "zarf.dev/connect-description" ZarfConnectAnnotationURL = "zarf.dev/connect-url" ZarfManagedByLabel = "app.kubernetes.io/managed-by" ZarfCleanupScriptsPath = "/opt/zarf" ZarfPackagePrefix = "zarf-package-" ZarfDeployStage = "Deploy" ZarfCreateStage = "Create" ZarfMirrorStage = "Mirror" )
Zarf Global Configuration Constants.
const ( ZarfArtifactTokenName = "zarf-artifact-registry-token" ZarfImagePullSecretName = "private-registry" ZarfGitServerSecretName = "private-git-server" ZarfRegistryPushUser = "zarf-push" ZarfRegistryPullUser = "zarf-pull" ZarfInClusterContainerRegistryNodePort = 31999 ZarfGitPushUser = "zarf-git-user" ZarfGitReadUser = "zarf-git-read-user" ZarfInClusterGitServiceURL = "http://zarf-gitea-http.zarf.svc.cluster.local:3000" ZarfInClusterArtifactServiceURL = ZarfInClusterGitServiceURL + "/api/packages/" + ZarfGitPushUser ZarfLoggingUser = "zarf-admin" )
Zarf Constants for In-Cluster Services.
Variables ¶
var ( // CLIVersion track the version of the CLI CLIVersion = "unset" // 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") )
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
GetAbsHomePath replaces ~ with the absolute path to a user's home dir
func GetCraneAuthOption ¶ added in v0.18.3
GetCraneAuthOption returns a crane auth option with the provided credentials.
func GetCraneOptions ¶
GetCraneOptions returns a crane option object with the correct options & platform.
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.
func GetValidPackageExtensions ¶
func GetValidPackageExtensions() [2]string
GetValidPackageExtensions returns the valid package extensions.
func IsValidFileExtension ¶ added in v0.30.0
IsValidFileExtension returns true if the filename has a valid package extension.
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>". |