comment out
This commit is contained in:
13
cmd/main.go
13
cmd/main.go
@@ -25,7 +25,7 @@ import (
|
|||||||
|
|
||||||
locustiov1alpha1 "git.lilpenguins.com/crichardson/locust-operator/api/v1alpha1"
|
locustiov1alpha1 "git.lilpenguins.com/crichardson/locust-operator/api/v1alpha1"
|
||||||
"git.lilpenguins.com/crichardson/locust-operator/internal/controller"
|
"git.lilpenguins.com/crichardson/locust-operator/internal/controller"
|
||||||
logging "git.lilpenguins.com/crichardson/locust-operator/internal/logging"
|
"git.lilpenguins.com/crichardson/locust-operator/internal/logging"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
@@ -41,8 +41,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
scheme = runtime.NewScheme()
|
scheme = runtime.NewScheme()
|
||||||
setupLog = ctrl.Log.WithName("setup")
|
// setupLog = ctrl.Log.WithName("setup")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -89,10 +89,11 @@ func main() {
|
|||||||
*/
|
*/
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
logger := logging.CreateFileLogger(logFilePath, zap.DebugLevel)
|
// logger := logging.CreateFileLogger(logFilePath, zap.DebugLevel)
|
||||||
|
setupLog := logging.CreateFileLogger(logFilePath, zap.DebugLevel)
|
||||||
|
|
||||||
// ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
|
// ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
|
||||||
ctrl.SetLogger(logger)
|
ctrl.SetLogger(setupLog)
|
||||||
|
|
||||||
// if the enable-http2 flag is false (the default), http/2 should be disabled
|
// if the enable-http2 flag is false (the default), http/2 should be disabled
|
||||||
// due to its vulnerabilities. More specifically, disabling http/2 will
|
// due to its vulnerabilities. More specifically, disabling http/2 will
|
||||||
@@ -210,7 +211,7 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
if err = (&controller.LocustClusterReconciler{
|
if err = (&controller.LocustClusterReconciler{
|
||||||
Client: mgr.GetClient(),
|
Client: mgr.GetClient(),
|
||||||
Log: logger.WithName("controllers").WithName("LocustCluster"),
|
Log: setupLog.WithName("controllers").WithName("LocustCluster"),
|
||||||
Scheme: mgr.GetScheme(),
|
Scheme: mgr.GetScheme(),
|
||||||
}).SetupWithManager(mgr, ctx); err != nil {
|
}).SetupWithManager(mgr, ctx); err != nil {
|
||||||
setupLog.Error(err, "unable to create controller", "controller", "LocustCluster")
|
setupLog.Error(err, "unable to create controller", "controller", "LocustCluster")
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ package controller
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/go-logr/logr"
|
|
||||||
|
|
||||||
locustiov1alpha1 "git.lilpenguins.com/crichardson/locust-operator/api/v1alpha1"
|
locustiov1alpha1 "git.lilpenguins.com/crichardson/locust-operator/api/v1alpha1"
|
||||||
|
"github.com/go-logr/logr"
|
||||||
apps "k8s.io/api/apps/v1"
|
apps "k8s.io/api/apps/v1"
|
||||||
batch "k8s.io/api/batch/v1"
|
batch "k8s.io/api/batch/v1"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
|||||||
Reference in New Issue
Block a user