Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Feb 9, 2022
1 parent cfdde2b commit 909f70b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions apis/v1/jaeger_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (j *Jaeger) ValidateDelete() error {
return nil
}

// OpenShiftElasticsearchNodeCount returns total node count of Elasticsearch nodes.
func OpenShiftElasticsearchNodeCount(spec esv1.ElasticsearchSpec) int32 {
nodes := int32(0)
for i := 0; i < len(spec.Nodes); i++ {
Expand All @@ -101,6 +102,7 @@ func OpenShiftElasticsearchNodeCount(spec esv1.ElasticsearchSpec) int32 {
return nodes
}

// ShouldInjectOpenShiftElasticsearchConfiguration returns true if OpenShift Elasticsearch is used and its configuration should be used.
func ShouldInjectOpenShiftElasticsearchConfiguration(s JaegerStorageSpec) bool {
if s.Type != JaegerESStorage {
return false
Expand Down
14 changes: 7 additions & 7 deletions controllers/elasticsearch/elasticsearch_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ import (
"github.com/jaegertracing/jaeger-operator/pkg/controller/elasticsearch"
)

// ElasticsearchReconciler reconciles a Deployment object
type ElasticsearchReconciler struct {
// Reconciler reconciles a Deployment object
type Reconciler struct {
reconcilier *elasticsearch.ReconcileElasticsearch
}

// NewElasticsearchReconciler creates a new deployment reconciler controller
func NewElasticsearchReconciler(client client.Client, clientReader client.Reader) *ElasticsearchReconciler {
return &ElasticsearchReconciler{
// NewReconciler creates a new deployment reconciler controller
func NewReconciler(client client.Client, clientReader client.Reader) *Reconciler {
return &Reconciler{
reconcilier: elasticsearch.New(client, clientReader),
}
}

// +kubebuilder:rbac:groups=logging.openshift.io,resources=elasticsearch,verbs=get;list;watch;create;update;patch;delete

// Reconcile deployment resource
func (r *ElasticsearchReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
return r.reconcilier.Reconcile(ctx, request)
}

// SetupWithManager sets up the controller with the Manager.
func (r *ElasticsearchReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&esv1.Elasticsearch{}).
Complete(r)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/start/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func setupControllers(ctx context.Context, mgr manager.Manager) {
os.Exit(1)
}

if err := esv1controllers.NewElasticsearchReconciler(client, clientReader).SetupWithManager(mgr); err != nil {
if err := esv1controllers.NewReconciler(client, clientReader).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Elasticsearch")
os.Exit(1)
}
Expand Down

0 comments on commit 909f70b

Please sign in to comment.