Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Cluster ¶
type Cluster struct { Nodes []v1.Node Pods []v1.Pod Status v1alpha1.StatusCluster Spec host.ProviderSpec }
Cluster represents the control plane and tenant cluster data received for performing health calculations
type ClusterStatus ¶
type ClusterStatus struct { Health key.Health `json:"health"` State key.LifecycleState `json:"state"` }
ClusterStatus holds data about the overall health/status of a cluster.
type Config ¶
type Config struct {
Logger micrologger.Logger
}
Config represents the configuration used to create a new health service.
type NodeStatus ¶
type NodeStatus struct { Identity NodeStatusIdentity `json:"identity"` MachineResources NodeStatusMachineResources `json:"machine"` Ready bool `json:"ready"` Health key.Health `json:"health"` RequestTotals NodeStatusComputeResources `json:"request_totals"` LimitTotals NodeStatusComputeResources `json:"limit_totals"` }
NodeStatus represents the health status of a single node in a cluster.
type NodeStatusComputeResources ¶
type NodeStatusComputeResources struct { CPU int64 `json:"cpu"` MemoryBytes int64 `json:"memory_bytes"` }
NodeStatusComputeResources holds data about available or requested compute resources.
type NodeStatusIdentity ¶
type NodeStatusIdentity struct { Name string `json:"name"` KubeletVersion string `json:"kubelet_version"` OperatorVersion string `json:"operator_version"` Role string `json:"role"` IP string `json:"ip"` Hostname string `json:"hostname"` InstanceType string `json:"instance_type"` AvailabilityRegion string `json:"availability_region"` AvailabilityZone string `json:"availability_zone"` }
NodeStatusIdentity holds data about the identity of a node which is generally static.
type NodeStatusMachineResources ¶
type NodeStatusMachineResources struct { CPUCount int64 `json:"cpu_count"` MemoryCapacityBytes int64 `json:"memory_capacity_bytes"` MemoryAllocatableBytes int64 `json:"memory_allocatable_bytes"` EphemeralStorageCap int64 `json:"ephemeral_storage_capacity_bytes"` EphemeralStorageAvail int64 `json:"ephemeral_storage_allocatable_bytes"` AttachableVolumesAllocatableCount int64 `json:"attachable_volume_allocatable_count"` AttachableVolumesCapacityCount int64 `json:"attachable_volume_capacity_count"` DockerVolumeSizeGB int64 `json:"docker_volume_size_gb"` AttachedVolumesCount int64 `json:"attached_volumes_count"` }
NodeStatusMachineResources holds data about the status of storage on a cluster node.
type Response ¶
type Response struct { Cluster ClusterStatus `json:"cluster"` Nodes []NodeStatus `json:"nodes"` }
Response holds the data returned from the health searcher endpoint.