constants

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Duration at which lease expires on CRs.
	LeaseDuration = 60 * time.Second

	// Duration after which leader renews its lease.
	RenewDeadline = 15 * time.Second

	// Duration after which non-leader retries to acquire lease.
	RetryPeriod = 5 * time.Second
)
View Source
const (
	// Duration after which Reflector resyncs CRs and calls UpdateFunc on each of the existing CRs.
	ResyncPeriod = 10 * time.Minute

	DefaultSecretResyncPeriod = 5 * time.Minute
)
View Source
const (
	// The key of SnapshotManager mode for data movement. Specifically, boolean string values are expected.
	// By default, it is "false". No data movement from local to remote storage if "true" is set.
	VolumeSnapshotterLocalMode = "LocalMode"
	// The key of SnapshotManager location
	VolumeSnapshotterManagerLocation = "SnapshotManagerLocation"
	// Valid values for the config with the VolumeSnapshotterManagerLocation key
	VolumeSnapshotterPlugin     = "Plugin"
	VolumeSnapshotterDataServer = "DataServer"
)

configuration constants for the volume snapshot plugin

View Source
const (
	// Max retry limit for downloads.
	DOWNLOAD_MAX_RETRY = 5

	// Initial retry for both uploads and downloads.
	MIN_RETRY = 0

	// BACKOFF for downloads.
	DOWNLOAD_BACKOFF = 5

	// Max backoff limit for uploads.
	UPLOAD_MAX_BACKOFF = 60

	// Exceeds this number of retry, will give a warning message to ask user to fix network issue in cluster.
	RETRY_WARNING_COUNT = 8
)
View Source
const (
	DefaultS3RepoPrefix     = "plugins/vsphere-astrolabe-repo"
	DefaultS3BackupLocation = "default"
	AWS_ACCESS_KEY_ID       = "aws_access_key_id"
	AWS_SECRET_ACCESS_KEY   = "aws_secret_access_key"
)

configuration constants for the S3 repository

View Source
const (
	// Minimum velero version number to meet velero plugin requirement
	VeleroMinVersion = "v1.5.1"

	// Minimum csi driver version number to meet velero plugin requirement
	CsiMinVersion = "v1.0.2"
)
View Source
const (
	// DefaultNamespace is the Kubernetes namespace that is used by default for
	// the Velero server and API objects.
	DefaultNamespace          = "velero"
	CloudCredentialSecretName = "cloud-credentials"
)
View Source
const (
	DataManagerForPlugin   string = "data-manager-for-plugin"
	BackupDriverForPlugin  string = "backup-driver"
	BackupDriverNamespace  string = "velero-vsphere-plugin-backupdriver"
	VeleroPluginForVsphere string = "velero-plugin-for-vsphere"
	VeleroDeployment       string = "velero"
	VSphereCSIController          = "vsphere-csi-controller"
	KubeSystemNamespace           = "kube-system"
)
View Source
const (
	VCSecretNs             = "kube-system"
	VCSecretNsSupervisor   = "vmware-system-csi"
	VCSecret               = "vsphere-config-secret"
	VCSecretTKG            = "csi-vsphere-config"
	VCSecretData           = "csi-vsphere.conf"
	VCSecretDataSupervisor = "vsphere-cloud-provider.conf"
)
View Source
const (
	Unknown    ClusterFlavor = "Unknown"
	Supervisor               = "Supervisor Cluster"
	TkgGuest                 = "TKG Guest Cluster"
	VSphere                  = "vSphere Kubernetes Cluster"
)
View Source
const (
	VSphereLocalModeFlag    = "local-mode"
	VSphereLocalModeFeature = "EnableLocalMode"
)

feature flog constants

View Source
const (
	PvApiEndpoint = "supervisor.default.svc" // TODO: get it from "kubectl get cm -n vmware-system-csi pvcsi-config"
	PvPort        = "6443"
	PvSecretName  = "pvbackupdriver-provider-creds"
)

Para Virtual Cluster access for Guest Cluster

