Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureBlobStorageClientConfig ¶ added in v0.37.0
type AzureBlobStorageClientConfig struct { reporting.BaseClientConfig reporting.AzureBlobStorageClientConfig PrefixInContainer string `json:"prefixInContainer"` }
type ClientsConfig ¶ added in v0.28.0
type ClientsConfig struct { AzureBlob *AzureBlobStorageClientConfig `json:"azureBlob"` HTTP *HTTPClientConfig `json:"http"` S3 *S3ClientConfig `json:"s3"` }
type Config ¶
type Config struct { Clients ClientsConfig `json:"clients"` CPUMetricName string `json:"cpuMetricName"` ActiveTimeMetricName string `json:"activeTimeMetricName"` CollectEverySeconds uint `json:"collectEverySeconds"` AccumulateEverySeconds uint `json:"accumulateEverySeconds"` }
type HTTPClientConfig ¶ added in v0.28.0
type HTTPClientConfig struct { reporting.BaseClientConfig URL string `json:"url"` }
type MetricsCollector ¶ added in v0.31.0
type MetricsCollector struct {
// contains filtered or unexported fields
}
func NewMetricsCollector ¶ added in v0.31.0
func NewMetricsCollector( ctx context.Context, parentLogger *zap.Logger, conf *Config, metrics PromMetrics, ) (*MetricsCollector, error)
func (*MetricsCollector) Run ¶ added in v0.31.0
func (mc *MetricsCollector) Run( ctx context.Context, logger *zap.Logger, store VMStoreForNode, ) error
type PromMetrics ¶
type PromMetrics struct {
// contains filtered or unexported fields
}
func NewPromMetrics ¶
func NewPromMetrics() PromMetrics
func (PromMetrics) MustRegister ¶
func (m PromMetrics) MustRegister(reg *prometheus.Registry)
type S3ClientConfig ¶ added in v0.29.0
type S3ClientConfig struct { reporting.BaseClientConfig reporting.S3ClientConfig PrefixInBucket string `json:"prefixInBucket"` }
type VMNodeIndex ¶
type VMNodeIndex struct {
// contains filtered or unexported fields
}
VMNodeIndex is a watch.Index that stores all of the VMs for a particular node
We have to implement this ourselves because K8s does not (as of 2023-04-04) support field selectors on CRDs, so we can't have the API server filter out VMs for us.
For more info, see: https://github.com/kubernetes/kubernetes/issues/53459 This comment in particular was particularly instructive: https://github.com/kubernetes/kubernetes/issues/53459#issuecomment-1146200268
func NewVMNodeIndex ¶
func NewVMNodeIndex(node string) *VMNodeIndex
func (*VMNodeIndex) Add ¶
func (i *VMNodeIndex) Add(vm *vmv1.VirtualMachine)
func (*VMNodeIndex) Delete ¶
func (i *VMNodeIndex) Delete(vm *vmv1.VirtualMachine)
func (*VMNodeIndex) List ¶
func (i *VMNodeIndex) List() []*vmv1.VirtualMachine
func (*VMNodeIndex) Update ¶
func (i *VMNodeIndex) Update(oldVM, newVM *vmv1.VirtualMachine)
type VMStoreForNode ¶
type VMStoreForNode = watch.IndexedStore[vmv1.VirtualMachine, *VMNodeIndex]
Click to show internal directories.
Click to hide internal directories.