known

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 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"
)

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-hub
	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 (
	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 (
	Category = "clusternet.shadow"
)
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
)
View Source
const (
	// TaintClusterUnschedulable will be added when cluster becomes unschedulable
	// and removed when cluster becomes schedulable.
	TaintClusterUnschedulable = "clusters.clusternet.io/unschedulable"
)

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