computeresources

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package computeresources handles compute resource rule reconciliation.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GetResourcePoolAndVMs is defined to enable monkey patching the getResourcePoolAndVMs function in integration tests
	GetResourcePoolAndVMs = getResourcePoolAndVMs
)

Functions

func GetScopeKey added in v0.0.31

func GetScopeKey(rule v1alpha1.ComputeResourceRule) (string, error)

GetScopeKey returns a formatted key depending on the scope of a rule

Types

type ResourceUsage

type ResourceUsage struct {
	Used     int64
	Free     int64
	Capacity int64
	Usage    float64
	Summary  ResourceUsageSummary
}

ResourceUsage provides resource usage information

type ResourceUsageSummary

type ResourceUsageSummary struct {
	Used     string
	Free     string
	Capacity string
	Usage    string
}

ResourceUsageSummary provides a summary of resource usage

type Usage

type Usage struct {
	Memory  ResourceUsage
	CPU     ResourceUsage
	Storage ResourceUsage
}

Usage provides memory cpu and storage usage information

type ValidationService

type ValidationService struct {
	// contains filtered or unexported fields
}

ValidationService is a service that validates compute resource rules

func NewValidationService

func NewValidationService(log logr.Logger, driver *vsphere.VCenterDriver) *ValidationService

NewValidationService creates a new ValidationService

func (*ValidationService) ReconcileComputeResourceValidationRule

func (c *ValidationService) ReconcileComputeResourceValidationRule(rule v1alpha1.ComputeResourceRule, finder *find.Finder, driver *vsphere.VCenterDriver, seenScopes map[string]bool) (*types.ValidationRuleResult, error)

ReconcileComputeResourceValidationRule reconciles the compute resource rule

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL