constants

package
v0.0.0-...-44dad58 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuperClusterInfoCfgMap = "supercluster-info"
	SuperClusterIDKey      = "id"
)
View Source
const (
	// LabelScheduledCluster is the super cluster the pod schedules to.
	LabelScheduledCluster = "scheduler.virtualcluster.io/superCluster"

	// LabelScheduledPlacements is the scheduled placements the namespace schedules to.
	LabelScheduledPlacements = "scheduler.virtualcluster.io/placements"

	// LabelScheduledSlice is the scheduled slice size of the namespace.
	LabelNamespaceSlice = "scheduler.virtualcluster.io/slice"
)
View Source
const (
	// Override the client-go default 5 qps and 10 burst, which are too small for mccontroller .
	DefaultSyncerClientQPS   = 1000
	DefaultSyncerClientBurst = 2000

	// DefaultRequestTimeout is set for all client-go request. This is the absolute
	// timeout of the HTTP request, including reading the response body.
	DefaultRequestTimeout = 30 * time.Second

	// If reconcile request keeps failing, stop retrying after MaxReconcileRetryAttempts.
	// According to controller workqueue default rate limiter algorithm, retry 16 times takes around 180 seconds.
	MaxReconcileRetryAttempts = 16

	// StatusCode represents the status of every syncer operations.
	// TODO: more detailed error code
	StatusCodeOK                     = "OK"
	StatusCodeExceedMaxRetryAttempts = "ExceedMaxRetryAttempts"
	StatusCodeError                  = "Error"
	StatusCodeBadRequest             = "BadRequest"
)

Variables

View Source
var DefaultNamespaceSlice = v1.ResourceList{
	v1.ResourceCPU:    resource.MustParse("2"),
	v1.ResourceMemory: resource.MustParse("4Gi"),
}
View Source
var ResourceSyncerUserAgent = "resource-syncer/" + version.BriefVersion()

ResourceSyncerUserAgent is the userAgent name when starting resource syncer. TODO: make this configurable in Cluster instance.

View Source
var SuperClusterID string

SuperClusterID is initialized when syncer started, it won't change during syncer life cycle.

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