v1alpha1

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/karmada-io/api/cluster +groupName=cluster.karmada.io

Index

Constants

View Source
const (
	// ResourceKindCluster is kind name of Cluster.
	ResourceKindCluster = "Cluster"
	// ResourceSingularCluster is singular name of Cluster.
	ResourceSingularCluster = "cluster"
	// ResourcePluralCluster is plural name of Cluster.
	ResourcePluralCluster = "clusters"
	// ResourceNamespaceScopedCluster indicates if Cluster is NamespaceScoped.
	ResourceNamespaceScopedCluster = false
)
View Source
const (
	// SecretTokenKey is the name of secret token key.
	SecretTokenKey = "token"
	// SecretCADataKey is the name of secret caBundle key.
	SecretCADataKey = "caBundle"
)
View Source
const (
	// TaintClusterUnscheduler will be added when cluster becomes unschedulable
	// and removed when cluster becomes schedulable.
	TaintClusterUnscheduler = "cluster.karmada.io/unschedulable"
	// TaintClusterNotReady will be added when cluster is not ready
	// and removed when cluster becomes ready.
	TaintClusterNotReady = "cluster.karmada.io/not-ready"
	// TaintClusterUnreachable will be added when cluster becomes unreachable
	// (corresponding to ClusterConditionReady status ConditionUnknown)
	// and removed when cluster becomes reachable (ClusterConditionReady status ConditionTrue).
	TaintClusterUnreachable = "cluster.karmada.io/unreachable"
	// TaintClusterTerminating will be added when cluster is terminating.
	TaintClusterTerminating = "cluster.karmada.io/terminating"

	// CacheSourceAnnotationKey is the annotation that added to a resource to
	// represent which cluster it cached from.
	CacheSourceAnnotationKey = "resource.karmada.io/cached-from-cluster"
)
View Source
const (
	// ClusterConditionReady means the cluster is healthy and ready to accept workloads.
	ClusterConditionReady = "Ready"
)

Define valid conditions of a member cluster.

View Source
const GroupName = "cluster.karmada.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Convert_cluster_APIEnablement_To_v1alpha1_APIEnablement added in v1.0.0

func Convert_cluster_APIEnablement_To_v1alpha1_APIEnablement(in *cluster.APIEnablement, out *APIEnablement, s conversion.Scope) error

Convert_cluster_APIEnablement_To_v1alpha1_APIEnablement is an autogenerated conversion function.

func Convert_cluster_APIResource_To_v1alpha1_APIResource added in v1.0.0

func Convert_cluster_APIResource_To_v1alpha1_APIResource(in *cluster.APIResource, out *APIResource, s conversion.Scope) error

Convert_cluster_APIResource_To_v1alpha1_APIResource is an autogenerated conversion function.

func Convert_cluster_AllocatableModeling_To_v1alpha1_AllocatableModeling added in v1.4.0

func Convert_cluster_AllocatableModeling_To_v1alpha1_AllocatableModeling(in *cluster.AllocatableModeling, out *AllocatableModeling, s conversion.Scope) error

Convert_cluster_AllocatableModeling_To_v1alpha1_AllocatableModeling is an autogenerated conversion function.

func Convert_cluster_ClusterList_To_v1alpha1_ClusterList added in v1.0.0

func Convert_cluster_ClusterList_To_v1alpha1_ClusterList(in *cluster.ClusterList, out *ClusterList, s conversion.Scope) error

Convert_cluster_ClusterList_To_v1alpha1_ClusterList is an autogenerated conversion function.

func Convert_cluster_ClusterProxyOptions_To_v1alpha1_ClusterProxyOptions added in v1.0.0

func Convert_cluster_ClusterProxyOptions_To_v1alpha1_ClusterProxyOptions(in *cluster.ClusterProxyOptions, out *ClusterProxyOptions, s conversion.Scope) error

Convert_cluster_ClusterProxyOptions_To_v1alpha1_ClusterProxyOptions is an autogenerated conversion function.

func Convert_cluster_ClusterSpec_To_v1alpha1_ClusterSpec added in v1.0.0

func Convert_cluster_ClusterSpec_To_v1alpha1_ClusterSpec(in *cluster.ClusterSpec, out *ClusterSpec, s conversion.Scope) error

Convert_cluster_ClusterSpec_To_v1alpha1_ClusterSpec is an autogenerated conversion function.

