Documentation ¶
Index ¶
- func NewFakeClientWrapper(c client.Client) client.Client
- func NewPVCAutoresizer(mc MetricsClient, c client.Client, log logr.Logger, interval time.Duration, ...) manager.Runnable
- func PvcStorageLimit(pvc *corev1.PersistentVolumeClaim) (resource.Quantity, error)
- func SetupIndexer(mgr ctrl.Manager, skipAnnotationCheck bool) error
- type MetricsClient
- type VolumeStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPVCAutoresizer ¶
func NewPVCAutoresizer(mc MetricsClient, c client.Client, log logr.Logger, interval time.Duration, recorder record.EventRecorder) manager.Runnable
NewPVCAutoresizer returns a new pvcAutoresizer struct
func PvcStorageLimit ¶
func PvcStorageLimit(pvc *corev1.PersistentVolumeClaim) (resource.Quantity, error)
Types ¶
type MetricsClient ¶
type MetricsClient interface { // GetMetrics returns volume stats metrics of PVCs // // The volume stats consist of available bytes, capacity bytes, available inodes and capacity // inodes. This method returns volume stats for a PVC only if all four metrics of the PVC was // retrieved from the metrics source. GetMetrics(ctx context.Context) (map[types.NamespacedName]*VolumeStats, error) }
MetricsClient is an interface for getting metrics
func NewK8sMetricsApiClient ¶ added in v0.12.0
func NewK8sMetricsApiClient() (MetricsClient, error)
NewK8sMetricsApiClient returns a new k8sMetricsApiClient client
func NewPrometheusClient ¶
func NewPrometheusClient(url string) (MetricsClient, error)
NewPrometheusClient returns a new prometheusClient
Click to show internal directories.
Click to hide internal directories.