features

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"enabled-features",
	"Exports prometheus metrics describing which features are enabled in operator",

	cell.Invoke(updateOperatorConfigMetricOnStart),
	cell.Provide(
		func(m Metrics) featureMetrics {
			return m
		},
	),
	metrics.Metric(func() Metrics {
		showDefaults := withDefaults != ""
		showEnvVersion := withoutEnvVersion == ""
		return NewMetrics(showDefaults, showEnvVersion)
	}),
)

Cell will retrieve information from all other cells / configuration to describe, in form of prometheus metrics, which features are enabled on the operator.

Functions

func NewDumpCmd added in v1.20.0

func NewDumpCmd() *cobra.Command

Types

type Metrics

type Metrics struct {
	ACLBGatewayAPIEnabled               metric.Gauge
	ACLBIngressControllerEnabled        metric.Gauge
	ACLBIPAMEnabled                     metric.Gauge
	ACLBL7AwareTrafficManagementEnabled metric.Gauge
	ACLBNodeIPAMEnabled                 metric.Gauge

	CPKubernetesVersion metric.Vec[metric.Gauge]
}

func NewMetrics

func NewMetrics(withDefaults bool, withEnvVersion bool) Metrics

NewMetrics returns all feature metrics. If 'withDefaults' is set, then all metrics will have defined all of their possible values. If 'withEnvVersion' is set, then we include things like version information from the host.

Jump to

Keyboard shortcuts

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