Documentation ¶
Index ¶
- Constants
- func RegisterObjectStat(obj client.Object, controller string)
- type ConverterController
- func (c *ConverterController) CreateAlertmanagerConfig(amc interface{})
- func (c *ConverterController) CreatePodMonitor(pod interface{})
- func (c *ConverterController) CreateProbe(obj interface{})
- func (c *ConverterController) CreatePrometheusRule(rule interface{})
- func (c *ConverterController) CreateServiceMonitor(service interface{})
- func (c *ConverterController) Run(ctx context.Context, group *errgroup.Group)
- func (c *ConverterController) Start(ctx context.Context) error
- func (c *ConverterController) UpdateAlertmanagerConfig(_, new interface{})
- func (c *ConverterController) UpdatePodMonitor(_, new interface{})
- func (c *ConverterController) UpdateProbe(_, new interface{})
- func (c *ConverterController) UpdatePrometheusRule(_old, new interface{})
- func (c *ConverterController) UpdateServiceMonitor(_, new interface{})
- type VMAgentReconciler
- type VMAlertReconciler
- type VMAlertmanagerConfigReconciler
- type VMAlertmanagerReconciler
- type VMAuthReconciler
- type VMClusterReconciler
- type VMNodeScrapeReconciler
- type VMPodScrapeReconciler
- type VMProbeReconciler
- type VMRuleReconciler
- type VMServiceScrapeReconciler
- type VMSingleReconciler
- type VMStaticScrapeReconciler
- type VMUserReconciler
Constants ¶
const ( // MetaMergeStrategyLabel merge strategy by default prefer prometheus meta labels // but with annotation value added to VMObject: // annotations: // operator.victoriametrics.com/merge-api-strategy: prefer-victoriametrics // metadata from VMObject will be preferred during merge MetaMergeStrategyLabel = "operator.victoriametrics.com/merge-meta-strategy" // MetaPreferVM - prefers VM object meta values, ignores prometheus MetaPreferVM = "prefer-victoriametrics" // MetaPreferProm - prefers prometheus MetaPreferProm = "prefer-prometheus" // MetaMergeLabelsVMPriority merges both label sets // its not possible to remove values MetaMergeLabelsVMPriority = "merge-victoriametrics-priority" // MetaMergeLabelsPromPriority merges both label sets // its not possible to remove values MetaMergeLabelsPromPriority = "merge-prometheus-priority" // IgnoreConversionLabel this annotation disables updating of corresponding VMObject // must be added to annotation of VMObject // annotations: // operator.victoriametrics.com/ignore-prometheus-updates: enabled IgnoreConversionLabel = "operator.victoriametrics.com/ignore-prometheus-updates" // IgnoreConversion - disables updates from prometheus api IgnoreConversion = "enabled" )
Variables ¶
This section is empty.
Functions ¶
func RegisterObjectStat ¶ added in v0.30.4
RegisterObjectStat registers or deregisters object at metrics
Types ¶
type ConverterController ¶
type ConverterController struct {
// contains filtered or unexported fields
}
ConverterController - watches for prometheus objects and create VictoriaMetrics objects
func NewConverterController ¶
func NewConverterController(promCl versioned.Interface, vclient client.Client, baseConf *config.BaseOperatorConf) *ConverterController
NewConverterController builder for vmprometheusconverter service
func (*ConverterController) CreateAlertmanagerConfig ¶ added in v0.28.0
func (c *ConverterController) CreateAlertmanagerConfig(amc interface{})
CreateAlertmanagerConfig converts AlertmanagerConfig to VMAlertmanagerConfig
func (*ConverterController) CreatePodMonitor ¶
func (c *ConverterController) CreatePodMonitor(pod interface{})
CreatePodMonitor converts PodMonitor to VMPodScrape
func (*ConverterController) CreateProbe ¶ added in v0.2.0
func (c *ConverterController) CreateProbe(obj interface{})
CreateProbe converts Probe to VMProbe
func (*ConverterController) CreatePrometheusRule ¶
func (c *ConverterController) CreatePrometheusRule(rule interface{})
CreatePrometheusRule converts prometheus rule to vmrule
func (*ConverterController) CreateServiceMonitor ¶
func (c *ConverterController) CreateServiceMonitor(service interface{})
CreateServiceMonitor converts ServiceMonitor to VMServiceScrape
func (*ConverterController) Run ¶
func (c *ConverterController) Run(ctx context.Context, group *errgroup.Group)
Run - starts vmprometheusconverter with background discovery process for each prometheus api object
func (*ConverterController) Start ¶ added in v0.9.0
func (c *ConverterController) Start(ctx context.Context) error
Start implements interface.
func (*ConverterController) UpdateAlertmanagerConfig ¶ added in v0.28.0
func (c *ConverterController) UpdateAlertmanagerConfig(_, new interface{})
UpdateAlertmanagerConfig updates VMAlertmanagerConfig
func (*ConverterController) UpdatePodMonitor ¶
func (c *ConverterController) UpdatePodMonitor(_, new interface{})
UpdatePodMonitor updates VMPodScrape
func (*ConverterController) UpdateProbe ¶ added in v0.2.0
func (c *ConverterController) UpdateProbe(_, new interface{})
UpdateProbe updates VMProbe
func (*ConverterController) UpdatePrometheusRule ¶
func (c *ConverterController) UpdatePrometheusRule(_old, new interface{})
UpdatePrometheusRule updates vmrule
func (*ConverterController) UpdateServiceMonitor ¶
func (c *ConverterController) UpdateServiceMonitor(_, new interface{})
UpdateServiceMonitor updates VMServiceMonitor
type VMAgentReconciler ¶
type VMAgentReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMAgentReconciler reconciles a VMAgent object
func (*VMAgentReconciler) Reconcile ¶
func (r *VMAgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmagents,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmagents/status,verbs=get;update;patch +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmagents/finalizers,verbs=* +kubebuilder:rbac:groups="",resources=pods,verbs=* +kubebuilder:rbac:groups="",resources=nodes,verbs=get;watch;list +kubebuilder:rbac:groups="",resources=nodes/proxy,verbs=get;watch;list +kubebuilder:rbac:groups="networking.k8s.io",resources=ingresses,verbs=get;watch;list +kubebuilder:rbac:groups="",resources=events,verbs=* +kubebuilder:rbac:groups="",resources=endpoints,verbs=* +kubebuilder:rbac:groups="",resources=endpointslices,verbs=get;watch;list +kubebuilder:rbac:groups="",resources=services,verbs=* +kubebuilder:rbac:groups="",resources=services/finalizers,verbs=* +kubebuilder:rbac:groups=monitoring.coreos.com,resources=*,verbs=* +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;watch;list +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=clusterrolebindings,verbs=get;create,update;list +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=clusterroles,verbs=get;create,update;list +kubebuilder:rbac:groups="policy",resources=podsecuritypolicies,verbs=get;create,update;list +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;create,update;list
func (*VMAgentReconciler) Scheme ¶
func (r *VMAgentReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMAgentReconciler) SetupWithManager ¶
func (r *VMAgentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMAlertReconciler ¶
type VMAlertReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMAlertReconciler reconciles a VMAlert object
func (*VMAlertReconciler) Reconcile ¶
func (r *VMAlertReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalerts,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalerts/status,verbs=get;update;patch +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalerts/finalizers,verbs=*
func (*VMAlertReconciler) Scheme ¶
func (r *VMAlertReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMAlertReconciler) SetupWithManager ¶
func (r *VMAlertReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMAlertmanagerConfigReconciler ¶ added in v0.18.0
type VMAlertmanagerConfigReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMAlertmanagerConfigReconciler reconciles a VMAlertmanagerConfig object
func (*VMAlertmanagerConfigReconciler) Reconcile ¶ added in v0.18.0
func (r *VMAlertmanagerConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile implements interface +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalertmanagerconfigs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalertmanagerconfigs/status,verbs=get;update;patch
func (*VMAlertmanagerConfigReconciler) Scheme ¶ added in v0.18.0
func (r *VMAlertmanagerConfigReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMAlertmanagerConfigReconciler) SetupWithManager ¶ added in v0.18.0
func (r *VMAlertmanagerConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager configures reconcile
type VMAlertmanagerReconciler ¶
type VMAlertmanagerReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMAlertmanagerReconciler reconciles a VMAlertmanager object
func (*VMAlertmanagerReconciler) Reconcile ¶
func (r *VMAlertmanagerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalertmanagers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalertmanagers/status,verbs=get;update;patch +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmalertmanagers/finalizers,verbs=* +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=* +kubebuilder:rbac:groups="",resources=configmaps,verbs=* +kubebuilder:rbac:groups="",resources=secrets,verbs=*
func (*VMAlertmanagerReconciler) Scheme ¶
func (r *VMAlertmanagerReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMAlertmanagerReconciler) SetupWithManager ¶
func (r *VMAlertmanagerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMAuthReconciler ¶ added in v0.15.0
type VMAuthReconciler struct { client.Client BaseConf *config.BaseOperatorConf Log logr.Logger OriginScheme *runtime.Scheme }
VMAuthReconciler reconciles a VMAuth object
func (*VMAuthReconciler) Reconcile ¶ added in v0.15.0
func (r *VMAuthReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile implements interface +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmauths,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmauths/status,verbs=get;update;patch
func (*VMAuthReconciler) Scheme ¶ added in v0.15.0
func (r *VMAuthReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMAuthReconciler) SetupWithManager ¶ added in v0.15.0
func (r *VMAuthReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager inits object.
type VMClusterReconciler ¶
type VMClusterReconciler struct { Client client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMClusterReconciler reconciles a VMCluster object
func (*VMClusterReconciler) Reconcile ¶
func (r *VMClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmclusters,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmclusters/status,verbs=get;update;patch +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmclusters/finalizers,verbs=* +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=*
func (*VMClusterReconciler) Scheme ¶
func (r *VMClusterReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMClusterReconciler) SetupWithManager ¶
func (r *VMClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMNodeScrapeReconciler ¶ added in v0.6.0
type VMNodeScrapeReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMNodeScrapeReconciler reconciles a VMNodeScrape object
func (*VMNodeScrapeReconciler) Reconcile ¶ added in v0.6.0
func (r *VMNodeScrapeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile - reconciles VMNodeScrape objects. +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmnodescrapes,verbs=* +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmnodescrapes/status,verbs=get;update;patch +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmnodescrapes/finalizers,verbs=*
func (*VMNodeScrapeReconciler) Scheme ¶ added in v0.6.0
func (r *VMNodeScrapeReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMNodeScrapeReconciler) SetupWithManager ¶ added in v0.6.0
func (r *VMNodeScrapeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager - setups manager for VMNodeScrape
type VMPodScrapeReconciler ¶
type VMPodScrapeReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMPodScrapeReconciler reconciles a VMPodScrape object
func (*VMPodScrapeReconciler) Reconcile ¶
func (r *VMPodScrapeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmpodscrapes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmpodscrapes/status,verbs=get;update;patch
func (*VMPodScrapeReconciler) Scheme ¶
func (r *VMPodScrapeReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMPodScrapeReconciler) SetupWithManager ¶
func (r *VMPodScrapeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMProbeReconciler ¶ added in v0.2.0
type VMProbeReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMProbeReconciler reconciles a VMProbe object
func (*VMProbeReconciler) Reconcile ¶ added in v0.2.0
func (r *VMProbeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile - syncs VMProbe +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmprobes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmprobes/status,verbs=get;update;patch
func (*VMProbeReconciler) Scheme ¶ added in v0.2.0
func (r *VMProbeReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMProbeReconciler) SetupWithManager ¶ added in v0.2.0
func (r *VMProbeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager - setups VMProbe manager
type VMRuleReconciler ¶
type VMRuleReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMRuleReconciler reconciles a VMRule object
func (*VMRuleReconciler) Reconcile ¶
func (r *VMRuleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmrules,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmrules/status,verbs=get;update;patch
func (*VMRuleReconciler) Scheme ¶
func (r *VMRuleReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMRuleReconciler) SetupWithManager ¶
func (r *VMRuleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMServiceScrapeReconciler ¶
type VMServiceScrapeReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMServiceScrapeReconciler reconciles a VMServiceScrape object
func (*VMServiceScrapeReconciler) Reconcile ¶
func (r *VMServiceScrapeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmservicescrapes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmservicescrapes/status,verbs=get;update;patch
func (*VMServiceScrapeReconciler) Scheme ¶
func (r *VMServiceScrapeReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMServiceScrapeReconciler) SetupWithManager ¶
func (r *VMServiceScrapeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMSingleReconciler ¶
type VMSingleReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMSingleReconciler reconciles a VMSingle object
func (*VMSingleReconciler) Reconcile ¶
func (r *VMSingleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile general reconcile method for controller +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmsingles,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmsingles/finalizers,verbs=* +kubebuilder:rbac:groups=apps,resources=deployments,verbs=* +kubebuilder:rbac:groups=apps,resources=replicasets,verbs=* +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=* +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmsingles/status,verbs=get;update;patch
func (*VMSingleReconciler) Scheme ¶
func (r *VMSingleReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMSingleReconciler) SetupWithManager ¶
func (r *VMSingleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager general setup method
type VMStaticScrapeReconciler ¶ added in v0.10.0
type VMStaticScrapeReconciler struct { client.Client Log logr.Logger OriginScheme *runtime.Scheme BaseConf *config.BaseOperatorConf }
VMStaticScrapeReconciler reconciles a VMStaticScrape object
func (*VMStaticScrapeReconciler) Reconcile ¶ added in v0.10.0
func (r *VMStaticScrapeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile implements interface. +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmstaticscrapes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmstaticscrapes/status,verbs=get;update;patch
func (*VMStaticScrapeReconciler) Scheme ¶ added in v0.10.0
func (r *VMStaticScrapeReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMStaticScrapeReconciler) SetupWithManager ¶ added in v0.10.0
func (r *VMStaticScrapeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups reconciler.
type VMUserReconciler ¶ added in v0.15.0
type VMUserReconciler struct { client.Client BaseConf *config.BaseOperatorConf Log logr.Logger OriginScheme *runtime.Scheme }
VMUserReconciler reconciles a VMUser object
func (*VMUserReconciler) Reconcile ¶ added in v0.15.0
func (r *VMUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile implements interface +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmusers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmusers/status,verbs=get;update;patch
func (*VMUserReconciler) Scheme ¶ added in v0.15.0
func (r *VMUserReconciler) Scheme() *runtime.Scheme
Scheme implements interface.
func (*VMUserReconciler) SetupWithManager ¶ added in v0.15.0
func (r *VMUserReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager inits object
Source Files ¶
- controllers.go
- objects_stat.go
- vmagent_controller.go
- vmalert_controller.go
- vmalertmanager_controller.go
- vmalertmanagerconfig_controller.go
- vmauth_controller.go
- vmcluster_controller.go
- vmnodescrape_controller.go
- vmpodscrape_controller.go
- vmprobe_controller.go
- vmprometheusconverter_controller.go
- vmrule_controller.go
- vmservicescrape_controller.go
- vmsingle_controller.go
- vmstaticscrape_controller.go
- vmuser_controller.go