Skip to content

Commit

Permalink
ceph: force upper case for Operator log level
Browse files Browse the repository at this point in the history
When the operator configmap is edited, it is likely that some user will
simply put "debug" instead of "DEBUG", so let's always transform the
value to upper case to ease user experience.

Signed-off-by: Sébastien Han <[email protected]>
  • Loading branch information
leseb authored and pull[bot] committed Dec 1, 2023
1 parent 5e6c632 commit 2229646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/operator/ceph/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"context"
"os"
"os/signal"
"strings"
"syscall"

"github.com/coreos/pkg/capnslog"
Expand Down Expand Up @@ -109,7 +110,7 @@ func (o *Operator) updateOperatorLogLevel() error {
rookLogLevel = "INFO"
}

logLevel, err := capnslog.ParseLevel(rookLogLevel)
logLevel, err := capnslog.ParseLevel(strings.ToUpper(rookLogLevel))
if err != nil {
return errors.Wrapf(err, "failed to load ROOK_LOG_LEVEL %q.", rookLogLevel)
}
Expand Down

0 comments on commit 2229646

Please sign in to comment.