mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
@vishh PR feedback
This commit is contained in:
parent
ce20c3b100
commit
e1fc2c1152
@ -35,12 +35,20 @@ type NodeStats struct {
|
|||||||
NodeName string `json:"nodeName"`
|
NodeName string `json:"nodeName"`
|
||||||
// Overall node stats.
|
// Overall node stats.
|
||||||
Total []NodeSample `json:"total,omitempty" patchStrategy:"merge" patchMergeKey:"sampleTime"`
|
Total []NodeSample `json:"total,omitempty" patchStrategy:"merge" patchMergeKey:"sampleTime"`
|
||||||
// Stats of system daemons tracked as raw containers, which may include:
|
// Stats of system daemons tracked as raw containers.
|
||||||
// "/kubelet", "/docker-daemon", "kube-proxy" - Tracks respective component stats
|
// The system containers are named according to the SystemContainer* constants.
|
||||||
// "/system" - Tracks stats of non-kubernetes and non-kernel processes (grouped together)
|
|
||||||
SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Container name for the system container tracking Kubelet usage.
|
||||||
|
SystemContainerKubelet = "/kubelet"
|
||||||
|
// Container name for the system container tracking the runtime (e.g. docker or rkt) usage.
|
||||||
|
SystemContainerRuntime = "/runtime"
|
||||||
|
// Container name for the system container tracking non-kubernetes processes.
|
||||||
|
SystemContainerMisc = "/misc"
|
||||||
|
)
|
||||||
|
|
||||||
// PodStats holds pod-level unprocessed sample stats.
|
// PodStats holds pod-level unprocessed sample stats.
|
||||||
type PodStats struct {
|
type PodStats struct {
|
||||||
// Reference to the measured Pod.
|
// Reference to the measured Pod.
|
||||||
@ -119,16 +127,18 @@ type NetworkStats struct {
|
|||||||
type CPUStats struct {
|
type CPUStats struct {
|
||||||
// Total CPU usage (sum of all cores) averaged over the sample window.
|
// Total CPU usage (sum of all cores) averaged over the sample window.
|
||||||
// The "core" unit can be interpreted as CPU core-seconds per second.
|
// The "core" unit can be interpreted as CPU core-seconds per second.
|
||||||
UsageCores *resource.Quantity `json:"totalCores,omitempty"`
|
UsageCores *resource.Quantity `json:"usageCores,omitempty"`
|
||||||
|
// Cumulative CPU usage (sum of all cores) since object creation.
|
||||||
|
UsageCoreSeconds *resource.Quantity `json:"usageCoreSeconds,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MemoryStats contains data about memory usage.
|
// MemoryStats contains data about memory usage.
|
||||||
type MemoryStats struct {
|
type MemoryStats struct {
|
||||||
// Total memory in use. This includes all memory regardless of when it was accessed.
|
// Total memory in use. This includes all memory regardless of when it was accessed.
|
||||||
UsageBytes *resource.Quantity `json:"totalBytes,omitempty"`
|
UsageBytes *resource.Quantity `json:"usageBytes,omitempty"`
|
||||||
// The amount of working set memory. This includes recently accessed memory,
|
// The amount of working set memory. This includes recently accessed memory,
|
||||||
// dirty memory, and kernel memory. UsageBytes is <= TotalBytes.
|
// dirty memory, and kernel memory. UsageBytes is <= TotalBytes.
|
||||||
WorkingSetBytes *resource.Quantity `json:"usageBytes,omitempty"`
|
WorkingSetBytes *resource.Quantity `json:"workingSetBytes,omitempty"`
|
||||||
// Cumulative number of minor page faults.
|
// Cumulative number of minor page faults.
|
||||||
PageFaults *int64 `json:"pageFaults,omitempty"`
|
PageFaults *int64 `json:"pageFaults,omitempty"`
|
||||||
// Cumulative number of major page faults.
|
// Cumulative number of major page faults.
|
||||||
@ -153,6 +163,7 @@ type StatsOptions struct {
|
|||||||
// Only include samples with sampleTime less recent than this time.
|
// Only include samples with sampleTime less recent than this time.
|
||||||
UntilTime *unversioned.Time `json:"untilTime,omitempty"`
|
UntilTime *unversioned.Time `json:"untilTime,omitempty"`
|
||||||
// Specifies the maximum number of elements in any list of samples.
|
// Specifies the maximum number of elements in any list of samples.
|
||||||
// When the total number of samples exceeds the maximum the most recent samples are returned.
|
// When the total number of samples exceeds the maximum the most recent MaxSamples samples are
|
||||||
|
// returned.
|
||||||
MaxSamples int `json:"maxSamples,omitempty"`
|
MaxSamples int `json:"maxSamples,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user