controllers

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
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

This section is empty.

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) 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) 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
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMAgentReconciler reconciles a VMAgent object

func (*VMAgentReconciler) Reconcile

func (r *VMAgentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMAgentReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

type VMAlertReconciler

type VMAlertReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMAlertReconciler reconciles a VMAlert object

func (*VMAlertReconciler) Reconcile

func (r *VMAlertReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMAlertReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

type VMAlertmanagerReconciler

type VMAlertmanagerReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMAlertmanagerReconciler reconciles a VMAlertmanager object

func (*VMAlertmanagerReconciler) Reconcile

func (r *VMAlertmanagerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMAlertmanagerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

type VMClusterReconciler

type VMClusterReconciler struct {
	Client   client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMClusterReconciler reconciles a VMCluster object

func (*VMClusterReconciler) Reconcile

func (r *VMClusterReconciler) Reconcile(request ctrl.Request) (ctrl.Result, 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) 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
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMNodeScrapeReconciler reconciles a VMNodeScrape object

func (*VMNodeScrapeReconciler) Reconcile added in v0.6.0

func (r *VMNodeScrapeReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) 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
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMPodScrapeReconciler reconciles a VMPodScrape object

func (*VMPodScrapeReconciler) Reconcile

func (r *VMPodScrapeReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) 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
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMProbeReconciler reconciles a VMProbe object

func (*VMProbeReconciler) Reconcile added in v0.2.0

func (r *VMProbeReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) 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
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMRuleReconciler reconciles a VMRule object

func (*VMRuleReconciler) Reconcile

func (r *VMRuleReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMRuleReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

type VMServiceScrapeReconciler

type VMServiceScrapeReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMServiceScrapeReconciler reconciles a VMServiceScrape object

func (*VMServiceScrapeReconciler) Reconcile

func (r *VMServiceScrapeReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMServiceScrapeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

type VMSingleReconciler

type VMSingleReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	BaseConf *config.BaseOperatorConf
}

VMSingleReconciler reconciles a VMSingle object

func (*VMSingleReconciler) Reconcile

func (r *VMSingleReconciler) Reconcile(req ctrl.Request) (ctrl.Result, 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) SetupWithManager

func (r *VMSingleReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager general setup method

Directories

Path Synopsis
psp

Jump to

Keyboard shortcuts

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