known

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AutoUpdateAnnotation is the name of an annotation which prevents reconciliation if set to "false"
	AutoUpdateAnnotation = "clusternet.io/autoupdate"

	// FeedProtectionAnnotation passes detailed message on protecting current object as a feed
	FeedProtectionAnnotation = "apps.clusternet.io/feed-protection"

	// SkipValidatingAnnotation indicates no validations will be applied when dry-run on shadow resources.
	// This is useful when you want to create a CR, but you don't want to declare a CRD in the parent kube-apiserver.
	SkipValidatingAnnotation = "apps.clusternet.io/skip-validating"

	// ObjectOwnedByDescriptionAnnotation is the name of an annotation which contains the description of the object owned by
	ObjectOwnedByDescriptionAnnotation = "apps.clusternet.io/owned-by-description"

	// LastAppliedConfigAnnotation is the annotation used to store the previous
	// configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
	LastAppliedConfigAnnotation = "clusternet.io/last-applied-configuration"

	// IsDefaultClusterInitAnnotation represents an annotation that marks a Base as the default cluster initialization
	// workloads.
	// This annotation can be set on Subscription or Base objects.
	// This annotation will be passed down from Subscription to Base objects.
	IsDefaultClusterInitAnnotation = "apps.clusternet.io/is-default-cluster-init"

	// ClusterInitBaseAnnotation records the name of the Base to be used for initialization after joining.
	// This annotation is set on ManagedCluster objects.
	// It is mainly used for legacy clusters that have already joined.
	ClusterInitBaseAnnotation = "apps.clusternet.io/cluster-init-base"

	// ClusterInitSkipAnnotation indicates no initialization operations will be applied to this cluster.
	ClusterInitSkipAnnotation = "clusters.clusternet.io/skip-cluster-init"
)

annotations

View Source
const (
	// NamePrefixForClusternetObjects is a prefix name for generating Clusternet related objects for child cluster,
	// such as namespace, sa, etc
	NamePrefixForClusternetObjects = "clusternet-"

	// ChildClusterSecretName is the secret that stores credentials of child cluster, which will be used by deployer
	// in clusternet-controller-manager
	ChildClusterSecretName = "child-cluster-deployer"

	// ClusterAPIServerURLKey denotes the apiserver address
	ClusterAPIServerURLKey = "apiserver-advertise-url"

	// ClusternetSystemNamespace is the default system namespace where we place system components.
	// This could be re-configured with flag "--leader-elect-resource-namespace"
	ClusternetSystemNamespace = "clusternet-system"

	// ClusternetReservedNamespace is the default namespace to store Manifest into
	ClusternetReservedNamespace = "clusternet-reserved"

	// ClusternetAppSA is the service account where we store credentials to deploy resources
	ClusternetAppSA = "clusternet-app-deployer"

	// ClusternetHubProxyServiceAccount is the service account that can be used for proxying requests to child clusters.
	// This will be also used by deployer in clusternet-controller-manager when flag "--anonymous-auth-supported" is
	// set to false.
	ClusternetHubProxyServiceAccount = "clusternet-hub-proxy"

	// nvidia gpu name
	NVIDIAGPUResourceName = "nvidia.com/gpu"
)
View Source
const (
	AppFinalizer            string = "apps.clusternet.io/finalizer"
	FeedProtectionFinalizer string = "apps.clusternet.io/feed-protection"
)

These are internal finalizer values to Clusternet, must be qualified name.

View Source
const (
	// DefaultResync means the default resync time
	DefaultResync = time.Hour * 12

	// DefaultRetryPeriod means the default retry period
	DefaultRetryPeriod = 5 * time.Second

	// NoResyncPeriod indicates that informer resync should be delayed as long as possible
	NoResyncPeriod = 0 * time.Second

	// DefaultThreadiness defines default number of threads
	DefaultThreadiness = 10
)
View Source
const (
	MetaGeneration      = "/metadata/generation"
	CreationTimestamp   = "/metadata/creationTimestamp"
	ManagedFields       = "/metadata/managedFields"
	MetaUID             = "/metadata/uid"
	MetaSelflink        = "/metadata/selfLink"
	MetaResourceVersion = "/metadata/resourceVersion"

	SectionStatus = "/status"
)

