filebeat

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: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigmapCondition shared.ConditionName = "ConfigmapReady"
	ConfigmapPhase     shared.PhaseName     = "Configmap"
)
View Source
const (
	IngressCondition shared.ConditionName = "IngressReady"
	IngressPhase     shared.PhaseName     = "Ingress"
)
View Source
const (
	MetricbeatCondition shared.ConditionName = "MetricbeatReady"
	MetricbeatPhase     shared.PhaseName     = "Metricbeat"
)
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 (
	RouteCondition shared.ConditionName = "RouteReady"
	RoutePhase     shared.PhaseName     = "Route"
)
View Source
const (
	CAElasticsearchCondition shared.ConditionName = "CAElasticsearchReady"
	CAElasticsearchPhase     shared.PhaseName     = "CAElasticsearch"
)
View Source
const (
	CALogstashCondition shared.ConditionName = "CALogstashReady"
	CALogstashPhase     shared.PhaseName     = "CALogstash"
)
View Source
const (
	CredentialCondition shared.ConditionName = "CredentialReady"
	CredentialPhase     shared.PhaseName     = "Credential"
)
View Source
const (
	TlsCondition            shared.ConditionName = "TlsReady"
	TlsPhase                shared.PhaseName     = "Tls"
	DefaultRenewCertificate                      = -time.Hour * 24 * 30 // 30 days before expired
)
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(fb *beatcrd.Filebeat) (configMapName string)

GetConfigMapConfigName permit to get the configMap name that store the config

func GetConfigMapModuleName

func GetConfigMapModuleName(fb *beatcrd.Filebeat) (configMapName string)

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

func GetContainerImage

func GetContainerImage(fb *beatcrd.Filebeat) string

GetContainerImage permit to get the image name

func GetGlobalServiceName

func GetGlobalServiceName(fb *beatcrd.Filebeat) string

GetGlobalServiceName permit to get the global service name

func GetIngressName

func GetIngressName(fb *beatcrd.Filebeat, ingressName string) string

GetIngressName permit to get the ingress name

func GetLogstashFromRef

func GetLogstashFromRef(ctx context.Context, c client.Client, o client.Object, lsRef beatcrd.FilebeatLogstashRef) (ls *logstashcrd.Logstash, err error)

GetLogstashFromRef permit to get Logstash

func GetMetricbeatName

func GetMetricbeatName(fb *beatcrd.Filebeat) (name string)

GetMetricbeatName return the metricbeat namme

func GetPDBName

func GetPDBName(fb *beatcrd.Filebeat) (serviceName string)

GetPDBName permit to get the pdb name

func GetPodMonitorName

func GetPodMonitorName(fb *beatcrd.Filebeat) string

GetPodMonitorName return the name for podMonitor

func GetSecretNameForCAElasticsearch

func GetSecretNameForCAElasticsearch(fb *beatcrd.Filebeat) (secretName string)

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

func GetSecretNameForCALogstash

func GetSecretNameForCALogstash(fb *beatcrd.Filebeat) (secretName string)

GetSecretNameForCALogstash permit to get the secret name that store Logstash CA It return the secret name as string

func GetSecretNameForCredentials

func GetSecretNameForCredentials(fb *beatcrd.Filebeat) (secretName string)

GetSecretNameForCredentials permit to get the secret name that store the credentials

func GetSecretNameForPki

func GetSecretNameForPki(fb *beatcrd.Filebeat) (secretName string)

GetSecretNameForPki permit to get the secret name that store PKI It return the secret name as string

func GetSecretNameForTls

func GetSecretNameForTls(fb *beatcrd.Filebeat) (secretName string)

GetSecretNameForTls permit to get the secret name that store all certificates for Filebeat It return the secret name as string

func GetServiceAccountName

func GetServiceAccountName(fb *beatcrd.Filebeat) string

GetServiceAccountName return the service account name

func GetServiceName

func GetServiceName(fb *beatcrd.Filebeat, serviceName string) string

GetServiceName permit to get the service name

func GetStatefulsetName

func GetStatefulsetName(fb *beatcrd.Filebeat) (name string)

GetStatefulsetName permit to get the statefulset name

func NewFilebeatReconciler

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

func TestBuildCAElasticsearchSecret

func TestBuildCAElasticsearchSecret(t *testing.T)

func TestBuildCALogstashSecret

func TestBuildCALogstashSecret(t *testing.T)

Types

type FilebeatReconciler

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

FilebeatReconciler reconciles a Filebeat object

func (*FilebeatReconciler) Client

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

func (*FilebeatReconciler) Configure

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

func (*FilebeatReconciler) Delete

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

func (*FilebeatReconciler) OnError

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

func (*FilebeatReconciler) OnSuccess

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

func (*FilebeatReconciler) 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 Filebeat 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 (*FilebeatReconciler) Recorder

func (h *FilebeatReconciler) Recorder() record.EventRecorder

func (*FilebeatReconciler) SetupWithManager

func (h *FilebeatReconciler) 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