cluster

package
v0.0.0-...-8ed77bd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ObjectMeta         types.ObjectMeta          `json:"objectMeta"`
	TypeMeta           types.TypeMeta            `json:"typeMeta"`
	Ready              metav1.ConditionStatus    `json:"ready"`
	KubernetesVersion  string                    `json:"kubernetesVersion,omitempty"`
	SyncMode           v1alpha1.ClusterSyncMode  `json:"syncMode"`
	NodeSummary        *v1alpha1.NodeSummary     `json:"nodeSummary,omitempty"`
	AllocatedResources ClusterAllocatedResources `json:"allocatedResources"`
}

type ClusterAllocatedResources

type ClusterAllocatedResources struct {
	// CPUCapacity is specified node CPU capacity in milicores.
	CPUCapacity int64   `json:"cpuCapacity"`
	CPUFraction float64 `json:"cpuFraction"`

	// MemoryCapacity is specified node memory capacity in bytes.
	MemoryCapacity int64   `json:"memoryCapacity"`
	MemoryFraction float64 `json:"memoryFraction"`

	// AllocatedPods in number of currently allocated pods on the node.
	AllocatedPods int64 `json:"allocatedPods"`

	// PodCapacity is maximum number of pods, that can be allocated on the node.
	PodCapacity int64 `json:"podCapacity"`

	// PodFraction is a fraction of pods, that can be allocated on given node.
	PodFraction float64 `json:"podFraction"`
}

type ClusterCell

type ClusterCell v1alpha1.Cluster

func (ClusterCell) GetProperty

type ClusterDetail

type ClusterDetail struct {
	Cluster `json:",inline"`
	Taints  []corev1.Taint `json:"taints,omitempty"`
}

func GetClusterDetail

func GetClusterDetail(client karmadaclientset.Interface, clusterName string) (*ClusterDetail, error)

GetNodeDetail gets node details.

type ClusterList

type ClusterList struct {
	ListMeta types.ListMeta `json:"listMeta"`
	Clusters []Cluster      `json:"clusters"`
	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

ClusterList contains a list of clusters.

func GetClusterList

func GetClusterList(client karmadaclientset.Interface, dsQuery *dataselect.DataSelectQuery) (*ClusterList, error)

GetNodeList returns a list of all Nodes in the cluster.

Jump to

Keyboard shortcuts

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