fields should be ignored when compared

View Source
const (
	IndexKeyForSubscriptionUID = "subUid"
	IndexKeyForBaseUID         = "baseUid"
)
View Source
const (
	NodeLabelsKeyPrefix       = "node.clusternet.io/"
	ClusterRegisteredByLabel  = "clusters.clusternet.io/registered-by"
	ClusterIDLabel            = "clusters.clusternet.io/cluster-id"
	ClusterNameLabel          = "clusters.clusternet.io/cluster-name"
	ClusterBootstrappingLabel = "clusters.clusternet.io/bootstrapping"

	ObjectCreatedByLabel = "clusternet.io/created-by"

	// the source info where this object belongs to or controlled by
	ConfigGroupLabel     = "apps.clusternet.io/config.group"
	ConfigVersionLabel   = "apps.clusternet.io/config.version"
	ConfigKindLabel      = "apps.clusternet.io/config.kind"
	ConfigNameLabel      = "apps.clusternet.io/config.name"
	ConfigNamespaceLabel = "apps.clusternet.io/config.namespace"
	ConfigUIDLabel       = "apps.clusternet.io/config.uid"

	ConfigSubscriptionUIDLabel       = "apps.clusternet.io/subs.uid"
	ConfigSubscriptionNameLabel      = "apps.clusternet.io/subs.name"
	ConfigSubscriptionNamespaceLabel = "apps.clusternet.io/subs.namespace"

	LabelServiceName      = "services.clusternet.io/multi-cluster-service-name"
	LabelServiceNameSpace = "services.clusternet.io/multi-cluster-service-namespace"
)

label key

View Source
const (
	CredentialsAuto = "credentials-auto"
	RBACDefaults    = "rbac-defaults"

	ClusternetAgentName   = "clusternet-agent"
	ClusternetHubName     = "clusternet-hub"
	ClusternetCtrlMgrName = "clusternet-controller-manager"
)

label value

View Source
const (
	// TaintClusterUnschedulable will be added when cluster becomes unschedulable
	// and removed when cluster becomes schedulable.
	TaintClusterUnschedulable = "clusters.clusternet.io/unschedulable"

	// TaintClusterInitialization will be added when cluster needs to be initialized after joining
	// and removed after initialization.
	TaintClusterInitialization = "clusters.clusternet.io/initialization"
)
View Source
const (
	// ClusterInitWaitingReason indicates the waiting reason for ClusterInit
	ClusterInitWaitingReason string = "ClusterInitWaiting"

	// ClusterInitDisabledReason indicates the disabled reason for ClusterInit
	ClusterInitDisabledReason string = "ClusterInitDisabled"

	// ClusterInitDoneReason indicates the disabled reason for ClusterInit
	ClusterInitDoneReason string = "ClusterInitDone"
)
View Source
const (
	Category = "clusternet.shadow"
)
View Source
const (
	// DefaultRandomIDLength is the default length for random id
	DefaultRandomIDLength = 5
)
View Source
const (
	HeaderPrefixKey = "Clusternet-"
)
View Source
const (
	// NoteLengthLimit denotes the maximum note length.
	// copied from k8s.io/kubernetes/pkg/apis/core/validation/events.go
	NoteLengthLimit = 1024
)

Variables

View Source
var (
	TokenHeaderKey       = fmt.Sprintf("%sToken", HeaderPrefixKey)
	CertificateHeaderKey = fmt.Sprintf("%sCertificate", HeaderPrefixKey)
	PrivateKeyHeaderKey  = fmt.Sprintf("%sPrivateKey", HeaderPrefixKey)
)

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