func Convert_cluster_ClusterStatus_To_v1alpha1_ClusterStatus added in v1.0.0

func Convert_cluster_ClusterStatus_To_v1alpha1_ClusterStatus(in *cluster.ClusterStatus, out *ClusterStatus, s conversion.Scope) error

Convert_cluster_ClusterStatus_To_v1alpha1_ClusterStatus is an autogenerated conversion function.

func Convert_cluster_Cluster_To_v1alpha1_Cluster added in v1.0.0

func Convert_cluster_Cluster_To_v1alpha1_Cluster(in *cluster.Cluster, out *Cluster, s conversion.Scope) error

Convert_cluster_Cluster_To_v1alpha1_Cluster is an autogenerated conversion function.

func Convert_cluster_LocalSecretReference_To_v1alpha1_LocalSecretReference added in v1.0.0

func Convert_cluster_LocalSecretReference_To_v1alpha1_LocalSecretReference(in *cluster.LocalSecretReference, out *LocalSecretReference, s conversion.Scope) error

Convert_cluster_LocalSecretReference_To_v1alpha1_LocalSecretReference is an autogenerated conversion function.

func Convert_cluster_NodeSummary_To_v1alpha1_NodeSummary added in v1.0.0

func Convert_cluster_NodeSummary_To_v1alpha1_NodeSummary(in *cluster.NodeSummary, out *NodeSummary, s conversion.Scope) error

Convert_cluster_NodeSummary_To_v1alpha1_NodeSummary is an autogenerated conversion function.

func Convert_cluster_ResourceModelRange_To_v1alpha1_ResourceModelRange added in v1.4.0

func Convert_cluster_ResourceModelRange_To_v1alpha1_ResourceModelRange(in *cluster.ResourceModelRange, out *ResourceModelRange, s conversion.Scope) error

Convert_cluster_ResourceModelRange_To_v1alpha1_ResourceModelRange is an autogenerated conversion function.

func Convert_cluster_ResourceModel_To_v1alpha1_ResourceModel added in v1.4.0

func Convert_cluster_ResourceModel_To_v1alpha1_ResourceModel(in *cluster.ResourceModel, out *ResourceModel, s conversion.Scope) error

Convert_cluster_ResourceModel_To_v1alpha1_ResourceModel is an autogenerated conversion function.

func Convert_cluster_ResourceSummary_To_v1alpha1_ResourceSummary added in v1.0.0

func Convert_cluster_ResourceSummary_To_v1alpha1_ResourceSummary(in *cluster.ResourceSummary, out *ResourceSummary, s conversion.Scope) error

Convert_cluster_ResourceSummary_To_v1alpha1_ResourceSummary is an autogenerated conversion function.

func Convert_url_Values_To_v1alpha1_ClusterProxyOptions added in v1.0.0

func Convert_url_Values_To_v1alpha1_ClusterProxyOptions(in *url.Values, out *ClusterProxyOptions, s conversion.Scope) error

Convert_url_Values_To_v1alpha1_ClusterProxyOptions is an autogenerated conversion function.

func Convert_v1alpha1_APIEnablement_To_cluster_APIEnablement added in v1.0.0

func Convert_v1alpha1_APIEnablement_To_cluster_APIEnablement(in *APIEnablement, out *cluster.APIEnablement, s conversion.Scope) error

Convert_v1alpha1_APIEnablement_To_cluster_APIEnablement is an autogenerated conversion function.

func Convert_v1alpha1_APIResource_To_cluster_APIResource added in v1.0.0

func Convert_v1alpha1_APIResource_To_cluster_APIResource(in *APIResource, out *cluster.APIResource, s conversion.Scope) error

Convert_v1alpha1_APIResource_To_cluster_APIResource is an autogenerated conversion function.

func Convert_v1alpha1_AllocatableModeling_To_cluster_AllocatableModeling added in v1.4.0

func Convert_v1alpha1_AllocatableModeling_To_cluster_AllocatableModeling(in *AllocatableModeling, out *cluster.AllocatableModeling, s conversion.Scope) error

Convert_v1alpha1_AllocatableModeling_To_cluster_AllocatableModeling is an autogenerated conversion function.

func Convert_v1alpha1_ClusterList_To_cluster_ClusterList added in v1.0.0

