config

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package config stores the global configuration and constants.

Index

Constants

View Source
const (
	GithubProject = "defenseunicorns/zarf"
	IPV4Localhost = "127.0.0.1"

	// ZarfMaxChartNameLength limits helm chart name size to account for K8s/helm limits and zarf prefix
	ZarfMaxChartNameLength   = 40
	ZarfGitPushUser          = "zarf-git-user"
	ZarfGitReadUser          = "zarf-git-read-user"
	ZarfArtifactTokenName    = "zarf-artifact-registry-token"
	ZarfRegistryPushUser     = "zarf-push"
	ZarfRegistryPullUser     = "zarf-pull"
	ZarfImagePullSecretName  = "private-registry"
	ZarfGitServerSecretName  = "private-git-server"
	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"

	ZarfImageCacheDir = "images"

	ZarfYAML          = "zarf.yaml"
	ZarfSBOMDir       = "zarf-sbom"
	ZarfPackagePrefix = "zarf-package-"

	ZarfInClusterContainerRegistryNodePort = 31999

	ZarfInClusterGitServiceURL      = "http://zarf-gitea-http.zarf.svc.cluster.local:3000"
	ZarfInClusterArtifactServiceURL = ZarfInClusterGitServiceURL + "/api/packages/" + ZarfGitPushUser
)

Zarf Global Configuration Constants.

Variables

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

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

	SGetPublicKey string
	UIAssets      embed.FS

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

Zarf Global Configuration Variables.

Functions

func ClearDeployingComponents added in v0.22.0

func ClearDeployingComponents()

ClearDeployingComponents clears the list of deploying components. TODO: (@jeff-mccoy) this should be moved out of config.

func GetAbsCachePath added in v0.22.0

func GetAbsCachePath() string

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

func GetArch

func GetArch(archs ...string) string

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

func GetCraneAuthOption added in v0.18.3

func GetCraneAuthOption(username string, secret string) crane.Option

GetCraneAuthOption returns a crane auth option with the provided credentials.

func GetCraneOptions

func GetCraneOptions(insecure bool, archs ...string) []crane.Option

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 GetDeployingComponents added in v0.22.0

func GetDeployingComponents() []types.DeployedComponent

GetDeployingComponents returns the list of deploying components. TODO: (@jeff-mccoy) this should be moved out of config.

func GetStartTime added in v0.21.0

func GetStartTime() int64

GetStartTime returns the timestamp of when the CLI was started.

func GetValidPackageExtensions

func GetValidPackageExtensions() [3]string

GetValidPackageExtensions returns the valid package extensions.

func SetDeployingComponents added in v0.22.0

func SetDeployingComponents(components []types.DeployedComponent)

SetDeployingComponents sets the list of deploying components. TODO: (@jeff-mccoy) this should be moved out of config.

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