config

package
v0.23.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 11 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"
	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"
	ZarfGitCacheDir   = "repos"

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

	ZarfInClusterContainerRegistryURL      = "http://zarf-registry-http.zarf.svc.cluster.local:5000"
	ZarfInClusterContainerRegistryNodePort = 31999

	ZarfInClusterGitServiceURL = "http://zarf-gitea-http.zarf.svc.cluster.local:3000"

	ZarfSeedImage = "registry"
	ZarfSeedTag   = "2.8.1"
)

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

	SGetPublicKey string
	UIAssets      embed.FS

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

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) []crane.Option

GetCraneOptions returns a cran 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

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

func GetRegistry

func GetRegistry(state types.ZarfState) string

GetRegistry returns the registry URL based on the Zarf state

func GetStartTime added in v0.21.0

func GetStartTime() int64

Timestamp of when the CLI was started

func GetValidPackageExtensions

func GetValidPackageExtensions() [3]string

GetValidPackageExtension 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