config

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

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

	PackagePrefix = "zarf-package"

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

	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"
	ZarfDefaultImageCachePath = ".zarf-image-cache"

	ZarfYAML = "zarf.yaml"
)

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

	// CreeateOptions tracks the user-defined options used to create the package
	CreateOptions types.ZarfCreateOptions

	// DeployOptions tracks user-defined values for the active deployment
	DeployOptions types.ZarfDeployOptions

	CliArch string

	ZarfSeedPort string

	SGetPublicKey string

	// Variables set by the user
	SetVariableMap map[string]string
)

Functions

func BuildConfig

func BuildConfig(path string) error

BuildConfig adds build information and writes the config to the given path

func FillActiveTemplate added in v0.21.0

func FillActiveTemplate() error

FillActiveTemplate handles setting the active variables and reloading the base template.

func GetActiveConfig added in v0.20.0

func GetActiveConfig() types.ZarfPackage

func GetArch

func GetArch() string

func GetBuildData

func GetBuildData() types.ZarfBuildData

func GetComponents

func GetComponents() []types.ZarfComponent

func GetCraneAuthOption added in v0.18.3

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

func GetCraneOptions

func GetCraneOptions() []crane.Option

func GetDataInjectionMarker added in v0.21.0

func GetDataInjectionMarker() string

func GetImageCachePath added in v0.18.0

func GetImageCachePath() string

func GetMetaData

func GetMetaData() types.ZarfMetadata

func GetPackageName

func GetPackageName() string

func GetRegistry

func GetRegistry() string

func GetSecret

func GetSecret(selector SecretSelector) string

func GetSeedImage

func GetSeedImage() string

GetSeedImage returns a list of image strings specified in the package, but only for init packages

func GetSeedRegistry

func GetSeedRegistry() string

func GetStartTime added in v0.21.0

func GetStartTime() int64

Timestamp of when the CLI was started

func GetState

func GetState() types.ZarfState

func GetValidPackageExtensions

func GetValidPackageExtensions() [3]string

func InitState

func InitState(tmpState types.ZarfState)

func InjectImportedConstant added in v0.21.0

func InjectImportedConstant(importedConstant types.ZarfPackageConstant)

InjectImportedConstant determines if an imported package constant exists in the active config and adds it if not.

func InjectImportedVariable added in v0.21.0

func InjectImportedVariable(importedVariable types.ZarfPackageVariable)

InjectImportedVariable determines if an imported package variable exists in the active config and adds it if not.

func IsZarfInitConfig

func IsZarfInitConfig() bool

func LoadConfig

func LoadConfig(path string, filterByOS bool) error

LoadConfig loads the config from the given path and removes components not matching the current OS if filterByOS is set.

func SetActiveVariables added in v0.21.0

func SetActiveVariables() error

SetActiveVariables handles setting the active variables used to template component files.

func SetComponents

func SetComponents(components []types.ZarfComponent)

func SetImageCachePath added in v0.18.0

func SetImageCachePath(cachePath string)

Types

type SecretMap

type SecretMap struct {
	// contains filtered or unexported fields
}

type SecretSelector

type SecretSelector = string
const (
	StateRegistryPush   SecretSelector = "registry-push"
	StateRegistryPull   SecretSelector = "registry-pull"
	StateRegistrySecret SecretSelector = "registry-secret"
	StateGitPush        SecretSelector = "git-push"
	StateGitPull        SecretSelector = "git-pull"
	StateLogging        SecretSelector = "logging"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL