Documentation ¶
Index ¶
- Constants
- func GetConfigMapConfigName(mb *beatcrd.Metricbeat) (configMapName string)
- func GetConfigMapModuleName(mb *beatcrd.Metricbeat) (configMapName string)
- func GetContainerImage(mb *beatcrd.Metricbeat) string
- func GetGlobalServiceName(mb *beatcrd.Metricbeat) string
- func GetNetworkPolicyElasticsearchName(mb *beatcrd.Metricbeat) string
- func GetPDBName(mb *beatcrd.Metricbeat) (serviceName string)
- func GetSecretNameForCAElasticsearch(mb *beatcrd.Metricbeat) (secretName string)
- func GetSecretNameForCredentials(mb *beatcrd.Metricbeat) (secretName string)
- func GetStatefulsetName(mb *beatcrd.Metricbeat) (name string)
- func NewMetricbeatReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
- func TestBuildCAElasticsearchSecret(t *testing.T)
- type MetricbeatReconciler
- func (h *MetricbeatReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
- func (h *MetricbeatReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, ...) (res ctrl.Result, err error)
- func (h *MetricbeatReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
- func (r *MetricbeatReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (h *MetricbeatReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( ConfigmapCondition shared.ConditionName = "ConfigmapReady" ConfigmapPhase shared.PhaseName = "Configmap" )
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 ¶
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 GetStatefulsetName ¶
func GetStatefulsetName(mb *beatcrd.Metricbeat) (name string)
GetStatefulsetName permit to get the statefulset name
func NewMetricbeatReconciler ¶
func NewMetricbeatReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
Types ¶
type MetricbeatReconciler ¶
type MetricbeatReconciler struct { controller.Controller controller.MultiPhaseReconcilerAction controller.MultiPhaseReconciler controller.BaseReconciler // contains filtered or unexported fields }
MetricbeatReconciler reconciles a Metricbeat object
func (*MetricbeatReconciler) Delete ¶
func (h *MetricbeatReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
func (*MetricbeatReconciler) OnSuccess ¶
func (h *MetricbeatReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
func (*MetricbeatReconciler) Reconcile ¶
func (r *MetricbeatReconciler) 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 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) SetupWithManager ¶
func (h *MetricbeatReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- configmap_builder.go
- configmap_reconciler.go
- helper.go
- metricbeat_controller.go
- metricbeat_watcher.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