prometheusagent

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerOption added in v0.76.0

type ControllerOption func(*Operator)

func WithConfigResourceStatus added in v0.87.0

func WithConfigResourceStatus() ControllerOption

WithConfigResourceStatus tells that the controller can manage the status of configuration resources.

func WithEndpointSlice added in v0.76.0

func WithEndpointSlice() ControllerOption

WithEndpointSlice tells that the Kubernetes API supports the Endpointslice resource.

func WithScrapeConfig added in v0.76.0

func WithScrapeConfig() ControllerOption

WithScrapeConfig tells that the controller manages ScrapeConfig objects.

func WithStorageClassValidation added in v0.76.0

func WithStorageClassValidation() ControllerOption

WithStorageClassValidation tells that the controller should verify that the Prometheus spec references a valid StorageClass name.

type Operator

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

Operator manages life cycle of Prometheus agent deployments and monitoring configurations.

func New

func New(ctx context.Context, restConfig *rest.Config, c operator.Config, logger *slog.Logger, r prometheus.Registerer, options ...ControllerOption) (*Operator, error)

New creates a new controller.

func (*Operator) Iterate added in v0.65.0

func (c *Operator) Iterate(processFn func(metav1.Object, []monitoringv1.Condition))

Iterate implements the operator.StatusReconciler interface.

func (*Operator) RefreshStatusFor added in v0.65.0

func (c *Operator) RefreshStatusFor(o metav1.Object)

RefreshStatusFor implements the operator.StatusReconciler interface.

func (*Operator) Run

func (c *Operator) Run(ctx context.Context) error

Run the controller.

func (*Operator) Sync

func (c *Operator) Sync(ctx context.Context, key string) error

Sync implements the operator.Syncer interface.

func (*Operator) UpdateStatus

func (c *Operator) UpdateStatus(ctx context.Context, key string) error

UpdateStatus updates the status subresource of the object identified by the given key. UpdateStatus implements the operator.Syncer interface.

Jump to

Keyboard shortcuts

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