Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bb216e53
Commit
bb216e53
authored
Jan 12, 2016
by
Phillip Wittrock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define stats api fields for exporting filesystem metrics #17331
parent
6dd86710
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
types.go
pkg/kubelet/server/stats/types.go
+32
-0
No files found.
pkg/kubelet/server/stats/types.go
View file @
bb216e53
...
@@ -45,6 +45,9 @@ type NodeStats struct {
...
@@ -45,6 +45,9 @@ type NodeStats struct {
Memory
*
MemoryStats
`json:"memory,omitempty"`
Memory
*
MemoryStats
`json:"memory,omitempty"`
// Stats pertaining to network resources.
// Stats pertaining to network resources.
Network
*
NetworkStats
`json:"network,omitempty"`
Network
*
NetworkStats
`json:"network,omitempty"`
// Stats pertaining to total usage of filesystem resources on the rootfs used by node k8s components.
// NodeFs.Used is the total bytes used on the filesystem.
Fs
*
FsStats
`json:"fs,omitempty"`
}
}
const
(
const
(
...
@@ -64,6 +67,9 @@ type PodStats struct {
...
@@ -64,6 +67,9 @@ type PodStats struct {
Containers
[]
ContainerStats
`json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
Containers
[]
ContainerStats
`json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
// Stats pertaining to network resources.
// Stats pertaining to network resources.
Network
*
NetworkStats
`json:"network,omitempty"`
Network
*
NetworkStats
`json:"network,omitempty"`
// Stats pertaining to volume usage of filesystem resources.
// VolumeStats.UsedBytes is the number of bytes used by the Volume
VolumeStats
[]
VolumeStats
`json:"volume,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}
}
// ContainerStats holds container-level unprocessed sample stats.
// ContainerStats holds container-level unprocessed sample stats.
...
@@ -74,6 +80,12 @@ type ContainerStats struct {
...
@@ -74,6 +80,12 @@ type ContainerStats struct {
CPU
*
CPUStats
`json:"cpu,omitempty"`
CPU
*
CPUStats
`json:"cpu,omitempty"`
// Stats pertaining to memory (RAM) resources.
// Stats pertaining to memory (RAM) resources.
Memory
*
MemoryStats
`json:"memory,omitempty"`
Memory
*
MemoryStats
`json:"memory,omitempty"`
// Stats pertaining to container rootfs usage of filesystem resources.
// Rootfs.UsedBytes is the number of bytes used for the container write layer.
Rootfs
*
FsStats
`json:"rootfs,omitempty"`
// Stats pertaining to container logs usage of filesystem resources.
// Logs.UsedBytes is the number of bytes used for the container logs.
Logs
*
FsStats
`json:"logs,omitempty"`
}
}
// NonLocalObjectReference contains enough information to locate the referenced object.
// NonLocalObjectReference contains enough information to locate the referenced object.
...
@@ -115,3 +127,23 @@ type MemoryStats struct {
...
@@ -115,3 +127,23 @@ type MemoryStats struct {
// Cumulative number of major page faults.
// Cumulative number of major page faults.
MajorPageFaults
*
int64
`json:"majorPageFaults,omitempty"`
MajorPageFaults
*
int64
`json:"majorPageFaults,omitempty"`
}
}
// VolumeStats contains data about Volume filesystem usage.
type
VolumeStats
struct
{
// Embedded FsStats
FsStats
// Name is the name given to the Volume
Name
string
`json:"name,omitempty"`
}
// FsStats contains data about filesystem usage.
type
FsStats
struct
{
// AvailableBytes represents the storage space available (bytes) for the filesystem.
AvailableBytes
*
resource
.
Quantity
`json:"availableBytes,omitempty"`
// CapacityBytes represents the total capacity (bytes) of the filesystems underlying storage.
CapacityBytes
*
resource
.
Quantity
`json:"capacityBytes,omitempty"`
// UsedBytes represents the bytes used for a specific task on the filesystem.
// This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes.
// e.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem.
UsedBytes
*
resource
.
Quantity
`json:"usedBytes,omitempty"`
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment