package
1.12.0-alpha.0
Repository: https://github.com/karmada-io/karmada.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package lifted contains the files lifted from other projects.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

BuildClusterConfig return rest config for member cluster.
BuildClusterRoleReference will generate a ClusterRole reference.
BuildRoleBindingSubjects will generate a subject as per service account.
ClusterAccessCredentialChanged checks whether the cluster access credential changed.
ClusterMatches tells if specific cluster matches the affinity.
ClusterNamesMatches tells if specific cluster matches the clusterNames affinity.
ContextForChannel derives a child context from a parent channel.
ConvertToClusterNames will convert a cluster slice to clusterName's sets.String.
CreateClusterObject create cluster object in karmada control plane.
CreateClusterRole just try to create the ClusterRole.
CreateClusterRoleBinding just try to create the ClusterRoleBinding.
CreateNamespace just try to create the namespace.
CreateOrUpdateClusterObject create cluster object in karmada control plane, if cluster object has been existed and different from input clusterObj, update it.
CreateSecret just try to create the secret.
CreateServiceAccount just try to create the ServiceAccount.
DedupeAndMergeAnnotations merges the new annotations into exist annotations.
DedupeAndMergeLabels merges the new labels into exist labels.
DeleteClusterRole just try to delete the ClusterRole.
DeleteClusterRoleBinding just try to delete the ClusterRoleBinding.
DeleteNamespace just try to delete the namespace.
DeleteServiceAccount just try to delete the ServiceAccount.
DiffKey compares keys of two map with same key type, as the name of return values told, it will find out added keys and removed keys.
EmptyResource creates an empty resource object and returns.
EnsureClusterRoleBindingExist makes sure that the specific ClusterRoleBinding exist in cluster.
EnsureClusterRoleExist makes sure that the specific cluster role exist in cluster.
EnsureNamespaceExist makes sure that the specific namespace exist in cluster.
EnsureNamespaceExistWithLabels makes sure that the specific namespace exist in cluster.
EnsureServiceAccountExist makes sure that the specific service account exist in cluster.
GenerateImpersonationRules generate PolicyRules from given subjects for impersonation.
GetAnnotationValue retrieves the value via 'annotationKey' (if it exists), otherwise an empty string is returned.
GetBindingClusterNames will get clusterName list from bind clusters field.
GetCluster returns the given Cluster resource.
GetClusterSet returns the given Clusters name set.
GetClusterWithKarmadaClient tells if a cluster already joined to control plane.
GetLabelValue retrieves the value via 'labelKey' if exist, otherwise returns an empty string.
GetSecret just try to get the secret.
GetSumOfReplicas will get the sum of replicas in target clusters.
IsBindingReplicasChanged will check if the sum of replicas is different from the replicas of object.
IsClusterIdentifyUnique checks whether the ClusterID exists in the karmada control plane.
IsClusterReady tells whether the cluster status in 'Ready' condition.
IsClusterRoleBindingExist tells if specific ClusterRole already exists.
IsClusterRoleExist tells if specific ClusterRole already exists.
IsConditionsEqual compares the given condition's Status, Reason and Message.
IsLazyActivationEnabled judge whether lazy activation preference is enabled.
IsNamespaceExist tells if the namespace already exists.
IsServiceAccountExist tells if specific service account already exists.
Keys return slice of keys of the given map.
MaxInt64 returns the largest of two int64 numbers.
MergeAnnotation adds annotation for the given object, replace the value if key exist.
MergeLabel adds label for the given object, replace the value if key exist.
MergeTargetClusters will merge the replicas in two TargetCluster.
MetaNamespaceKeyFunc generates a namespaced key for object.
MinInt64 returns the smaller of two int64 numbers.
NewAsyncWorker returns a asyncWorker which can process resource periodic.
NewClusterClientSet returns a ClusterClient for the given member cluster.
NewClusterClientSetForAgent returns a ClusterClient for the given member cluster which will be used in karmada agent.
NewClusterDynamicClientSet returns a dynamic client for the given member cluster.
NewClusterDynamicClientSetForAgent returns a dynamic client for the given member cluster which will be used in karmada agent.
NewClusterScaleClientSet returns a ClusterScaleClient for the given member cluster.
NewCondition returns a new condition object.
NewProxyHeaderRoundTripperWrapperConstructor returns a RoundTripper wrapper that's usable within restConfig.WrapTransport.
NewResource creates a new resource object from resource list.
NewSkippedResourceConfig to create SkippedResourceConfig.
ObtainClusterID returns the cluster ID property with clusterKubeClient.
ObtainCredentialsFromMemberCluster obtain credentials for member cluster.
PatchSecret just try to patch the secret.
PolicyRuleAPIGroupMatches determines if the given policy rule is applied for requested group.
PolicyRuleResourceMatches determines if the given policy rule is applied for requested resource.
PolicyRuleResourceNameMatches determines if the given policy rule is applied for named resource.
RecordManagedAnnotations sets or updates the annotation(resourcetemplate.karmada.io/managed-annotations) to record the annotation keys.
RecordManagedLabels sets or updates the annotation(resourcetemplate.karmada.io/managed-labels) to record the label keys.
RegisterClusterInControllerPlane represents register cluster in controller plane.
RemoveAnnotations removes the annotations from the given object.
RemoveLabels removes the labels from the given object.
RescheduleRequired judges whether reschedule is required.
ResourceMatches tells if the specific resource matches the selector.
ResourceMatchSelectors tells if the specific resource matches the selectors.
ResourceMatchSelectorsPriority returns the highest priority between specific resource and the selectors.
ResourceSelectorPriority tells the priority between the specific resource and the selector.
RetainAnnotations merges the annotations that added by controllers running in member cluster to avoid overwriting.
RetainLabels merges the labels that added by controllers running in member cluster to avoid overwriting.
SetLeaseOwnerFunc helps construct a newLeasePostProcessFunc which sets a cluster OwnerReference to the given lease object.
StringerJoin acts the same with `strings.Join`, except that it consumes a slice of `fmt.Stringer`.
WaitForServiceAccountSecretCreation wait the ServiceAccount's secret has been created.

