Documentation
¶
Index ¶
- func GenerateContent(promRule monitoringv1.PrometheusRuleSpec, logger log.Logger) (string, error)
- func ListOptions(name string) metav1.ListOptions
- func Status(ctx context.Context, kclient kubernetes.Interface, p *monitoringv1.Prometheus) (*monitoringv1.PrometheusStatus, []v1.Pod, error)
- func ValidateRule(promRule monitoringv1.PrometheusRuleSpec) []error
- func WebConfigSecretName(name string) string
- type ConfigGenerator
- type Operator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateContent ¶ added in v0.50.0
func GenerateContent(promRule monitoringv1.PrometheusRuleSpec, logger log.Logger) (string, error)
GenerateContent takes a PrometheusRuleSpec and generates the rule content
func ListOptions ¶
func ListOptions(name string) metav1.ListOptions
func Status ¶ added in v0.47.0
func Status(ctx context.Context, kclient kubernetes.Interface, p *monitoringv1.Prometheus) (*monitoringv1.PrometheusStatus, []v1.Pod, error)
Status evaluates the current status of a Prometheus deployment with respect to its specified resource object. It returns the status and a list of pods that are not updated.
func ValidateRule ¶ added in v0.50.0
func ValidateRule(promRule monitoringv1.PrometheusRuleSpec) []error
ValidateRule takes PrometheusRuleSpec and validates it using the upstream prometheus rule validator
func WebConfigSecretName ¶ added in v0.49.0
Types ¶
type ConfigGenerator ¶ added in v0.48.0
type ConfigGenerator struct {
// contains filtered or unexported fields
}
ConfigGenerator knows how to generate a Prometheus configuration which is compatible with a given Prometheus version.
func NewConfigGenerator ¶ added in v0.23.0
func NewConfigGenerator(logger log.Logger, p *v1.Prometheus) (*ConfigGenerator, error)
NewConfigGenerator creates a ConfigGenerator for the provided Prometheus resource.
func (*ConfigGenerator) Generate ¶ added in v0.53.0
func (cg *ConfigGenerator) Generate( p *v1.Prometheus, sMons map[string]*v1.ServiceMonitor, pMons map[string]*v1.PodMonitor, probes map[string]*v1.Probe, store *assets.Store, additionalScrapeConfigs []byte, additionalAlertRelabelConfigs []byte, additionalAlertManagerConfigs []byte, ruleConfigMapNames []string, ) ([]byte, error)
Generate creates a serialized YAML representation of a Prometheus configuration using the provided resources.
func (*ConfigGenerator) WithLogger ¶ added in v0.53.0
func (cg *ConfigGenerator) WithLogger(logger log.Logger) *ConfigGenerator
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator manages life cycle of Prometheus deployments and monitoring configurations.