controllers

package
v0.0.0-...-4c4f3c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GetElasticsearchHandler

func GetElasticsearchHandler(ctx context.Context, resource ElasticsearchReferer, client client.Client, dinamicClient dynamic.Interface, req ctrl.Request, log *logrus.Entry) (esHandler elasticsearchhandler.ElasticsearchHandler, err error)

func HashPassword

func HashPassword(password string) (string, error)

Types

type ElasticsearchComponentTemplateReconciler

type ElasticsearchComponentTemplateReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchComponentTemplateReconciler reconciles a ElasticsearchComponentTemplate object

func (*ElasticsearchComponentTemplateReconciler) Configure

func (r *ElasticsearchComponentTemplateReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchComponentTemplateReconciler) Create

func (r *ElasticsearchComponentTemplateReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new component template

func (*ElasticsearchComponentTemplateReconciler) Delete

func (r *ElasticsearchComponentTemplateReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete component from Elasticsearch

func (*ElasticsearchComponentTemplateReconciler) Diff

func (r *ElasticsearchComponentTemplateReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected component template exist

func (*ElasticsearchComponentTemplateReconciler) OnError

func (r *ElasticsearchComponentTemplateReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchComponentTemplateReconciler) OnSuccess

func (r *ElasticsearchComponentTemplateReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchComponentTemplateReconciler) Read

func (r *ElasticsearchComponentTemplateReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current component template

func (*ElasticsearchComponentTemplateReconciler) 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 ElasticsearchComponentTemplate 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.11.0/pkg/reconcile

func (*ElasticsearchComponentTemplateReconciler) SetupWithManager

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchComponentTemplateReconciler) Update

func (r *ElasticsearchComponentTemplateReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update component template from Elasticsearch

type ElasticsearchILMReconciler

type ElasticsearchILMReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchILMReconciler reconciles a ElasticsearchILM object

func (*ElasticsearchILMReconciler) Configure

func (r *ElasticsearchILMReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchILMReconciler) Create

func (r *ElasticsearchILMReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new ILM policy

func (*ElasticsearchILMReconciler) Delete

func (r *ElasticsearchILMReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete ILM from Elasticsearch

func (*ElasticsearchILMReconciler) Diff

func (r *ElasticsearchILMReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected ILM exist

func (*ElasticsearchILMReconciler) OnError

func (r *ElasticsearchILMReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchILMReconciler) OnSuccess

func (r *ElasticsearchILMReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchILMReconciler) Read

func (r *ElasticsearchILMReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current ILM policy

func (*ElasticsearchILMReconciler) 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 ElasticsearchILM 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.11.0/pkg/reconcile

func (*ElasticsearchILMReconciler) SetupWithManager

func (r *ElasticsearchILMReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchILMReconciler) Update

func (r *ElasticsearchILMReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update ILM from Elasticsearch

type ElasticsearchIndexTemplateReconciler

type ElasticsearchIndexTemplateReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchIndexTemplateReconciler reconciles a ElasticsearchIndexTemplate object

func (*ElasticsearchIndexTemplateReconciler) Configure

func (r *ElasticsearchIndexTemplateReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchIndexTemplateReconciler) Create

func (r *ElasticsearchIndexTemplateReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new index template

func (*ElasticsearchIndexTemplateReconciler) Delete

func (r *ElasticsearchIndexTemplateReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete index template from Elasticsearch

func (*ElasticsearchIndexTemplateReconciler) Diff

func (r *ElasticsearchIndexTemplateReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected index template exist

func (*ElasticsearchIndexTemplateReconciler) OnError

func (r *ElasticsearchIndexTemplateReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchIndexTemplateReconciler) OnSuccess

func (r *ElasticsearchIndexTemplateReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchIndexTemplateReconciler) Read

func (r *ElasticsearchIndexTemplateReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current index template

func (*ElasticsearchIndexTemplateReconciler) 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 ElasticsearchIndexTemplate 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.11.0/pkg/reconcile

func (*ElasticsearchIndexTemplateReconciler) SetupWithManager

func (r *ElasticsearchIndexTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchIndexTemplateReconciler) Update

func (r *ElasticsearchIndexTemplateReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update index template from Elasticsearch

type ElasticsearchReferer

type ElasticsearchReferer interface {
	GetElasticsearchRef() elkv1alpha1.ElasticsearchRefSpec
	IsManagedByECK() bool
}

type ElasticsearchRoleReconciler

type ElasticsearchRoleReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchRoleReconciler reconciles a ElasticsearchRole object

func (*ElasticsearchRoleReconciler) Configure

func (r *ElasticsearchRoleReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchRoleReconciler) Create

func (r *ElasticsearchRoleReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new elasticsearch role

func (*ElasticsearchRoleReconciler) Delete

func (r *ElasticsearchRoleReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete role from Elasticsearch

func (*ElasticsearchRoleReconciler) Diff

func (r *ElasticsearchRoleReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected role exist

func (*ElasticsearchRoleReconciler) OnError

func (r *ElasticsearchRoleReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchRoleReconciler) OnSuccess

func (r *ElasticsearchRoleReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchRoleReconciler) Read

func (r *ElasticsearchRoleReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current elasticsearch role

func (*ElasticsearchRoleReconciler) 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 ElasticsearchRole 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.11.0/pkg/reconcile

func (*ElasticsearchRoleReconciler) SetupWithManager

func (r *ElasticsearchRoleReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchRoleReconciler) Update

func (r *ElasticsearchRoleReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update role from Elasticsearch

type ElasticsearchSLMReconciler

type ElasticsearchSLMReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchSLMReconciler reconciles a ElasticsearchSLM object

func (*ElasticsearchSLMReconciler) Configure

func (r *ElasticsearchSLMReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchSLMReconciler) Create

func (r *ElasticsearchSLMReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new SLM policy

func (*ElasticsearchSLMReconciler) Delete

func (r *ElasticsearchSLMReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete SLM from Elasticsearch

func (*ElasticsearchSLMReconciler) Diff

func (r *ElasticsearchSLMReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected SLM exist

func (*ElasticsearchSLMReconciler) OnError

func (r *ElasticsearchSLMReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchSLMReconciler) OnSuccess

func (r *ElasticsearchSLMReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchSLMReconciler) Read

func (r *ElasticsearchSLMReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current SLM policy

func (*ElasticsearchSLMReconciler) 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 ElasticsearchSLM 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.11.0/pkg/reconcile

func (*ElasticsearchSLMReconciler) SetupWithManager

func (r *ElasticsearchSLMReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchSLMReconciler) Update

func (r *ElasticsearchSLMReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update SLM from Elasticsearch

type ElasticsearchSnapshotRepositoryReconciler

type ElasticsearchSnapshotRepositoryReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchSnapshotRepositoryReconciler reconciles a ElasticsearchSnapshotRepository object

func (*ElasticsearchSnapshotRepositoryReconciler) Configure

func (r *ElasticsearchSnapshotRepositoryReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchSnapshotRepositoryReconciler) Create

func (r *ElasticsearchSnapshotRepositoryReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new snapshot repository

func (*ElasticsearchSnapshotRepositoryReconciler) Delete

func (r *ElasticsearchSnapshotRepositoryReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete snapshot repository from Elasticsearch

func (*ElasticsearchSnapshotRepositoryReconciler) Diff

func (r *ElasticsearchSnapshotRepositoryReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected snapshot repository

func (*ElasticsearchSnapshotRepositoryReconciler) OnError

func (r *ElasticsearchSnapshotRepositoryReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchSnapshotRepositoryReconciler) OnSuccess

func (r *ElasticsearchSnapshotRepositoryReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchSnapshotRepositoryReconciler) Read

func (r *ElasticsearchSnapshotRepositoryReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current snapshot repository

func (*ElasticsearchSnapshotRepositoryReconciler) 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 ElasticsearchSnapshotRepository 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.11.0/pkg/reconcile

func (*ElasticsearchSnapshotRepositoryReconciler) SetupWithManager

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchSnapshotRepositoryReconciler) Update

func (r *ElasticsearchSnapshotRepositoryReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update snappshot repository from Elasticsearch

type ElasticsearchWatcherReconciler

type ElasticsearchWatcherReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

ElasticsearchWatcherReconciler reconciles a ElasticsearchWatcher object

func (*ElasticsearchWatcherReconciler) Configure

func (r *ElasticsearchWatcherReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*ElasticsearchWatcherReconciler) Create

func (r *ElasticsearchWatcherReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new watch

func (*ElasticsearchWatcherReconciler) Delete

func (r *ElasticsearchWatcherReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete watch from Elasticsearch

func (*ElasticsearchWatcherReconciler) Diff

func (r *ElasticsearchWatcherReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected watch exist

func (*ElasticsearchWatcherReconciler) OnError

func (r *ElasticsearchWatcherReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*ElasticsearchWatcherReconciler) OnSuccess

func (r *ElasticsearchWatcherReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*ElasticsearchWatcherReconciler) Read

func (r *ElasticsearchWatcherReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current watch

func (*ElasticsearchWatcherReconciler) 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 ElasticsearchWatcher 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.11.0/pkg/reconcile

func (*ElasticsearchWatcherReconciler) SetupWithManager

func (r *ElasticsearchWatcherReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ElasticsearchWatcherReconciler) Update

func (r *ElasticsearchWatcherReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update watch from Elasticsearch

type LicenseReconciler

type LicenseReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

LicenseReconciler reconciles a License object

func (*LicenseReconciler) Configure

func (r *LicenseReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler

func (*LicenseReconciler) Create

func (r *LicenseReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new license or enable basic license

func (*LicenseReconciler) Delete

func (r *LicenseReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete current license from Elasticsearch

func (*LicenseReconciler) Diff

func (r *LicenseReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected license exist

func (*LicenseReconciler) OnError

func (r *LicenseReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*LicenseReconciler) OnSuccess

func (r *LicenseReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*LicenseReconciler) Read

func (r *LicenseReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current License

func (*LicenseReconciler) Reconcile

func (r *LicenseReconciler) 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 License 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.11.0/pkg/reconcile

func (*LicenseReconciler) SetupWithManager

func (r *LicenseReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*LicenseReconciler) Update

func (r *LicenseReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update current license from Elasticsearch

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

func (*Reconciler) SetDinamicClient

func (r *Reconciler) SetDinamicClient(dc dynamic.Interface)

func (*Reconciler) SetLogger

func (r *Reconciler) SetLogger(log *logrus.Entry)

func (*Reconciler) SetReconsiler

func (r *Reconciler) SetReconsiler(reconciler controller.Reconciler)

func (*Reconciler) SetRecorder

func (r *Reconciler) SetRecorder(recorder record.EventRecorder)

type RoleMappingReconciler

type RoleMappingReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

RoleMappingReconciler reconciles a RoleMapping object

func (*RoleMappingReconciler) Configure

func (r *RoleMappingReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*RoleMappingReconciler) Create

func (r *RoleMappingReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add role mapping

func (*RoleMappingReconciler) Delete

func (r *RoleMappingReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete role mapping from Elasticsearch

func (*RoleMappingReconciler) Diff

func (r *RoleMappingReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected role mapping exist

func (*RoleMappingReconciler) OnError

func (r *RoleMappingReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*RoleMappingReconciler) OnSuccess

func (r *RoleMappingReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*RoleMappingReconciler) Read

func (r *RoleMappingReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current role mapping

func (*RoleMappingReconciler) Reconcile

func (r *RoleMappingReconciler) 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 RoleMapping 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.11.0/pkg/reconcile

func (*RoleMappingReconciler) SetupWithManager

func (r *RoleMappingReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*RoleMappingReconciler) Update

func (r *RoleMappingReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update role mapping from Elasticsearch

type Secret

type Secret struct {
	core.Secret
}

func (*Secret) GetObjectMeta

func (h *Secret) GetObjectMeta() metav1.ObjectMeta

GetObjectMeta permit to get the current ObjectMeta

func (*Secret) GetStatus

func (h *Secret) GetStatus() any

GetStatus permit to get the current status

type SecretReconciler

type SecretReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

SecretReconciler reconciles a Secret object

func (*SecretReconciler) Reconcile

func (r *SecretReconciler) 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 Secret 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.11.0/pkg/reconcile

func (*SecretReconciler) SetupWithManager

func (r *SecretReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type UserReconciler

type UserReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
}

UserReconciler reconciles a User object

func (*UserReconciler) Configure

func (r *UserReconciler) Configure(ctx context.Context, req ctrl.Request, resource resource.Resource) (meta any, err error)

Configure permit to init Elasticsearch handler It also permit to init condition

func (*UserReconciler) Create

func (r *UserReconciler) Create(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new user

func (*UserReconciler) Delete

func (r *UserReconciler) Delete(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete user from Elasticsearch

func (*UserReconciler) Diff

func (r *UserReconciler) Diff(resource resource.Resource, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected user exist

func (*UserReconciler) OnError

func (r *UserReconciler) OnError(ctx context.Context, resource resource.Resource, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*UserReconciler) OnSuccess

func (r *UserReconciler) OnSuccess(ctx context.Context, resource resource.Resource, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*UserReconciler) Read

func (r *UserReconciler) Read(ctx context.Context, resource resource.Resource, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current user It also read password from secret

func (*UserReconciler) Reconcile

func (r *UserReconciler) 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 User 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.11.0/pkg/reconcile

func (*UserReconciler) SetupWithManager

func (r *UserReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*UserReconciler) Update

func (r *UserReconciler) Update(ctx context.Context, resource resource.Resource, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update user from Elasticsearch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL