Documentation ¶
Overview ¶
* Copyright (c) 2022, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
NodeName string `json:"nodeName"`
}
Node represents the node from the summary endpoint
type Pod ¶
type Pod struct { /* EXAMPLE: "podRef": { "name": "configs-service-59c9c7586b-5jchj", "namespace": "onprem", "uid": "5fbb63da-d0a3-4493-8d27-6576b63119f5" } */ PodRef struct { Name string `json:"name"` Namespace string `json:"namespace"` } `json:"podRef"` /* Don't parse the list of volumes EXAMPLE: "volume": [ {...}, {...} ] */ //Volumes []*Volume `json:"volume"` EphemeralStorage *Volume `json:"ephemeral-storage"` }
Pod represents pod spec in the summary endpoint
func (*Pod) MarshalLogObject ¶
func (p *Pod) MarshalLogObject(oe zapcore.ObjectEncoder) error
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
func NewScraper ¶
func (*Scraper) Collect ¶
func (s *Scraper) Collect(ch chan<- prometheus.Metric)
func (*Scraper) Describe ¶
func (s *Scraper) Describe(ch chan<- *prometheus.Desc)
type Volume ¶
type Volume struct { // Used represents the total bytes used by the Volume. // Note: For block devices this maybe more than the total size of the files. UsedBytes int64 `json:"usedBytes"` // TODO: use uint64 here as well? // Available represents the storage space available (bytes) for the // Volume. For Volumes that share a filesystem with the host (e.g. // emptydir, hostpath), this is the available space on the underlying // storage, and is shared with host processes and other Volumes. AvailableBytes int64 `json:"availableBytes"` }
Volume represents the volume struct
EXAMPLE: { "time": "2019-11-25T20:33:19Z", "availableBytes": 25674719232, "capacityBytes": 25674731520, "usedBytes": 12288, "inodesFree": 6268236, "inodes": 6268245, "inodesUsed": 9, "name": "vault-client" }
https://github.com/kubernetes/kubernetes/blob/v1.18.5/pkg/volume/volume.go https://github.com/kubernetes/kubernetes/blob/v1.18.5/pkg/volume/csi/csi_client.go#L553