func Convert_v1alpha1_ClusterList_To_cluster_ClusterList(in *ClusterList, out *cluster.ClusterList, s conversion.Scope) error

Convert_v1alpha1_ClusterList_To_cluster_ClusterList is an autogenerated conversion function.

func Convert_v1alpha1_ClusterProxyOptions_To_cluster_ClusterProxyOptions added in v1.0.0

func Convert_v1alpha1_ClusterProxyOptions_To_cluster_ClusterProxyOptions(in *ClusterProxyOptions, out *cluster.ClusterProxyOptions, s conversion.Scope) error

Convert_v1alpha1_ClusterProxyOptions_To_cluster_ClusterProxyOptions is an autogenerated conversion function.

func Convert_v1alpha1_ClusterSpec_To_cluster_ClusterSpec added in v1.0.0

func Convert_v1alpha1_ClusterSpec_To_cluster_ClusterSpec(in *ClusterSpec, out *cluster.ClusterSpec, s conversion.Scope) error

Convert_v1alpha1_ClusterSpec_To_cluster_ClusterSpec is an autogenerated conversion function.

func Convert_v1alpha1_ClusterStatus_To_cluster_ClusterStatus added in v1.0.0

func Convert_v1alpha1_ClusterStatus_To_cluster_ClusterStatus(in *ClusterStatus, out *cluster.ClusterStatus, s conversion.Scope) error

Convert_v1alpha1_ClusterStatus_To_cluster_ClusterStatus is an autogenerated conversion function.

func Convert_v1alpha1_Cluster_To_cluster_Cluster added in v1.0.0

func Convert_v1alpha1_Cluster_To_cluster_Cluster(in *Cluster, out *cluster.Cluster, s conversion.Scope) error

Convert_v1alpha1_Cluster_To_cluster_Cluster is an autogenerated conversion function.

func Convert_v1alpha1_LocalSecretReference_To_cluster_LocalSecretReference added in v1.0.0

func Convert_v1alpha1_LocalSecretReference_To_cluster_LocalSecretReference(in *LocalSecretReference, out *cluster.LocalSecretReference, s conversion.Scope) error

Convert_v1alpha1_LocalSecretReference_To_cluster_LocalSecretReference is an autogenerated conversion function.

func Convert_v1alpha1_NodeSummary_To_cluster_NodeSummary added in v1.0.0

func Convert_v1alpha1_NodeSummary_To_cluster_NodeSummary(in *NodeSummary, out *cluster.NodeSummary, s conversion.Scope) error

Convert_v1alpha1_NodeSummary_To_cluster_NodeSummary is an autogenerated conversion function.

func Convert_v1alpha1_ResourceModelRange_To_cluster_ResourceModelRange added in v1.4.0

func Convert_v1alpha1_ResourceModelRange_To_cluster_ResourceModelRange(in *ResourceModelRange, out *cluster.ResourceModelRange, s conversion.Scope) error

Convert_v1alpha1_ResourceModelRange_To_cluster_ResourceModelRange is an autogenerated conversion function.

func Convert_v1alpha1_ResourceModel_To_cluster_ResourceModel added in v1.4.0

func Convert_v1alpha1_ResourceModel_To_cluster_ResourceModel(in *ResourceModel, out *cluster.ResourceModel, s conversion.Scope) error

Convert_v1alpha1_ResourceModel_To_cluster_ResourceModel is an autogenerated conversion function.

func Convert_v1alpha1_ResourceSummary_To_cluster_ResourceSummary added in v1.0.0

func Convert_v1alpha1_ResourceSummary_To_cluster_ResourceSummary(in *ResourceSummary, out *cluster.ResourceSummary, s conversion.Scope) error

Convert_v1alpha1_ResourceSummary_To_cluster_ResourceSummary is an autogenerated conversion function.

func RegisterConversions added in v1.0.0

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

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

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

func (in *APIResource) DeepCopy() *APIResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResource.

func (*APIResource) DeepCopyInto

