logstash

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: 49 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 (
	NetworkPolicyCondition shared.ConditionName = "NetworkPolicyReady"
	NetworkPolicyPhase     shared.PhaseName     = "NetworkPolicy"
)
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 (
	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 (
	StatefulsetCondition shared.ConditionName = "StatefulsetReady"
	StatefulsetPhase     shared.PhaseName     = "Statefulset"
)

Variables

This section is empty.

Functions

func GetConfigMapConfigName

func GetConfigMapConfigName(ls *logstashcrd.Logstash) (configMapName string)

GetConfigMapConfigName permit to get the configMap name that store the config

func GetConfigMapPatternName

func GetConfigMapPatternName(ls *logstashcrd.Logstash) (configMapName string)

GetConfigMapPatternName permit to get the configMap name that store the pattern

func GetConfigMapPipelineName

func GetConfigMapPipelineName(ls *logstashcrd.Logstash) (configMapName string)

GetConfigMapPipelineName permit to get the configMap name that store the piepline

func GetContainerImage

func GetContainerImage(ls *logstashcrd.Logstash) string

GetContainerImage permit to get the image name

func GetGlobalServiceName

func GetGlobalServiceName(ls *logstashcrd.Logstash) string

GetGlobalServiceName pemrit to get the global service name

func GetIngressName

func GetIngressName(ls *logstashcrd.Logstash, ingressName string) string

GetIngressName permit to get the ingress name

func GetMetricbeatName

func GetMetricbeatName(ls *logstashcrd.Logstash) (name string)

GetMetricbeatName return the metricbeat namme

func GetNetworkPolicyName

func GetNetworkPolicyName(ls *logstashcrd.Logstash) string

GetNetworkPolicyName return the name for network policy

func GetPDBName

func GetPDBName(ls *logstashcrd.Logstash) (serviceName string)

GetPDBName permit to get the pdb name

func GetPodMonitorName

func GetPodMonitorName(ls *logstashcrd.Logstash) string

GetPodMonitorName return the name for podMonitor

func GetSecretNameForCAElasticsearch

func GetSecretNameForCAElasticsearch(ls *logstashcrd.Logstash) (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(ls *logstashcrd.Logstash) (secretName string)

GetSecretNameForCredentials permit to get the secret name that store the credentials

func GetSecretNameForKeystore

func GetSecretNameForKeystore(ls *logstashcrd.Logstash) (secretName string)

GetSecretNameForKeystore permit to get the secret name that store the secret It will inject each key on keystore It return empty string if not secret provided

func GetSecretNameForPki

func GetSecretNameForPki(ls *logstashcrd.Logstash) (secretName string)

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

func GetSecretNameForTls

func GetSecretNameForTls(ls *logstashcrd.Logstash) (secretName string)

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

func GetServiceName

func GetServiceName(ls *logstashcrd.Logstash, serviceName string) string

GetServiceName permit to get the service name

func GetStatefulsetName

func GetStatefulsetName(ls *logstashcrd.Logstash) (name string)

GetStatefulsetName permit to get the statefulset name

func NewLogstashReconciler

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

func TestBuildCAElasticsearchSecret

func TestBuildCAElasticsearchSecret(t *testing.T)

Types

type LogstashReconciler

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

LogstashReconciler reconciles a Logstash object

func (*LogstashReconciler) Delete

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

func (*LogstashReconciler) OnError

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

func (*LogstashReconciler) OnSuccess

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

func (*LogstashReconciler) Reconcile

func (r *LogstashReconciler) 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 Logstash 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 (*LogstashReconciler) SetupWithManager

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