Documentation
¶
Index ¶
- func ApplyConfigurationFromAlertmanager(a *monitoringv1.Alertmanager, updateScaleSubresource bool) *monitoringv1ac.AlertmanagerApplyConfiguration
- type Config
- type ConfigBuilder
- type ControllerOption
- type Operator
- func (c *Operator) Iterate(processFn func(metav1.Object, []monitoringv1.Condition))
- func (c *Operator) RefreshStatusFor(o metav1.Object)
- func (c *Operator) Run(ctx context.Context) error
- func (c *Operator) Sync(ctx context.Context, key string) error
- func (c *Operator) UpdateStatus(ctx context.Context, key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyConfigurationFromAlertmanager ¶ added in v0.69.1
func ApplyConfigurationFromAlertmanager(a *monitoringv1.Alertmanager, updateScaleSubresource bool) *monitoringv1ac.AlertmanagerApplyConfiguration
Types ¶
type Config ¶ added in v0.5.0
type Config struct {
LocalHost string
ClusterDomain string
ReloaderConfig operator.ContainerConfig
AlertmanagerDefaultBaseImage string
Annotations operator.Map
Labels operator.Map
}
Config defines the operator's parameters for the Alertmanager controller. Whenever the value of one of these parameters is changed, it triggers an update of the managed statefulsets.
type ConfigBuilder ¶ added in v0.83.0
type ConfigBuilder struct {
// contains filtered or unexported fields
}
ConfigBuilder knows how to build an Alertmanager configuration from a raw configuration and/or AlertmanagerConfig objects. The API is public because it's used by Grafana Alloy (https://github.com/grafana/alloy). Note that the project makes no API stability guarantees.
func NewConfigBuilder ¶ added in v0.83.0
func NewConfigBuilder(logger *slog.Logger, amVersion semver.Version, store *assets.StoreBuilder, am *monitoringv1.Alertmanager) *ConfigBuilder
func (*ConfigBuilder) AddAlertmanagerConfigs ¶ added in v0.83.0
func (cb *ConfigBuilder) AddAlertmanagerConfigs(ctx context.Context, amConfigs map[string]*monitoringv1alpha1.AlertmanagerConfig) error
AddAlertmanagerConfigs adds AlertmanagerConfig objects to the current configuration.
func (*ConfigBuilder) InitializeFromRawConfiguration ¶ added in v0.83.0
func (cb *ConfigBuilder) InitializeFromRawConfiguration(b []byte) error
InitializeFromRawConfiguration initializes the configuration from raw data.
func (*ConfigBuilder) MarshalJSON ¶ added in v0.83.0
func (cb *ConfigBuilder) MarshalJSON() ([]byte, error)
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 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 the lifecycle of the Alertmanager statefulsets and their 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
RefreshStatusFor implements the operator.StatusReconciler interface.