func (in *APIResource) DeepCopyInto(out *APIResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AllocatableModeling added in v1.4.0

type AllocatableModeling struct {
	// Grade is the index of ResourceModel.
	// +required
	Grade uint `json:"grade"`

	// Count is the number of nodes that own the resources delineated by this modeling.
	// +required
	Count int `json:"count"`
}

AllocatableModeling represents the number of nodes in which allocatable resources in a specific resource model grade. E.g. AllocatableModeling{Grade: 2, Count: 10} means 10 nodes belong to resource model in grade 2.

func (*AllocatableModeling) DeepCopy added in v1.4.0

func (in *AllocatableModeling) DeepCopy() *AllocatableModeling

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatableModeling.

func (*AllocatableModeling) DeepCopyInto added in v1.4.0

func (in *AllocatableModeling) DeepCopyInto(out *AllocatableModeling)

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

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Cluster) String added in v1.0.0

func (c *Cluster) String() string

String returns a well-formatted string for the Cluster 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 ClusterProxyOptions added in v1.0.0

type ClusterProxyOptions struct {
	metav1.TypeMeta `json:",inline"`

	// Path is the part of URLs that include clusters, suffixes,
	// and parameters to use for the current proxy request to cluster.
	// For example, the whole request URL is
	// http://localhost/apis/cluster.karmada.io/v1alpha1/cluster/{clustername}/proxy/api/v1/nodes
	// Path is api/v1/nodes
	// +optional
	Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
}

ClusterProxyOptions is the query options to a Cluster's proxy call.

func (*ClusterProxyOptions) DeepCopy added in v1.0.0

func (in *ClusterProxyOptions) DeepCopy() *ClusterProxyOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProxyOptions.

func (*ClusterProxyOptions) DeepCopyInto added in v1.0.0

func (in *ClusterProxyOptions) DeepCopyInto(out *ClusterProxyOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterProxyOptions) DeepCopyObject added in v1.0.0

func (in *ClusterProxyOptions) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterSpec

