Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Index ¶
Constants ¶
const (
// ClusterConditionReady means the cluster is healthy and ready to accept workloads.
ClusterConditionReady = "Ready"
)
Define valid conditions of a member cluster.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: membercluster.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
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 contains the name of the resources. Resources []string `json:"resources"` }
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 ClusterManageMode ¶
type ClusterManageMode string
ClusterManageMode presents member clusters working mode.
const ( // Delegation represents a member cluster will be managed directly by control plane. Delegation ClusterManageMode = "Delegation" // SelfManagement represents a member cluster will be managed by itself. SelfManagement ClusterManageMode = "SelfManagement" )
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 MemberCluster ¶
type MemberCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec represents the specification of the desired behavior of member cluster. Spec MemberClusterSpec `json:"spec"` // Status represents the status of member cluster. // +optional Status MemberClusterStatus `json:"status,omitempty"` }
MemberCluster represents the desire state and status of a member cluster.
func (*MemberCluster) DeepCopy ¶
func (in *MemberCluster) DeepCopy() *MemberCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberCluster.
func (*MemberCluster) DeepCopyInto ¶
func (in *MemberCluster) DeepCopyInto(out *MemberCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MemberCluster) DeepCopyObject ¶
func (in *MemberCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MemberClusterList ¶
type MemberClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items holds a list of MemberCluster. Items []MemberCluster `json:"items"` }
MemberClusterList contains a list of member cluster
func (*MemberClusterList) DeepCopy ¶
func (in *MemberClusterList) DeepCopy() *MemberClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberClusterList.
func (*MemberClusterList) DeepCopyInto ¶
func (in *MemberClusterList) DeepCopyInto(out *MemberClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MemberClusterList) DeepCopyObject ¶
func (in *MemberClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MemberClusterSpec ¶
type MemberClusterSpec struct { // ManageMode specifies the relationship between control plane and member cluster, // the mode determines how to reach each other. // +optional ManageMode ClusterManageMode `json:"manageMode,omitempty"` // Accepted represents if the member cluster has been accepted by control plane. // Default value is false. // If member cluster working in 'Delegation' mode, this always be true. // If member cluster working in 'SelfManagement' mode, this will turn to true only after administrator // accepted the request from member cluster. // +optional Accepted bool `json:"accepted,omitempty"` // 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"` // 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"` }
MemberClusterSpec defines the desired state of a member cluster.
func (*MemberClusterSpec) DeepCopy ¶
func (in *MemberClusterSpec) DeepCopy() *MemberClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberClusterSpec.
func (*MemberClusterSpec) DeepCopyInto ¶
func (in *MemberClusterSpec) DeepCopyInto(out *MemberClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemberClusterStatus ¶
type MemberClusterStatus 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"` }
MemberClusterStatus contains information about the current status of a cluster updated periodically by cluster controller.
func (*MemberClusterStatus) DeepCopy ¶
func (in *MemberClusterStatus) DeepCopy() *MemberClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberClusterStatus.
func (*MemberClusterStatus) DeepCopyInto ¶
func (in *MemberClusterStatus) DeepCopyInto(out *MemberClusterStatus)
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. TotalNum int `json:"totalNum,omitempty"` // ReadyNum is the number of ready nodes in the cluster. ReadyNum int `json:"readyNum,omitempty"` // Allocatable represents the allocatable resources across all nodes. Allocatable corev1.ResourceList `json:"allocatable,omitempty"` // Used represents the resources have been used across all nodes. Used corev1.ResourceList `json:"used,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.