constant

package
v0.0.0-...-142aac7 Latest Latest
Warning

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

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

Documentation

Overview

Package constant contains all common constants used in the project

Index

Constants

View Source
const (
	OadpLabel               = v1alpha1.OadpOperatorLabel
	OadpLabelValue          = TrueString
	ManagedByLabel          = "app.kubernetes.io/managed-by"
	ManagedByLabelValue     = "oadp-nac-controller" // TODO why not use same project name as in PROJECT file?
	NabOriginNACUUIDLabel   = v1alpha1.OadpOperatorLabel + "-nab-origin-nacuuid"
	NarOriginNACUUIDLabel   = v1alpha1.OadpOperatorLabel + "-nar-origin-nacuuid"
	NabslOriginNACUUIDLabel = v1alpha1.OadpOperatorLabel + "-nabsl-origin-nacuuid"
	NadrOriginNACUUIDLabel  = v1alpha1.OadpOperatorLabel + "-nadr-origin-nacuuid"
	NabSyncLabel            = v1alpha1.OadpOperatorLabel + "-nab-synced-from-nacuuid"

	NabOriginNameAnnotation        = v1alpha1.OadpOperatorLabel + "-nab-origin-name"
	NabOriginNamespaceAnnotation   = v1alpha1.OadpOperatorLabel + "-nab-origin-namespace"
	NarOriginNameAnnotation        = v1alpha1.OadpOperatorLabel + "-nar-origin-name"
	NarOriginNamespaceAnnotation   = v1alpha1.OadpOperatorLabel + "-nar-origin-namespace"
	NabslOriginNameAnnotation      = v1alpha1.OadpOperatorLabel + "-nabsl-origin-name"
	NabslOriginNamespaceAnnotation = v1alpha1.OadpOperatorLabel + "-nabsl-origin-namespace"
	NadrOriginNameAnnotation       = v1alpha1.OadpOperatorLabel + "-nadr-origin-name"
	NadrOriginNamespaceAnnotation  = v1alpha1.OadpOperatorLabel + "-nadr-origin-namespace"

	NabFinalizerName   = "nonadminbackup.oadp.openshift.io/finalizer"
	NarFinalizerName   = "nonadminrestore.oadp.openshift.io/finalizer"
	NabslFinalizerName = "nonadminbackupstoragelocation.oadp.openshift.io/finalizer"
)

Common labels for objects manipulated by the Non Admin Controller Labels should be used to identify the NAC object Annotations on the other hand should be used to define ownership of the specific Object, such as Backup/Restore.

View Source
const (
	NamespaceEnvVar = "WATCH_NAMESPACE"
	// Numeric Log Level corresponding to logrus levels (matching velero).
	// 0 = panic
	// 1 = Fatal
	// 2 = Error
	// 3 = Warn
	// 4 = Info
	// 5 = Debug
	// 6 = Trace
	LogLevelEnvVar  = "LOG_LEVEL"
	LogFormatEnvVar = "LOG_FORMAT"
)

Common environment variables for the Non Admin Controller

View Source
const (
	Base10 = 10
	Bits32 = 32
)

Magic numbers

View Source
const CommaString = ","

CommaString defines a constant for the comma string

View Source
const CurrentPhaseString = "currentPhase"

CurrentPhaseString defines a constant for the Current Phase string

View Source
const EmptyString = ""

EmptyString defines a constant for the empty string

View Source
const JSONTagString = "json"

JSONTagString defines a constant for the JSON tag string

View Source
const MaximumNacObjectNameLength = validation.DNS1123LabelMaxLength

MaximumNacObjectNameLength represents Generated Non Admin Object Name and must be below 63 characters, because it's used within object Label Value

View Source
const NABRestrictedErr = "NonAdminBackup %s is restricted"

NABRestrictedErr holds an error message template for a non-admin backup operation that is restricted.

View Source
const NARRestrictedErr = "NonAdminRestore %s is restricted"

NARRestrictedErr holds an error message template for a non-admin restore operation that is restricted.

View Source
const NameDelimiter = "-"

NameDelimiter defines character that is used to separate name parts

View Source
const NameString = "name"

NameString defines a constant for the Name string

View Source
const NamespaceString = "Namespace"

NamespaceString defines a constant for the Namespace string

View Source
const TrueString = "True"

TrueString defines a constant for the True string

View Source
const UUIDString = "UUID"

UUIDString defines a constant for the UUID string

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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