Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the multicluster.x-k8s.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=multicluster.x-k8s.io
Index ¶
Constants ¶
const ( // LabelClusterManagerKey is used to indicate the name of the cluster manager that a ClusterProfile belongs to. // The value of the label MUST be the same as the name of the cluster manager. // The purpose of this label is to make filter clusters from different cluster managers easier. LabelClusterManagerKey = "x-k8s.io/cluster-manager" // LabelClusterSetKey is used on a namespace to indicate the clusterset that a ClusterProfile belongs to. // If a cluster inventory represents a ClusterSet, // all its ClusterProfile objects MUST be part of the same clusterSet and namespace must be used as the grouping mechanism. // The namespace MUST have LabelClusterSet and the value as the name of the clusterSet. LabelClusterSetKey = "multicluster.x-k8s.io/clusterset" )
const ( // ClusterConditionControlPlaneHealthy means the controlplane of the cluster is in a healthy state. // If the control plane is not healthy, then the status condition will be "False". ClusterConditionControlPlaneHealthy string = "ControlPlaneHealthy" )
Predefined healthy conditions indicate the cluster is in a good state or not. The condition and states conforms to metav1.Condition format. States are True/False/Unknown.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "multicluster.x-k8s.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // SchemeGroupVersion generated code relies on this name // Deprecated SchemeGroupVersion = GroupVersion // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED
Types ¶
type ClusterManager ¶
type ClusterManager struct { // Name defines the name of the cluster manager // +required Name string `json:"name"` }
ClusterManager defines which cluster manager owns this ClusterProfile resource. A cluster manager is a system that centralizes the administration, coordination, and operation of multiple clusters across various infrastructures. Examples of cluster managers include Open Cluster Management, AZ Fleet, Karmada, and Clusternet.
This field is immutable. It's recommended that each cluster manager instance should set a different values to this field. In addition, it's recommended that a predefined label with key "x-k8s.io/cluster-manager" should be added by the cluster manager upon creation. See constant LabelClusterManagerKey. The value of the label should be the same as the name of the cluster manager. The purpose of this label is to make filter clusters from different cluster managers easier.
+kubebuilder:validation:XValidation:rule="self == oldSelf",message="ClusterManager is immutable"
func (*ClusterManager) DeepCopy ¶
func (in *ClusterManager) DeepCopy() *ClusterManager
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManager.
func (*ClusterManager) DeepCopyInto ¶
func (in *ClusterManager) DeepCopyInto(out *ClusterManager)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterProfile ¶
type ClusterProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // +required Spec ClusterProfileSpec `json:"spec"` // +optional Status ClusterProfileStatus `json:"status,omitempty"` }
ClusterProfile represents a single cluster in a multi-cluster deployment.
func (*ClusterProfile) DeepCopy ¶
func (in *ClusterProfile) DeepCopy() *ClusterProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfile.
func (*ClusterProfile) DeepCopyInto ¶
func (in *ClusterProfile) DeepCopyInto(out *ClusterProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterProfile) DeepCopyObject ¶
func (in *ClusterProfile) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterProfileList ¶
type ClusterProfileList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterProfile `json:"items"` }
ClusterProfileList contains a list of ClusterProfile.
func (*ClusterProfileList) DeepCopy ¶
func (in *ClusterProfileList) DeepCopy() *ClusterProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileList.
func (*ClusterProfileList) DeepCopyInto ¶
func (in *ClusterProfileList) DeepCopyInto(out *ClusterProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterProfileList) DeepCopyObject ¶
func (in *ClusterProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterProfileSpec ¶
type ClusterProfileSpec struct { // DisplayName defines a human-readable name of the ClusterProfile // +optional DisplayName string `json:"displayName,omitempty"` // ClusterManager defines which cluster manager owns this ClusterProfile resource // +required ClusterManager ClusterManager `json:"clusterManager"` }
ClusterProfileSpec defines the desired state of ClusterProfile.
func (*ClusterProfileSpec) DeepCopy ¶
func (in *ClusterProfileSpec) DeepCopy() *ClusterProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileSpec.
func (*ClusterProfileSpec) DeepCopyInto ¶
func (in *ClusterProfileSpec) DeepCopyInto(out *ClusterProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterProfileStatus ¶
type ClusterProfileStatus struct { // Conditions contains the different condition statuses for this cluster. // +optional Conditions []metav1.Condition `json:"conditions"` // Version defines the version information of the cluster. // +optional Version ClusterVersion `json:"version,omitempty"` // Properties defines name/value pairs to represent properties of a cluster. // It could be a collection of ClusterProperty (KEP-2149) resources, // but could also be info based on other implementations. // The names of the properties can be predefined names from ClusterProperty resources // and is allowed to be customized by different cluster managers. // +optional Properties []Property `json:"properties,omitempty"` }
ClusterProfileStatus defines the observed state of ClusterProfile.
func (*ClusterProfileStatus) DeepCopy ¶
func (in *ClusterProfileStatus) DeepCopy() *ClusterProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileStatus.
func (*ClusterProfileStatus) DeepCopyInto ¶
func (in *ClusterProfileStatus) DeepCopyInto(out *ClusterProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVersion ¶
type ClusterVersion struct { // Kubernetes is the kubernetes version of the cluster. // +optional Kubernetes string `json:"kubernetes,omitempty"` }
ClusterVersion represents version information about the cluster.
func (*ClusterVersion) DeepCopy ¶
func (in *ClusterVersion) DeepCopy() *ClusterVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersion.
func (*ClusterVersion) DeepCopyInto ¶
func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Property ¶
type Property struct { // Name is the name of a property resource on cluster. It's a well-known // or customized name to identify the property. // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:MinLength=1 // +required Name string `json:"name"` // Value is a property-dependent string // +kubebuilder:validation:MaxLength=1024 // +kubebuilder:validation:MinLength=1 // +required Value string `json:"value"` }
Property defines a name/value pair to represent a property of a cluster. It could be a ClusterProperty (KEP-2149) resource, but could also be info based on other implementations. The name of the property can be predefined name from a ClusterProperty resource and is allowed to be customized by different cluster managers. This property can store various configurable details and metrics of a cluster, which may include information such as the number of nodes, total and free CPU, and total and free memory, among other potential attributes.
func (*Property) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Property.
func (*Property) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.