common

package
v0.0.0-...-e114f96 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TotalErrors = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "elasticsearch_operator_errors_total",
			Help: "Number of errors from all controllers",
		},
	)
	ControllerErrors = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "elasticsearch_operator_errors_controller",
		Help: "Number of errors per controllers",
	}, []string{"controller", "namespace", "name"})
	ControllerInstances = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "elasticsearch_operator_instances_controller",
		Help: "Number of instance per controllers",
	}, []string{"controller", "namespace", "name"})
)

Functions

func DefaultControllerRateLimiter

func DefaultControllerRateLimiter[T comparable]() workqueue.TypedRateLimiter[T]

func GetElasticsearchFromRef

func GetElasticsearchFromRef(ctx context.Context, c client.Client, o client.Object, esRef shared.ElasticsearchRef) (es *elasticsearchcrd.Elasticsearch, err error)

GetElasticsearchRef permit to get Elasticsearch

func GetKibanaFromRef

func GetKibanaFromRef(ctx context.Context, c client.Client, o client.Object, kbRef shared.KibanaRef) (kb *kibanacrd.Kibana, err error)

GetKibanaRef permit to get Kibana

Types

type KubernetesCapability

type KubernetesCapability struct {
	HasRoute      bool
	HasPrometheus bool
}

KubernetesCapability descripte the capability of the current Kubernetes cluster

Jump to

Keyboard shortcuts

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