Documentation
¶
Index ¶
- Constants
- func CmpNodeInfoDescending(a, b NodeInfo) int
- func ContainsPod(podUID string, podInfos []PodInfo) bool
- func CumulatePodRequests(pod *corev1.Pod) corev1.ResourceList
- func IsEqualNodeInfo(a, b NodeInfo) bool
- func IsEqualPodInfo(a, b PodInfo) bool
- func IsEqualQuantity(a, b resource.Quantity) bool
- func IsEqualTaint(a, b corev1.Taint) bool
- func IsResourceListEqual(r1 corev1.ResourceList, r2 corev1.ResourceList) bool
- func ResourcesAsString(resources corev1.ResourceList) string
- func SumResources(resources []corev1.ResourceList) corev1.ResourceList
- type Analysis
- type Analyzer
- type CASettingsInfo
- type EventCASettingsAssoc
- type EventInfo
- type EventNodeGroupAssoc
- type NodeGroupInfo
- type NodeInfo
- type PodInfo
- type PodInfoKey
- type PodScheduleStatus
- type Recorder
- type RecorderParams
- type Reporter
- type ReporterParams
- type Scenario
- type WorkerPool
Constants ¶
View Source
const PodScheduleCommited = 1
View Source
const PodScheduleNominated = -1
View Source
const PodSchedulePending = -2
View Source
const PodUnscheduled = 0
Variables ¶
This section is empty.
Functions ¶
func CmpNodeInfoDescending ¶
func ContainsPod ¶
func CumulatePodRequests ¶
func CumulatePodRequests(pod *corev1.Pod) corev1.ResourceList
func IsEqualNodeInfo ¶
func IsEqualPodInfo ¶
func IsEqualQuantity ¶
func IsEqualTaint ¶
func IsResourceListEqual ¶
func IsResourceListEqual(r1 corev1.ResourceList, r2 corev1.ResourceList) bool
func ResourcesAsString ¶
func ResourcesAsString(resources corev1.ResourceList) string
func SumResources ¶
func SumResources(resources []corev1.ResourceList) corev1.ResourceList
Types ¶
type CASettingsInfo ¶
type CASettingsInfo struct {
Expander string
MaxNodesTotal int `db:"MaxNodesTotal"`
// Priorities is the value of the `priorities` key in the `cluster-autoscaler-priority-expander` config map.
// See https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md#configuration
Priorities string
Hash string //primary key
}
func (CASettingsInfo) GetHash ¶
func (ca CASettingsInfo) GetHash() string
type EventCASettingsAssoc ¶
type EventInfo ¶
type EventInfo struct {
UID string `db:"UID"`
EventTime time.Time `db:"EventTime"`
ReportingController string `db:"ReportingController"`
Reason string `db:"Reason"`
Message string `db:"Message"`
InvolvedObjectKind string `db:"InvolvedObjectKind"`
InvolvedObjectName string `db:"InvolvedObjectName"`
InvolvedObjectNamespace string `db:"InvolvedObjectNamespace"`
InvolvedObjectUID string `db:"InvolvedObjectUID"`
}
type EventNodeGroupAssoc ¶
type EventNodeGroupAssoc struct {
EventUID string `db:"EventUID"`
NodeGroupRowID int64 `db:"NodeGroupRowID"`
NodeGroupHash string `db:"NodeGroupHash"`
}
func (EventNodeGroupAssoc) String ¶
func (a EventNodeGroupAssoc) String() string
type NodeGroupInfo ¶
type NodeGroupInfo struct {
RowID int64 `db:"RowID"` // give db tags only for mixed case fields
Name string
CreationTimestamp time.Time `db:"CreationTimestamp"`
CurrentSize int `db:"CurrentSize"`
TargetSize int `db:"TargetSize"`
MinSize int `db:"MinSize"`
MaxSize int `db:"MaxSize"`
Zone string
MachineType string `db:"MachineType"`
Architecture string
ShootGeneration int64 `db:"ShootGeneration"`
MCDGeneration int64 `db:"MCDGeneration"`
PoolName string `db:"PoolName"`
PoolMin int `db:"PoolMin"`
PoolMax int `db:"PoolMax"`
Hash string
}
func (NodeGroupInfo) GetHash ¶
func (ng NodeGroupInfo) GetHash() string
func (NodeGroupInfo) String ¶
func (ng NodeGroupInfo) String() string
type NodeInfo ¶
type NodeInfo struct {
Name string
Namespace string
CreationTimestamp time.Time
ProviderID string
AllocatableVolumes int
Labels map[string]string
Taints []corev1.Taint
Allocatable corev1.ResourceList
Capacity corev1.ResourceList
Hash string
}
NodeInfo represents snapshot information captured about an active k8s Node in the cluster at a particular moment in time. The snapshot time is captured in CreationTimestamp. A NodeInfo snapshot is only captured if there is a change in the properties excepting for DeletionTimestamp, in which case the DeletionTimestamp is only updated.
type PodInfo ¶
type PodInfoKey ¶
type PodScheduleStatus ¶
type PodScheduleStatus int
type Recorder ¶
Recorder monitors the cluster denoted by given kubeconfig and records events and cluster data into cluster database
type RecorderParams ¶
type RecorderParams struct {
ShootKubeConfigPath string
ShootNameSpace string
SeedKubeConfigPath string
DBDir string
SchedulerName string
}
func (RecorderParams) String ¶
func (rp RecorderParams) String() string
type ReporterParams ¶
type Scenario ¶
type Scenario struct {
StartTime time.Time
EndTime time.Time
SystemComponentRequests corev1.ResourceList
CriticalComponentRequests corev1.ResourceList
CASettings CASettingsInfo
UnscheduledPods []PodInfo
NominatedPods []PodInfo
ScheduledPods []PodInfo
NodeGroups []NodeGroupInfo
ScaleUpEvents []EventInfo
Nodes []NodeInfo
}
type WorkerPool ¶
type WorkerPool struct {
Name string
MachineType string
Architecture string
Minimum int
Maximum int
MaxSurge intstr.IntOrString // TODO: persist as string if needed.
ShootGeneration int64
Zones []string
}
func (WorkerPool) String ¶
func (w WorkerPool) String() string
Click to show internal directories.
Click to hide internal directories.