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 ¶
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
Click to show internal directories.
Click to hide internal directories.