naming

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvMySQLStateFile    = "MYSQL_STATE_FILE"
	EnvMySQLNotifySocket = "MYSQL_NOTIFY_SOCKET"

	EnvMySQLNotifySocketInternal = "NOTIFY_SOCKET" // should only be set in the entrypoint

	EnvMySQLClusterType = "CLUSTER_TYPE"

	EnvBootstrapReadTimeout = "BOOTSTRAP_READ_TIMEOUT"

	EnvBootstrapCloneTimeout = "BOOTSTRAP_CLONE_TIMEOUT"

	EnvAsyncSourceRetryCount = "ASYNC_SOURCE_RETRY_COUNT"

	EnvAsyncSourceConnectRetry = "ASYNC_SOURCE_CONNECT_RETRY"

	EnvBackupsEnabled = "BACKUPS_ENABLED"
)
View Source
const (
	EventStorageClassNotSupportResize = "StorageClassNotSupportResize"
	EventExceededQuota                = "ExceededQuota"
)
View Source
const (

	// The name of the application.
	// This label is used to group all resources associated with the same application, regardless of their role or environment.
	// It should reflect the base application name, not the resource type or instance.
	// Example: "mysql", "haproxy", "orchestrator".
	LabelName = kubernetesPrefix + "name"

	// A unique name identifying the instance of an application
	// This should be set to the ".metadata.name" of the corresponding
	// PerconaServerMySQL, PerconaServerMySQLBackup, or PerconaServerMySQLRestore object.
	LabelInstance = kubernetesPrefix + "instance"

	// The tool being used to manage the operation of an application.
	// This should be set to the operator's official name only if it owns the resource.
	// For example, for cert-manager Certificates, set it to "cert-manager".
	LabelManagedBy = kubernetesPrefix + "managed-by"

	// The name of the higher-level application this resource is a part of.
	// Set this to one of "percona-server", "percona-server-backup", or "percona-server-restore" of the corresponding object.
	// TODO: Would it be better to use "ps", "ps-backup", and "ps-restore" instead?
	LabelPartOf = kubernetesPrefix + "part-of"

	// The role or function of the component within the application architecture.
	// Should match one of the predefined values from the `naming` package.
	LabelComponent = kubernetesPrefix + "component"
)
View Source
const (
	ComponentProxy        = "proxy"
	ComponentDatabase     = "database"
	ComponentOrchestrator = "orchestrator"
	ComponentTLS          = "tls"
	ComponentBackup       = "backup"
	ComponentRestore      = "restore"
	ComponentPITR         = "pitr"
)
View Source
const (
	LabelMySQLPrimary = mysqlPerconaPrefix + "primary"
	LabelExposed      = perconaPrefix + "exposed"
)
View Source
const (
	LabelBackupType     = perconaPrefix + "backup-type"
	LabelBackupAncestor = perconaPrefix + "backup-ancestor"
)
View Source
const (
	FinalizerDeleteSSL         = perconaPrefix + "delete-ssl"
	FinalizerDeletePodsInOrder = perconaPrefix + "delete-mysql-pods-in-order"
	FinalizerDeleteBackup      = perconaPrefix + "delete-backup"
	FinalizerDeleteMySQLPvc    = perconaPrefix + "delete-mysql-pvc"
)
View Source
const ClusterSetRecoveryFile = "/var/lib/mysql/clusterset-recovery"
View Source
const (
	CredsMountPath = "/etc/mysql/mysql-users-secret"
)
View Source
const (
	FinalizerClusterSetDissolve = perconaPrefix + "clusterset-dissolve"
)
View Source
const InternalEncryptionKeyVersionFileName = ".version"
View Source
const (
	LabelCluster = perconaPrefix + "cluster"
)

Variables

This section is empty.

Functions

func BackupLeaseName added in v1.2.0

func BackupLeaseName(clusterName string) string

func EncryptionKeyInternalSecretName added in v1.2.0

func EncryptionKeyInternalSecretName(clusterName string) string

func InternalEncryptionKeyFileName added in v1.2.0

func InternalEncryptionKeyFileName(clusterName, storageName string) string

func InternalHAProxyConfigMapName added in v1.2.0

func InternalHAProxyConfigMapName(clusterName string) string

func Labels added in v0.10.0

func Labels(name, instance, partOf, component string) map[string]string

func LeaseHolderName added in v1.2.0

func LeaseHolderName(name, uid string) string

func ParseLeaseHolder added in v1.2.0

func ParseLeaseHolder(holder string) (string, types.UID)

func RestoreLeaseName added in v1.2.0

func RestoreLeaseName(clusterName string) string

Types

type AnnotationKey

type AnnotationKey string
const (
	AnnotationSecretHash          AnnotationKey = perconaPrefix + "last-applied-secret"
	AnnotationConfigHash          AnnotationKey = perconaPrefix + "configuration-hash"
	AnnotationTLSHash             AnnotationKey = perconaPrefix + "last-applied-tls"
	AnnotationPasswordsUpdated    AnnotationKey = perconaPrefix + "passwords-updated"
	AnnotationLastConfigHash      AnnotationKey = perconaPrefix + "last-config-hash"
	AnnotationRescanNeeded        AnnotationKey = perconaPrefix + "rescan-needed"
	AnnotationPVCResizeInProgress AnnotationKey = perconaPrefix + "pvc-resize-in-progress"
	AnnotationBaseBackupName      AnnotationKey = perconaPrefix + "base-backup-name"
)

func (AnnotationKey) String

func (s AnnotationKey) String() string

Jump to

Keyboard shortcuts

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