metricbeat

package
v0.0.0-...-14da6c7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 42 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 (
	RoleBindingCondition shared.ConditionName = "RoleBindingReady"
	RoleBindingPhase     shared.PhaseName     = "RoleBinding"
)
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 (
	ServiceAccountCondition shared.ConditionName = "ServiceAccountReady"
	ServiceAccountPhase     shared.PhaseName     = "ServiceAccount"
)
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 GetServiceAccountName

func GetServiceAccountName(mb *beatcrd.Metricbeat) string

GetServiceAccountName return the service account name

func GetStatefulsetName

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

GetStatefulsetName permit to get the statefulset name

func NewMetricbeatReconciler

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

func TestBuildCAElasticsearchSecret

func TestBuildCAElasticsearchSecret(t *testing.T)

Types

type MetricbeatReconciler

type MetricbeatReconciler struct {
	controller.Controller
	multiphase.MultiPhaseReconciler[*beatcrd.Metricbeat]
	multiphase.MultiPhaseReconcilerAction[*beatcrd.Metricbeat]
	// contains filtered or unexported fields
}

MetricbeatReconciler reconciles a Metricbeat object

func (*MetricbeatReconciler) Client

func (h *MetricbeatReconciler) Client() client.Client

func (*MetricbeatReconciler) Configure

func (h *MetricbeatReconciler) Configure(ctx context.Context, req reconcile.Request, o *beatcrd.Metricbeat, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

func (*MetricbeatReconciler) Delete

func (h *MetricbeatReconciler) Delete(ctx context.Context, o *beatcrd.Metricbeat, data map[string]any, logger *logrus.Entry) (err error)

func (*MetricbeatReconciler) OnError

func (h *MetricbeatReconciler) OnError(ctx context.Context, o *beatcrd.Metricbeat, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

func (*MetricbeatReconciler) OnSuccess

func (h *MetricbeatReconciler) OnSuccess(ctx context.Context, o *beatcrd.Metricbeat, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

func (*MetricbeatReconciler) Reconcile

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) Recorder

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