Documentation ¶
Index ¶
- Constants
- func DeletePVCUsageWatcher(client kubernetes.Interface, namespace string) error
- func GetPVCUsageWatcher(client kubernetes.Interface, namespace string) (*appsv1.Deployment, error)
- func LaunchPVCUsageWatcher(client kubernetes.Interface, tenant string, context v1alpha1.ExecutionContext) error
- func Parse(value string) (float64, error)
- type PVCReporter
- type PVCUsage
- type PVCUsageFloat64
Constants ¶
View Source
const ( // ReportURLEnvName ... ReportURLEnvName = "REPORT_URL" // HeartbeatIntervalEnvName ... HeartbeatIntervalEnvName = "HEARTBEAT_INTERVAL" // NamespaceEnvName ... NamespaceEnvName = "NAMESPACE" // PVCWatcherLabelName ... PVCWatcherLabelName = "pod.cyclone.dev/name" // PVCWatcherLabelValue ... PVCWatcherLabelValue = "pvc-watcher" )
View Source
const PVCWatcherName = "pvc-watchdog"
PVCWatcherName is name of the PVC watcher deployment and pod
Variables ¶
This section is empty.
Functions ¶
func DeletePVCUsageWatcher ¶ added in v0.9.6
func DeletePVCUsageWatcher(client kubernetes.Interface, namespace string) error
DeletePVCUsageWatcher delete the pvc usage watcher deployment
func GetPVCUsageWatcher ¶ added in v1.0.0
func GetPVCUsageWatcher(client kubernetes.Interface, namespace string) (*appsv1.Deployment, error)
GetPVCUsageWatcher gets the pvc watch dog deployment.
func LaunchPVCUsageWatcher ¶
func LaunchPVCUsageWatcher(client kubernetes.Interface, tenant string, context v1alpha1.ExecutionContext) error
LaunchPVCUsageWatcher launches a pod in a given namespace to report PVC usage regularly.
Types ¶
type PVCReporter ¶
type PVCReporter interface { OverallUsedPercentage() float64 UsedPercentage(folder string) (float64, error) ReadableUsage() PVCUsage }
PVCReporter reports PVC usage information.
func NewPVCReporter ¶
func NewPVCReporter(client k8s.Interface, tenant string) (PVCReporter, error)
NewPVCReporter creates a PVC usage reporter.
Click to show internal directories.
Click to hide internal directories.