Documentation ¶
Index ¶
- Constants
- Variables
- func BuildConfig(path string) error
- func ClearDeployingComponents()
- func FillActiveTemplate() error
- func GetAbsCachePath() string
- func GetActiveConfig() types.ZarfPackage
- func GetArch() string
- func GetBuildData() types.ZarfBuildData
- func GetComponents() []types.ZarfComponent
- func GetContainerRegistryInfo() types.RegistryInfo
- func GetCraneAuthOption(username string, secret string) crane.Option
- func GetCraneOptions() []crane.Option
- func GetDataInjectionMarker() string
- func GetDeployingComponents() []types.DeployedComponent
- func GetGitServerInfo() types.GitServerInfo
- func GetInitPackageName() string
- func GetMetaData() types.ZarfMetadata
- func GetPackageName() string
- func GetRegistry() string
- func GetSeedRegistry() string
- func GetStartTime() int64
- func GetState() types.ZarfState
- func GetValidPackageExtensions() [3]string
- func InitState(tmpState types.ZarfState)
- func InjectImportedConstant(importedConstant types.ZarfPackageConstant)
- func InjectImportedVariable(importedVariable types.ZarfPackageVariable)
- func IsZarfInitConfig() bool
- func LoadConfig(path string, filterByOS bool) error
- func SetActiveVariables() error
- func SetComponents(components []types.ZarfComponent)
- func SetDeployingComponents(components []types.DeployedComponent)
Constants ¶
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" 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:2.8.1" )
Variables ¶
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 // InitOptions tracks user-defined values for the active Zarf initialization. InitOptions types.ZarfInitOptions // 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 // Variables set by the user SetVariableMap map[string]string ZarfDefaultCachePath = filepath.Join("~", ".zarf-cache") )
Functions ¶
func BuildConfig ¶
BuildConfig adds build information and writes the config to the given path
func ClearDeployingComponents ¶ added in v0.22.0
func ClearDeployingComponents()
func FillActiveTemplate ¶ added in v0.21.0
func FillActiveTemplate() error
FillActiveTemplate handles setting the active variables and reloading the base template.
func GetAbsCachePath ¶ added in v0.22.0
func GetAbsCachePath() string
GetAbsCachePath gets the absolute cache path for images and git repos.
func GetActiveConfig ¶ added in v0.20.0
func GetActiveConfig() types.ZarfPackage
func GetBuildData ¶
func GetBuildData() types.ZarfBuildData
func GetComponents ¶
func GetComponents() []types.ZarfComponent
func GetContainerRegistryInfo ¶ added in v0.22.0
func GetContainerRegistryInfo() types.RegistryInfo
GetContainerRegistryInfo returns the ContainerRegistryInfo for the docker registry Zarf is configured to use from the state
func GetCraneAuthOption ¶ added in v0.18.3
func GetCraneOptions ¶
func GetDataInjectionMarker ¶ added in v0.21.0
func GetDataInjectionMarker() string
func GetDeployingComponents ¶ added in v0.22.0
func GetDeployingComponents() []types.DeployedComponent
func GetGitServerInfo ¶ added in v0.22.0
func GetGitServerInfo() types.GitServerInfo
GetGitServerInfo returns the GitServerInfo for the git server Zarf is configured to use from the state
func GetInitPackageName ¶ added in v0.22.0
func GetInitPackageName() string
func GetMetaData ¶
func GetMetaData() types.ZarfMetadata
func GetPackageName ¶
func GetPackageName() string
func GetRegistry ¶
func GetRegistry() string
func GetSeedRegistry ¶
func GetSeedRegistry() string
func GetStartTime ¶ added in v0.21.0
func GetStartTime() int64
Timestamp of when the CLI was started
func GetValidPackageExtensions ¶
func GetValidPackageExtensions() [3]string
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 ¶
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 SetDeployingComponents ¶ added in v0.22.0
func SetDeployingComponents(components []types.DeployedComponent)
Types ¶
This section is empty.