View Source
const (
	WithoutBackupRepository = "without-backup-repository"
	WithoutDeleteSnapshot   = "without-delete-snapshot"
)
View Source
const (
	ItemSnapshotLabel   = "velero-plugin-for-vsphere/item-snapshot-blob"
	PluginVersionLabel  = "velero-plugin-for-vsphere/plugin-version"
	SnapshotBackupLabel = "velero.io/backup-name"
)
View Source
const (
	RetryInterval = 5
	RetryMaximum  = 5
)
View Source
const (
	VCuuidKey                 = "vCenterUUID"
	SupervisorClusterIdKey    = "SupervisorClusterId"
	SupervisorResourcePoolKey = "SupervisorResourcePool"
)

Keys for supervisor cluster parameters

View Source
const (
	SnapshotParamBackupName       = "BackupName"
	SnapshotParamSvcSnapshotName  = "SvcSnapshotName"
	SnapshotParamBackupRepository = "BackupRepository"
)
View Source
const (
	// Plugin kind name
	PluginKindRestoreItemAction = "RestoreItemAction"
	// This label key is used to identify the name and kind of plugin that configMap is for
	ChangeStorageClassLabelKey = "velero.io/change-storage-class"
	// This label key is used to identify the ConfigMap as config for a plugin.
	PluginConfigLabelKey = "velero.io/plugin-config"
	// This is the reserved name used to map from a non storage class to a new storage class
	// at restore time. Storage class is required for restore. If no storage class is specified
	// in the PVC during backup, user can specify "com.vmware.cnsdp.emptystorageclass" as the
	// old storage class name to map to a new existing storage class name at restore time.
	EmptyStorageClass = "com.vmware.cnsdp.emptystorageclass"
)

These label keys are used to identify configMap used for storage class mapping, format: velero.io/plugin-config: "" velero.io/change-storage-class: RestoreItemAction

View Source
const (
	ImageRepositoryComponent = "Repository"
	ImageContainerComponent  = "Container"
	ImageVersionComponent    = "Version"
)
View Source
const (
	DefaultRetryIntervalStart = time.Second
	DefaultRetryIntervalMax   = 5 * time.Minute
)
View Source
const (
	// supported volume type in plugin
	CnsBlockVolumeType = "ivd"
)
View Source
const DefaultCRCleanUpWindow = 24

Default time window to clean up CR which is in terminal state

View Source
const (
	// Default port used to access vCenter.
	DefaultVCenterPort string = "443"
)
View Source
const (
	S3RepositoryDriver string = "s3repository.astrolabe.vmware-tanzu.com"
)
View Source
const (
	TkgSupervisorService = "supervisor"
)
View Source
const VMwareSystemVMUUID = "vmware-system-vm-uuid"

UUID of the VM on Supervisor Cluster

View Source
const (
	VSpherePluginFeatureStates = "velero-vsphere-plugin-feature-states"
)
View Source
const VeleroExcludeLabel = "velero.io/exclude-from-backup"

Label to set for Velero to ignore resources

View Source
const VsphereVolumeSnapshotLocationProvider = "velero.io/vsphere"

Variables

