Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ReconcileInterval is how often the controller probes the scheduler and updates CRDs.
ReconcileInterval metav1.Duration `json:"capacityReconcileInterval"`
// TotalPipeline is the scheduler pipeline used for the empty-state probe.
// This pipeline should ignore current VM allocations (e.g. kvm-report-capacity).
TotalPipeline string `json:"capacityTotalPipeline"`
// PlaceablePipeline is the scheduler pipeline used for the current-state probe.
// This pipeline considers current VM allocations to determine remaining placement capacity.
PlaceablePipeline string `json:"capacityPlaceablePipeline"`
// SchedulerURL is the endpoint of the nova external scheduler.
SchedulerURL string `json:"schedulerURL"`
}
Config holds configuration for the capacity controller.
func DefaultConfig ¶
func DefaultConfig() Config
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills in any unset values with defaults.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller reconciles FlavorGroupCapacity CRDs on a fixed interval. For each (flavor group × AZ) pair it probes all flavors in the group and updates the CRD status.
func NewController ¶
func NewController(c client.Client, config Config) *Controller
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor provides Prometheus metrics for FlavorGroupCapacity CRDs. It implements prometheus.Collector and reads CRD status on each Collect call.
func NewMonitor ¶
NewMonitor creates a new Monitor that reads FlavorGroupCapacity CRDs.
func (*Monitor) Collect ¶
func (m *Monitor) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector — lists all FlavorGroupCapacity CRDs and exports gauges.
func (*Monitor) Describe ¶
func (m *Monitor) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.