Documentation
¶
Index ¶
- Constants
- func GetConfigMapConfigName(ls *logstashcrd.Logstash) (configMapName string)
- func GetConfigMapPatternName(ls *logstashcrd.Logstash) (configMapName string)
- func GetConfigMapPipelineName(ls *logstashcrd.Logstash) (configMapName string)
- func GetContainerImage(ls *logstashcrd.Logstash) string
- func GetGlobalServiceName(ls *logstashcrd.Logstash) string
- func GetIngressName(ls *logstashcrd.Logstash, ingressName string) string
- func GetMetricbeatName(ls *logstashcrd.Logstash) (name string)
- func GetNetworkPolicyName(ls *logstashcrd.Logstash) string
- func GetPDBName(ls *logstashcrd.Logstash) (serviceName string)
- func GetPodMonitorName(ls *logstashcrd.Logstash) string
- func GetSecretNameForCAElasticsearch(ls *logstashcrd.Logstash) (secretName string)
- func GetSecretNameForCredentials(ls *logstashcrd.Logstash) (secretName string)
- func GetSecretNameForKeystore(ls *logstashcrd.Logstash) (secretName string)
- func GetSecretNameForPki(ls *logstashcrd.Logstash) (secretName string)
- func GetSecretNameForTls(ls *logstashcrd.Logstash) (secretName string)
- func GetServiceName(ls *logstashcrd.Logstash, serviceName string) string
- func GetStatefulsetName(ls *logstashcrd.Logstash) (name string)
- func NewLogstashReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
- func TestBuildCAElasticsearchSecret(t *testing.T)
- type LogstashReconciler
- func (h *LogstashReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
- func (h *LogstashReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, ...) (res ctrl.Result, err error)
- func (h *LogstashReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
- func (r *LogstashReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (h *LogstashReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( ConfigmapCondition shared.ConditionName = "ConfigmapReady" ConfigmapPhase shared.PhaseName = "Configmap" )
const ( IngressCondition shared.ConditionName = "IngressReady" IngressPhase shared.PhaseName = "Ingress" )
const ( MetricbeatCondition shared.ConditionName = "MetricbeatReady" MetricbeatPhase shared.PhaseName = "Metricbeat" )
const ( NetworkPolicyCondition shared.ConditionName = "NetworkPolicyReady" NetworkPolicyPhase shared.PhaseName = "NetworkPolicy" )
const ( PdbCondition shared.ConditionName = "PodDisruptionBudgetReady" PdbPhase shared.PhaseName = "PodDisruptionBudget" )
const ( CAElasticsearchCondition shared.ConditionName = "CAElasticsearchReady" CAElasticsearchPhase shared.PhaseName = "CAElasticsearch" )
const ( CredentialCondition shared.ConditionName = "CredentialReady" CredentialPhase shared.PhaseName = "Credential" )
const ( TlsCondition shared.ConditionName = "TlsReady" TlsPhase shared.PhaseName = "Tls" DefaultRenewCertificate = -time.Hour * 24 * 30 // 30 days before expired )
const ( ServiceCondition shared.ConditionName = "ServiceReady" ServicePhase shared.PhaseName = "Service" )
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)
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) OnSuccess ¶
func (h *LogstashReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
func (*LogstashReconciler) 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 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.
Source Files
¶
- configmap_builder.go
- configmap_reconciler.go
- helper.go
- ingress_builder.go
- ingress_reconciler.go
- logstash_controller.go
- logstash_watcher.go
- metricbeat_builder.go
- metricbeat_reconciler.go
- networkpolicy_builder.go
- networkpolicy_reconciler.go
- pdb_builder.go
- pdb_reconciler.go
- secret_ca_elasticsearch_builder.go
- secret_ca_elasticsearch_builder_test..go
- secret_ca_elasticsearch_reconciler.go
- secret_credential_builder.go
- secret_credential_reconciler.go
- secret_tls_builder.go
- secret_tls_reconciler.go
- service_builder.go
- service_reconciler.go
- statefulset_builder.go
- statefulset_reconciler.go