View Source
var PodAnnotationsToSkip = map[string]bool{

	"kubernetes.io/psp":                 true,
	"mac":                               true,
	"vlan":                              true,
	"vmware-system-ephemeral-disk-uuid": true,
	"vmware-system-image-references":    true,
	"vmware-system-vm-moid":             true,
	"vmware-system-vm-uuid":             true,
}
View Source
var ResourcesToBlock = map[string]bool{

	"agentinstalls.installers.tmc.cloud.vmware.com":           true,
	"certificaterequests.cert-manager.io":                     true,
	"certificates.cert-manager.io":                            true,
	"challenges.acme.cert-manager.io":                         true,
	"clusterissuers.cert-manager.io":                          true,
	"clusterresourcesetbindings.addons.cluster.x-k8s.io":      true,
	"clusterresourcesets.addons.cluster.x-k8s.io":             true,
	"clusters.cluster.x-k8s.io":                               true,
	"cnsnodevmattachments.cns.vmware.com":                     true,
	"cnsregistervolumes.cns.vmware.com":                       true,
	"cnsvolumemetadatas.cns.vmware.com":                       true,
	"compatibilities.run.tanzu.vmware.com":                    true,
	"contentlibraryproviders.vmoperator.vmware.com":           true,
	"contentsources.vmoperator.vmware.com":                    true,
	"imagedisks.imagecontroller.vmware.com":                   true,
	"installoptions.appplatform.wcp.vmware.com":               true,
	"installrequirements.appplatform.wcp.vmware.com":          true,
	"issuers.cert-manager.io":                                 true,
	"kubeadmconfigs.bootstrap.cluster.x-k8s.io":               true,
	"kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io":       true,
	"kubeadmcontrolplanes.controlplane.cluster.x-k8s.io":      true,
	"kuberneteslicenses.licenseoperator.vmware.com":           true,
	"loadbalancers.vmware.com":                                true,
	"machinedeployments.cluster.x-k8s.io":                     true,
	"machinehealthchecks.cluster.x-k8s.io":                    true,
	"machinepools.exp.cluster.x-k8s.io":                       true,
	"machines.cluster.x-k8s.io":                               true,
	"machinesets.cluster.x-k8s.io":                            true,
	"members.registryagent.vmware.com":                        true,
	"ncpconfigs.nsx.vmware.com":                               true,
	"network-attachment-definitions.k8s.cni.cncf.io":          true,
	"nsxerrors.nsx.vmware.com":                                true,
	"nsxlbmonitors.vmware.com":                                true,
	"nsxlocks.nsx.vmware.com":                                 true,
	"nsxnetworkinterfaces.nsx.vmware.com":                     true,
	"orders.acme.cert-manager.io":                             true,
	"projects.registryagent.vmware.com":                       true,
	"providerserviceaccounts.run.tanzu.vmware.com":            true,
	"registries.registryagent.vmware.com":                     true,
	"storagepolicies.appplatform.wcp.vmware.com":              true,
	"storagepools.cns.vmware.com":                             true,
	"supervisorservices.appplatform.wcp.vmware.com":           true,
	"tanzukubernetesclusters.run.tanzu.vmware.com":            true,
	"tanzukubernetesreleases.run.tanzu.vmware.com":            true,
	"tkgserviceconfigurations.run.tanzu.vmware.com":           true,
	"vcuiplugins.appplatform.wcp.vmware.com":                  true,
	"veleroservices.veleroappoperator.vmware.com":             true,
	"virtualmachineclasses.vmoperator.vmware.com":             true,
	"virtualmachineimages.vmoperator.vmware.com":              true,
	"virtualmachineservices.vmoperator.vmware.com":            true,
	"virtualmachinesetresourcepolicies.vmoperator.vmware.com": true,
	"virtualmachines.vmoperator.vmware.com":                   true,
	"virtualnetworkinterfaces.vmware.com":                     true,
	"virtualnetworks.vmware.com":                              true,
	"wcpclusters.infrastructure.cluster.vmware.com":           true,
	"wcpmachines.infrastructure.cluster.vmware.com":           true,
	"wcpmachinetemplates.infrastructure.cluster.vmware.com":   true,

	"backuprepositories.backupdriver.cnsdp.vmware.com":     true,
	"backuprepositoryclaims.backupdriver.cnsdp.vmware.com": true,
	"clonefromsnapshots.backupdriver.cnsdp.vmware.com":     true,
	"deletesnapshots.backupdriver.cnsdp.vmware.com":        true,
	"downloads.datamover.cnsdp.vmware.com":                 true,
	"snapshots.backupdriver.cnsdp.vmware.com":              true,
	"uploads.datamover.cnsdp.vmware.com":                   true,
}
View Source
var ResourcesToBlockOnRestore = map[string]bool{

	"images.imagecontroller.vmware.com": true,

	"pods": true,
}
View Source
var ResourcesToHandle = map[string]bool{
	"persistentvolumeclaims": true,
}

Functions

This section is empty.

Types

type ClusterFlavor

type ClusterFlavor string

Indicates the type of cluster where Plugin is installed

Jump to

Keyboard shortcuts

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