Skip to content

Commit

Permalink
Made changes based on peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoaeb Jindani committed Apr 5, 2024
1 parent 8a2360a commit 0654b3b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions controllers/ibpca/ibpca_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ func (r *ReconcileIBPCA) Reconcile(ctx context.Context, request reconcile.Reques
var err error

reqLogger := r.Config.Logger
reqLogger.Info(fmt.Sprintf("Request.Namespace '%s' Request.Name '%s'", request.Namespace, request.Name))

// If ca-restart-config configmap is the object being reconciled, reconcile the
// restart configmap.
if request.Name == "ca-restart-config" {
Expand Down
2 changes: 2 additions & 0 deletions controllers/ibpconsole/ibpconsole_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ func (r *ReconcileIBPConsole) Reconcile(ctx context.Context, request reconcile.R
var err error

reqLogger := r.Config.Logger
reqLogger.Info(fmt.Sprintf("Request.Namespace '%s' Request.Name '%s'", request.Namespace, request.Name))

reqLogger.Info(fmt.Sprintf("Reconciling IBPConsole with update values of [ %+v ]", r.update.GetUpdateStackWithTrues()))

// Fetch the IBPConsole instance
Expand Down
2 changes: 2 additions & 0 deletions controllers/ibporderer/ibporderer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ func (r *ReconcileIBPOrderer) Reconcile(ctx context.Context, request reconcile.R
var err error

reqLogger := r.Config.Logger
reqLogger.Info(fmt.Sprintf("Request.Namespace '%s' Request.Name '%s'", request.Namespace, request.Name))

// If orderer-restart-config configmap is the object being reconciled, reconcile the
// restart configmap.
if request.Name == "orderer-restart-config" {
Expand Down
1 change: 1 addition & 0 deletions controllers/ibppeer/ibppeer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (r *ReconcileIBPPeer) Reconcile(ctx context.Context, request reconcile.Requ
var err error

reqLogger := r.Config.Logger
reqLogger.Info(fmt.Sprintf("Request.Namespace '%s' Request.Name '%s'", request.Namespace, request.Name))
// If peer-restart-config configmap is the object being reconciled, reconcile the
// restart configmap.
if request.Name == "peer-restart-config" {
Expand Down
5 changes: 1 addition & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package main

import (
"fmt"
"os"
"path/filepath"
"time"

Expand Down Expand Up @@ -75,12 +74,10 @@ func main() {

operatorCfg.Operator.SetDefaults()
zaplogger, err := util.SetupLogging("DEBUG")
operatorCfg.Logger = zaplogger
if err != nil {
fmt.Print("error initiating the logger", err)
fmt.Print("Will exit Operator", err)
os.Exit(1)
}
operatorCfg.Logger = zaplogger
if err := command.Operator(operatorCfg); err != nil {
log.Error(err, "failed to start operator")
time.Sleep(15 * time.Second)
Expand Down

0 comments on commit 0654b3b

Please sign in to comment.