# Constants

AppliedClusterOverrides is the annotation which used to record override items an object applied.
AppliedOverrides is the annotation which used to record override items an object applied.
BindingControllerFinalizer is added to ResourceBinding to ensure related Works are deleted before ResourceBinding itself is deleted.
BindingDependenciesDistributorFinalizer is added to independent binding to ensure the attached binding have been removed or cleaned up before itself is deleted.
CacheSyncTimeout refers to the time limit set on waiting for cache to sync.
ClusterControllerFinalizer is added to Cluster to ensure Work as well as the execution space (namespace) is deleted before itself is deleted.
ClusterPropagationPolicyControllerFinalizer is added to ClusterPropagationPolicy to ensure the related resources have been unbound before itself is deleted.
ClusterResourceBindingControllerFinalizer is added to ClusterResourceBinding to ensure related Works are deleted before ClusterResourceBinding itself is deleted.
ClusterRoleBindingKind indicates the target resource is a clusterrolebinding.
ClusterRoleKind indicates the target resource is a clusterrole.
CompletionsField indicates the 'completions' field of a job.
ContextKeyObject is the context value key of a resource.
CRDKind indicates the target resource is a CustomResourceDefinition.
CronJobKind indicates the target resource is a cronjob.
DaemonSetKind indicates the target resource is a daemonset.
DefaultFilePerm default file perm.
DeploymentKind indicates the target resource is a deployment.
EndpointSliceControllerFinalizer is added to Work, which holds EndpointSlice collected from member clusters, to ensure related EndpointSlices are deleted before Work itself is deleted.
EndpointSliceDispatchControllerLabelValue indicates the endpointSlice are controlled by Karmada.
EndpointSliceKind indicates the target resource is a endpointslice.
EndpointSliceProvisionClusterAnnotation is added to work of the dispatch EndpointSlice in consumption clusters' namespace.
EndpointSliceWorkManagedByLabel is added to the EndpointSlice work collected from member clusters, represents which manage the endpointslice work.
ExecutionControllerFinalizer is added to Work to ensure manifests propagated to member cluster is deleted before Work itself is deleted.
FederatedResourceQuotaNameLabel is added to Work to specify associated FederatedResourceQuota's name.
FederatedResourceQuotaNamespaceLabel is added to Work to specify associated FederatedResourceQuota's namespace.
HorizontalPodAutoscalerKind indicates the target resource is a horizontalpodautoscaler.
IngressKind indicates the target resource is a ingress.
JobKind indicates the target resource is a job.
KarmadaSystemLabel is a reserved karmada label to indicate whether resources are system level resources managed by karmada controllers.
KarmadaSystemLabelValue indicates that resources are system level resources managed by karmada controllers.
KubeCredentials is the secret that contains mandatory credentials whether reported when registering cluster.
KubeImpersonator is the secret that contains the token of impersonator whether reported when registering cluster.
ManagedByKarmadaLabel is a reserved karmada label to indicate whether resources are member cluster resources synchronized by karmada controllers.
ManagedByKarmadaLabelValue indicates that these are workloads in member cluster synchronized by karmada controllers.
MCSControllerFinalizer is added to MultiClusterService to ensure service work is deleted before itself is deleted.
MCSEndpointSliceCollectControllerFinalizer is added to mcs to ensure related Works in provider clusters are deleted.
MCSEndpointSliceDispatchControllerFinalizer is added to mcs to ensure related Works in consumption clusters are deleted.
MultiClusterServiceKind indicates the target resource is a MultiClusterService.
MultiClusterServiceNameLabel is added to work object, represents the work is managed by the corresponding MultiClusterService This label indicates the name.
MultiClusterServiceNamespaceLabel is added to work object, represents the work is managed by the corresponding MultiClusterService This label indicates the namespace.
NamespaceClusterLease is the namespace which cluster lease are stored.
NamespaceKarmadaSystem is the karmada system namespace.
None is means don't report any secrets.
ParallelismField indicates the 'parallelism' field of a job.
PersistentVolumeClaimKind indicates the target resource is a persistentvolumeclaim.
PersistentVolumeKind indicates the target resource is a persistentvolume.
PodDisruptionBudgetKind indicates the target resource is a poddisruptionbudget.
PodKind indicates the target resource is a pod.
PolicyPlacementAnnotation is the annotation of a policy's placement.
PriorityMatchAll means the ResourceSelector whose Name and LabelSelector is empty matches the resource.
PriorityMatchLabelSelector means the LabelSelector of ResourceSelector matches the resource.
PriorityMatchName means the Name of ResourceSelector matches the resource.
PriorityMisMatch means the ResourceSelector does not match the resource.
PropagationInstruction is used to mark a resource(like Work) propagation instruction.
PropagationInstructionSuppressed indicates that the resource should not be propagated.
PropagationPolicyControllerFinalizer is added to PropagationPolicy to ensure the related resources have been unbound before itself is deleted.
ProviderField indicates the 'provider' field of a cluster.
ReadyReplicasField indicates the 'readyReplicas' field of a resource status.
RegionField indicates the 'region' field of a cluster.
ReplicaSetKind indicates the target resource is a replicaset.
ReplicasField indicates the 'replicas' field of a resource.
ResourceTemplateClaimedByLabel is added to the ResourceTemplate, indicating which resource is in charge of propagating the ResourceTemplate.
RetainReplicasLabel is a reserved label to indicate whether the replicas should be retained.
RetainReplicasValue is an optional value of RetainReplicasLabel, indicating retain.
SecretKind indicates the target resource is a Secret.
ServiceAccountKind indicates the target resource is a serviceaccount.
ServiceExportKind indicates the target resource is a serviceexport crd.
ServiceImportKind indicates the target resource is a serviceimport crd.
ServiceKind indicates the target resource is a service.
ServiceNameLabel is added to work object, which is report by member cluster, to specify service name associated with EndpointSlice.
ServiceNamespaceLabel is added to work object, which is report by member cluster, to specify service namespace associated with EndpointSlice.
SpecField indicates the 'spec' field of a resource.
StatefulSetKind indicates the target resource is a statefulset.
ZoneField indicates the 'zone' field of a cluster.

# Variables

ClusterPolicyRules represents cluster policy rules.
EndpointSliceGVK is the GroupVersionKind of K8s native EndpointSlice.

# Structs

ClientOption holds the attributes that should be injected to a Kubernetes client.
ClusterClient stands for a cluster Clientset for the given member cluster.
ClusterRegisterOption represents the option for RegistryCluster.
ClusterScaleClient stands for a cluster ClientSet with scale client for the given member cluster.
DynamicClusterClient stands for a dynamic client for the given member cluster.
Options are the arguments for creating a new AsyncWorker.
Resource is a collection of compute resource.
SkippedResourceConfig represents the configuration that identifies the API resources should be skipped from propagating.

# Interfaces

AsyncWorker maintains a rate limiting queue and the items in the queue will be reconciled by a "ReconcileFunc".
QueueKey is the item key that stores in queue.

# Type aliases

ContextKey is the key of context.
ImplicitPriority describes the extent to which a ResourceSelector or a set of ResourceSelectors match resources.
KeyFunc knows how to make a key from an object.
ReconcileFunc knows how to consume items(key) from the queue.