Documentation ¶
Index ¶
- Constants
- func GetConfigMapConfigName(fb *beatcrd.Filebeat) (configMapName string)
- func GetConfigMapModuleName(fb *beatcrd.Filebeat) (configMapName string)
- func GetContainerImage(fb *beatcrd.Filebeat) string
- func GetGlobalServiceName(fb *beatcrd.Filebeat) string
- func GetIngressName(fb *beatcrd.Filebeat, ingressName string) string
- func GetMetricbeatName(fb *beatcrd.Filebeat) (name string)
- func GetPDBName(fb *beatcrd.Filebeat) (serviceName string)
- func GetPodMonitorName(fb *beatcrd.Filebeat) string
- func GetSecretNameForCAElasticsearch(fb *beatcrd.Filebeat) (secretName string)
- func GetSecretNameForCredentials(fb *beatcrd.Filebeat) (secretName string)
- func GetServiceName(fb *beatcrd.Filebeat, serviceName string) string
- func GetStatefulsetName(fb *beatcrd.Filebeat) (name string)
- func NewFilebeatReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
- func TestBuildCAElasticsearchSecret(t *testing.T)
- type FilebeatReconciler
- func (h *FilebeatReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
- func (h *FilebeatReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, ...) (res ctrl.Result, err error)
- func (h *FilebeatReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
- func (r *FilebeatReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (h *FilebeatReconciler) 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 ( 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 ( 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 ¶
GetConfigMapConfigName permit to get the configMap name that store the config
func GetConfigMapModuleName ¶
GetConfigMapModuleName permit to get the configMap name that store the moodules settings
func GetContainerImage ¶
GetContainerImage permit to get the image name
func GetGlobalServiceName ¶
GetGlobalServiceName permit to get the global service name
func GetIngressName ¶
GetIngressName permit to get the ingress name
func GetMetricbeatName ¶
GetMetricbeatName return the metricbeat namme
func GetPDBName ¶
GetPDBName permit to get the pdb name
func GetPodMonitorName ¶
GetPodMonitorName return the name for podMonitor
func GetSecretNameForCAElasticsearch ¶
GetSecretNameForCAElasticsearch permit to get the secret name that store all Elasticsearch CA It return the secret name as string
func GetSecretNameForCredentials ¶
GetSecretNameForCredentials permit to get the secret name that store the credentials
func GetServiceName ¶
GetServiceName permit to get the service name
func GetStatefulsetName ¶
GetStatefulsetName permit to get the statefulset name
func NewFilebeatReconciler ¶
func NewFilebeatReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
Types ¶
type FilebeatReconciler ¶
type FilebeatReconciler struct { controller.Controller controller.MultiPhaseReconcilerAction controller.MultiPhaseReconciler controller.BaseReconciler // contains filtered or unexported fields }
FilebeatReconciler reconciles a Filebeat object
func (*FilebeatReconciler) Delete ¶
func (h *FilebeatReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
func (*FilebeatReconciler) OnSuccess ¶
func (h *FilebeatReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.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) SetupWithManager ¶
func (h *FilebeatReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- configmap_builder.go
- configmap_reconciler.go
- filebeat_controller.go
- filebeat_watcher.go
- helper.go
- ingress_builder.go
- ingress_reconciler.go
- metricbeat_builder.go
- metricbeat_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
- service_builder.go
- service_reconciler.go
- statefulset_builder.go
- statefulset_reconciler.go