type ClusterSpec struct {
	// ID is the unique identifier for the cluster.
	// It is different from the object uid(.metadata.uid) and typically collected automatically
	// from member cluster during the progress of registration.
	//
	// The value is collected in order:
	// 1. If the registering cluster enabled ClusterProperty API and defined the cluster ID by
	//   creating a ClusterProperty object with name 'cluster.clusterset.k8s.io', Karmada would
	//   take the defined value in the ClusterProperty object.
	//   See https://github.com/kubernetes-sigs/about-api for more details about ClusterProperty API.
	// 2. Take the uid of 'kube-system' namespace on the registering cluster.
	//
	// Please don't update this value unless you know what you are doing, because
	// it will/may be used to :
	// - uniquely identify the clusters within the Karmada system.
	// - compose the DNS name of multi-cluster services.
	//
	// +optional
	// +kubebuilder:validation:Maxlength=128000
	ID string `json:"id,omitempty"`

	// 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"`

	// ImpersonatorSecretRef represents the secret contains the token of impersonator.
	// The secret should hold credentials as follows:
	// - secret.data.token
	// +optional
	ImpersonatorSecretRef *LocalSecretReference `json:"impersonatorSecretRef,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"`

	// ProxyHeader is the HTTP header required by proxy server.
	// The key in the key-value pair is HTTP header key and value is the associated header payloads.
	// For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').
	// +optional
	ProxyHeader map[string]string `json:"proxyHeader,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.
	// Deprecated: This filed was never been used by Karmada, and it will not be
	// removed from v1alpha1 for backward compatibility, use Zones instead.
	// +optional
	Zone string `json:"zone,omitempty"`

	// Zones represents the failure zones(also called availability zones) of the
	// member cluster. The zones are presented as a slice to support the case
	// that cluster runs across multiple failure zones.
	// Refer https://kubernetes.io/docs/setup/best-practices/multiple-zones/ for
	// more details about running Kubernetes in multiple zones.
	// +optional
	Zones []string `json:"zones,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"`

	// ResourceModels is the list of resource modeling in this cluster. Each modeling quota can be customized by the user.
	// Modeling name must be one of the following: cpu, memory, storage, ephemeral-storage.
	// If the user does not define the modeling name and modeling quota, it will be the default model.
	// The default model grade from 0 to 8.
	// When grade = 0 or grade = 1, the default model's cpu quota and memory quota is a fix value.
	// When grade greater than or equal to 2, each default model's cpu quota is [2^(grade-1), 2^grade), 2 <= grade <= 7
	// Each default model's memory quota is [2^(grade + 2), 2^(grade + 3)), 2 <= grade <= 7
	// E.g. grade 0 likes this:
	// - grade: 0
	//   ranges:
	//   - name: "cpu"
	//     min: 0 C
	//     max: 1 C
	//   - name: "memory"
	//     min: 0 GB
	//     max: 4 GB
	//
	// - grade: 1
	//   ranges:
	//   - name: "cpu"
	//     min: 1 C
	//     max: 2 C
	//   - name: "memory"
	//     min: 4 GB
	//     max: 16 GB
	//
	// - grade: 2
	//   ranges:
	//   - name: "cpu"
	//     min: 2 C
	//     max: 4 C
	//   - name: "memory"
	//     min: 16 GB
	//     max: 32 GB
	//
	// - grade: 7
	//   range:
	//   - name: "cpu"
	//     min: 64 C
	//     max: 128 C
	//   - name: "memory"
	//     min: 512 GB
	//     max: 1024 GB
	//
	// grade 8, the last one likes below. No matter what Max value you pass,
	// the meaning of Max value in this grade is infinite. You can pass any number greater than Min value.
	// - grade: 8
	//   range:
	//   - name: "cpu"
	//     min: 128 C
	//     max: MAXINT
	//   - name: "memory"
	//     min: 1024 GB
	//     max: MAXINT
	//
	// +optional
	ResourceModels []ResourceModel `json:"resourceModels,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"`

	// RemedyActions represents the remedy actions that needs to be performed
	// on the cluster.
	// +optional
	RemedyActions []string `json:"remedyActions,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

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

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 ResourceModel added in v1.4.0

type ResourceModel struct {
	// Grade is the index for the resource modeling.
	// +required
	Grade uint `json:"grade"`

	// Ranges describes the resource quota ranges.
	// +required
	Ranges []ResourceModelRange `json:"ranges"`
}

ResourceModel describes the modeling that you want to statistics.

func (*ResourceModel) DeepCopy added in v1.4.0

func (in *ResourceModel) DeepCopy() *ResourceModel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModel.

func (*ResourceModel) DeepCopyInto added in v1.4.0

func (in *ResourceModel) DeepCopyInto(out *ResourceModel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceModelRange added in v1.4.0

type ResourceModelRange struct {
	// Name is the name for the resource that you want to categorize.
	// +required
	Name corev1.ResourceName `json:"name"`

	// Min is the minimum amount of this resource represented by resource name.
	// Note: The Min value of first grade(usually 0) always acts as zero.
	// E.g. [1,2) equal to [0,2).
	// +required
	Min resource.Quantity `json:"min"`

	// Max is the maximum amount of this resource represented by resource name.
	// Special Instructions, for the last ResourceModelRange, which no matter what Max value you pass,
	// the meaning is infinite. Because for the last item,
	// any ResourceModelRange's quota larger than Min will be classified to the last one.
	// Of course, the value of the Max field is always greater than the value of the Min field.
	// It should be true in any case.
	// +required
	Max resource.Quantity `json:"max"`
}

ResourceModelRange describes the detail of each modeling quota that ranges from min to max. Please pay attention, by default, the value of min can be inclusive, and the value of max cannot be inclusive. E.g. in an interval, min = 2, max =10 is set, which means the interval [2,10). This rule ensure that all intervals have the same meaning. If the last interval is infinite, it is definitely unreachable. Therefore, we define the right interval as the open interval. For a valid interval, the value on the right is greater than the value on the left, in other words, max must be greater than min. It is strongly recommended that the [Min, Max) of all ResourceModelRanges can make a continuous interval.

func (*ResourceModelRange) DeepCopy added in v1.4.0

func (in *ResourceModelRange) DeepCopy() *ResourceModelRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModelRange.

func (*ResourceModelRange) DeepCopyInto added in v1.4.0

func (in *ResourceModelRange) DeepCopyInto(out *ResourceModelRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceSummary

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"`

	// AllocatableModelings represents the statistical resource modeling.
	// +optional
	AllocatableModelings []AllocatableModeling `json:"allocatableModelings,omitempty"`
}

ResourceSummary represents the summary of resources in the member cluster.

func (*ResourceSummary) DeepCopy

func (in *ResourceSummary) DeepCopy() *ResourceSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSummary.

func (*ResourceSummary) DeepCopyInto

func (in *ResourceSummary) DeepCopyInto(out *ResourceSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL