metricbeat

package
v0.0.0-...-31fc70c Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigmapCondition shared.ConditionName = "ConfigmapReady"
	ConfigmapPhase     shared.PhaseName     = "Configmap"
)
View Source
const (
	PdbCondition shared.ConditionName = "PodDisruptionBudgetReady"
	PdbPhase     shared.PhaseName     = "PodDisruptionBudget"
)
View Source
const (
	CAElasticsearchCondition shared.ConditionName = "CAElasticsearchReady"
	CAElasticsearchPhase     shared.PhaseName     = "CAElasticsearch"
)
View Source
const (
	CredentialCondition shared.ConditionName = "CredentialReady"
	CredentialPhase     shared.PhaseName     = "Credential"
)
View Source
const (
	ServiceCondition shared.ConditionName = "ServiceReady"
	ServicePhase     shared.PhaseName     = "Service"
)
View Source
const (
	StatefulsetCondition shared.ConditionName = "StatefulsetReady"
	StatefulsetPhase     shared.PhaseName     = "Statefulset"
)

Variables

This section is empty.

Functions

func GetConfigMapConfigName

func GetConfigMapConfigName(mb *beatcrd.Metricbeat) (configMapName string)

GetConfigMapConfigName permit to get the configMap name that store the config

func GetConfigMapModuleName

func GetConfigMapModuleName(mb *beatcrd.Metricbeat) (configMapName string)

GetConfigMapModuleName permit to get the configMap name that store the modules settings

func GetContainerImage

func GetContainerImage(mb *beatcrd.Metricbeat) string

GetContainerImage permit to get the image name

func GetGlobalServiceName

func GetGlobalServiceName(mb *beatcrd.Metricbeat) string

GetGlobalServiceName permit to get the global service name

func GetNetworkPolicyElasticsearchName

func GetNetworkPolicyElasticsearchName(mb *beatcrd.Metricbeat) string

GetNetworkPolicyElasticsearchName return the name for network policy to access on Elasticsearch

func GetPDBName

func GetPDBName(mb *beatcrd.Metricbeat) (serviceName string)

GetPDBName permit to get the pdb name

func GetSecretNameForCAElasticsearch

func GetSecretNameForCAElasticsearch(mb *beatcrd.Metricbeat) (secretName string)

GetSecretNameForCAElasticsearch permit to get the secret name that store all Elasticsearch CA It return the secret name as string

func GetSecretNameForCredentials

func GetSecretNameForCredentials(mb *beatcrd.Metricbeat) (secretName string)

GetSecretNameForCredentials permit to get the secret name that store the credentials

func GetStatefulsetName

func GetStatefulsetName(mb *beatcrd.Metricbeat) (name string)

GetStatefulsetName permit to get the statefulset name

func NewMetricbeatReconciler

func NewMetricbeatReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)

func TestBuildCAElasticsearchSecret

func TestBuildCAElasticsearchSecret(t *testing.T)

Types

type MetricbeatReconciler

type MetricbeatReconciler struct {
	controller.Controller
	controller.MultiPhaseReconcilerAction
	controller.MultiPhaseReconciler
	controller.BaseReconciler
	// contains filtered or unexported fields
}

MetricbeatReconciler reconciles a Metricbeat object

func (*MetricbeatReconciler) Delete

func (h *MetricbeatReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)

func (*MetricbeatReconciler) OnError

func (h *MetricbeatReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, currentErr error) (res ctrl.Result, err error)

func (*MetricbeatReconciler) OnSuccess

func (h *MetricbeatReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)

func (*MetricbeatReconciler) Reconcile

func (r *MetricbeatReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the metricbeat object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*MetricbeatReconciler) SetupWithManager

func (h *MetricbeatReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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