Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +groupName=cluster.karmada.io
Index ¶
Constants ¶
const ( // EventReasonCreateExecutionSpaceFailed indicates that create execution space failed. EventReasonCreateExecutionSpaceFailed = "CreateExecutionSpaceFailed" // EventReasonRemoveExecutionSpaceFailed indicates that remove execution space failed. EventReasonRemoveExecutionSpaceFailed = "RemoveExecutionSpaceFailed" )
Define events for execute space objects.
const ( // SecretTokenKey is the name of secret token key. SecretTokenKey = "token" // SecretCADataKey is the name of secret caBundle key. SecretCADataKey = "caBundle" )
const (
// ClusterConditionReady means the cluster is healthy and ready to accept workloads.
ClusterConditionReady = "Ready"
)
Define valid conditions of a member cluster.
const GroupName = "cluster.karmada.io"
GroupName specifies the group name used to register the objects.
const ( // TaintClusterUnscheduler will be added when cluster becomes unschedulable // and removed when node becomes scheduable. TaintClusterUnscheduler = "cluster.karmada.io/unschedulable" )
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type APIEnablement ¶
type APIEnablement struct { // GroupVersion is the group and version this APIEnablement is for. GroupVersion string `json:"groupVersion"` // Resources is a list of APIResource. // +optional Resources []APIResource `json:"resources,omitempty"` }
APIEnablement is a list of API resource, it is used to expose the name of the resources supported in a specific group and version.
func (*APIEnablement) DeepCopy ¶
func (in *APIEnablement) DeepCopy() *APIEnablement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEnablement.
func (*APIEnablement) DeepCopyInto ¶
func (in *APIEnablement) DeepCopyInto(out *APIEnablement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type APIResource ¶ added in v0.7.0
type APIResource struct { // Name is the plural name of the resource. // +required Name string `json:"name"` // Kind is the kind for the resource (e.g. 'Deployment' is the kind for resource 'deployments') // +required Kind string `json:"kind"` }
APIResource specifies the name and kind names for the resource.
func (*APIResource) DeepCopy ¶ added in v0.7.0
func (in *APIResource) DeepCopy() *APIResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResource.
func (*APIResource) DeepCopyInto ¶ added in v0.7.0
func (in *APIResource) DeepCopyInto(out *APIResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec represents the specification of the desired behavior of member cluster. Spec ClusterSpec `json:"spec"` // Status represents the status of member cluster. // +optional Status ClusterStatus `json:"status,omitempty"` }
Cluster represents the desire state and status of a member cluster.
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items holds a list of Cluster. Items []Cluster `json:"items"` }
ClusterList contains a list of member cluster
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSpec ¶
type ClusterSpec struct { // SyncMode describes how a cluster sync resources from karmada control plane. // +kubebuilder:validation:Enum=Push;Pull // +required SyncMode ClusterSyncMode `json:"syncMode"` // The API endpoint of the member cluster. This can be a hostname, // hostname:port, IP or IP:port. // +optional APIEndpoint string `json:"apiEndpoint,omitempty"` // SecretRef represents the secret contains mandatory credentials to access the member cluster. // The secret should hold credentials as follows: // - secret.data.token // - secret.data.caBundle // +optional SecretRef *LocalSecretReference `json:"secretRef,omitempty"` // InsecureSkipTLSVerification indicates that the karmada control plane should not confirm the validity of the serving // certificate of the cluster it is connecting to. This will make the HTTPS connection between the karmada control // plane and the member cluster insecure. // Defaults to false. // +optional InsecureSkipTLSVerification bool `json:"insecureSkipTLSVerification,omitempty"` // ProxyURL is the proxy URL for the cluster. // If not empty, the karmada control plane will use this proxy to talk to the cluster. // More details please refer to: https://github.com/kubernetes/client-go/issues/351 // +optional ProxyURL string `json:"proxyURL,omitempty"` // Provider represents the cloud provider name of the member cluster. // +optional Provider string `json:"provider,omitempty"` // Region represents the region of the member cluster locate in. // +optional Region string `json:"region,omitempty"` // Zone represents the zone of the member cluster locate in. // +optional Zone string `json:"zone,omitempty"` // Taints attached to the member cluster. // Taints on the cluster have the "effect" on // any resource that does not tolerate the Taint. // +optional Taints []corev1.Taint `json:"taints,omitempty"` }
ClusterSpec defines the desired state of a member cluster.
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct { // KubernetesVersion represents version of the member cluster. // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` // APIEnablements represents the list of APIs installed in the member cluster. // +optional APIEnablements []APIEnablement `json:"apiEnablements,omitempty"` // Conditions is an array of current cluster conditions. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // NodeSummary represents the summary of nodes status in the member cluster. // +optional NodeSummary *NodeSummary `json:"nodeSummary,omitempty"` // ResourceSummary represents the summary of resources in the member cluster. // +optional ResourceSummary *ResourceSummary `json:"resourceSummary,omitempty"` }
ClusterStatus contains information about the current status of a cluster updated periodically by cluster controller.
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSyncMode ¶ added in v0.5.0
type ClusterSyncMode string
ClusterSyncMode describes the mode of synchronization between member cluster and karmada control plane.
const ( // Push means that the controller on the karmada control plane will in charge of synchronization. // The controller watches resources change on karmada control plane then pushes them to member cluster. Push ClusterSyncMode = "Push" // Pull means that the controller running on the member cluster will in charge of synchronization. // The controller, as well known as 'agent', watches resources change on karmada control plane then fetches them // and applies locally on the member cluster. Pull ClusterSyncMode = "Pull" )
type LocalSecretReference ¶
type LocalSecretReference struct { // Namespace is the namespace for the resource being referenced. Namespace string `json:"namespace"` // Name is the name of resource being referenced. Name string `json:"name"` }
LocalSecretReference is a reference to a secret within the enclosing namespace.
func (*LocalSecretReference) DeepCopy ¶
func (in *LocalSecretReference) DeepCopy() *LocalSecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference.
func (*LocalSecretReference) DeepCopyInto ¶
func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSummary ¶
type NodeSummary struct { // TotalNum is the total number of nodes in the cluster. // +optional TotalNum int32 `json:"totalNum,omitempty"` // ReadyNum is the number of ready nodes in the cluster. // +optional ReadyNum int32 `json:"readyNum,omitempty"` }
NodeSummary represents the summary of nodes status in a specific cluster.
func (*NodeSummary) DeepCopy ¶
func (in *NodeSummary) DeepCopy() *NodeSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSummary.
func (*NodeSummary) DeepCopyInto ¶
func (in *NodeSummary) DeepCopyInto(out *NodeSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSummary ¶ added in v0.7.0
type ResourceSummary struct { // Allocatable represents the resources of a cluster that are available for scheduling. // Total amount of allocatable resources on all nodes. // +optional Allocatable corev1.ResourceList `json:"allocatable,omitempty"` // Allocating represents the resources of a cluster that are pending for scheduling. // Total amount of required resources of all Pods that are waiting for scheduling. // +optional Allocating corev1.ResourceList `json:"allocating,omitempty"` // Allocated represents the resources of a cluster that have been scheduled. // Total amount of required resources of all Pods that have been scheduled to nodes. // +optional Allocated corev1.ResourceList `json:"allocated,omitempty"` }
ResourceSummary represents the summary of resources in the member cluster.
func (*ResourceSummary) DeepCopy ¶ added in v0.7.0
func (in *ResourceSummary) DeepCopy() *ResourceSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSummary.
func (*ResourceSummary) DeepCopyInto ¶ added in v0.7.0
func (in *ResourceSummary) DeepCopyInto(out *ResourceSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.