Documentation
¶
Overview ¶
Package state manages references to a logical zarf deployment in k8s.
Index ¶
Constants ¶
View Source
const ( ZarfManagedByLabel = "app.kubernetes.io/managed-by" ZarfNamespaceName = "zarf" ZarfStateSecretName = "zarf-state" ZarfStateDataKey = "state" ZarfPackageInfoLabel = "package-deploy-info" )
Declares secrets and metadata keys and values. TODO(mkcp): Remove Zarf prefix, that's the project name. TODO(mkcp): Provide semantic doccomments for how these are used.
View Source
const ( RegistryKey = "registry" RegistryReadKey = "registry-readonly" GitKey = "git" GitReadKey = "git-readonly" ArtifactKey = "artifact" AgentKey = "agent" )
Credential keys TODO(mkcp): Provide semantic doccomments for how these are used.
Variables ¶
This section is empty.
Functions ¶
func DebugPrint ¶
DebugPrint takes a State struct, sanitizes sensitive fields, and prints them.
Types ¶
type MergeOptions ¶
type MergeOptions struct {
GitServer types.GitServerInfo
RegistryInfo types.RegistryInfo
ArtifactServer types.ArtifactServerInfo
Services []string
}
MergeOptions tracks the user-defined options during cluster initialization. TODO(mkcp): Provide semantic doccomments for how exported fields are used.
type State ¶
type State struct {
// Indicates if Zarf was initialized while deploying its own k8s cluster
ZarfAppliance bool `json:"zarfAppliance"`
// K8s distribution of the cluster Zarf was deployed to
Distro string `json:"distro"`
// Machine architecture of the k8s node(s)
Architecture string `json:"architecture"`
// Default StorageClass value Zarf uses for variable templating
StorageClass string `json:"storageClass"`
// PKI certificate information for the agent pods Zarf manages
AgentTLS pki.GeneratedPKI `json:"agentTLS"`
// Information about the repository Zarf is configured to use
GitServer types.GitServerInfo `json:"gitServer"`
// Information about the container registry Zarf is configured to use
RegistryInfo types.RegistryInfo `json:"registryInfo"`
// Information about the artifact registry Zarf is configured to use
ArtifactServer types.ArtifactServerInfo `json:"artifactServer"`
}
State is maintained as a secret in the Zarf namespace to track Zarf init data.
Click to show internal directories.
Click to hide internal directories.