Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrServiceMonitorNotPresent = fmt.Errorf("no ServiceMonitor registered with the API")
)
Functions ¶
func CreateServiceMonitors ¶
func CreateServiceMonitors(config *rest.Config, ns string, services []*v1.Service) ([]*monitoringv1.ServiceMonitor, error)
CreateServiceMonitors creates ServiceMonitors objects based on an array of Service objects. If CR ServiceMonitor is not registered in the Cluster it will not attempt at creating resources.
func GenerateServiceMonitor ¶
func GenerateServiceMonitor(ns string, s *v1.Service) *monitoringv1.ServiceMonitor
GenerateServiceMonitor generates a prometheus-operator ServiceMonitor object based on the passed Service object.
Types ¶
type ServiceMonitorUpdater ¶
type ServiceMonitorUpdater func(*monitoringv1.ServiceMonitor) error
Click to show internal directories.
Click to hide internal directories.