File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
commands/operator-sdk/cmd/up
test/ansible-operator/cmd/ansible-operator Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import (
38
38
"github.com/spf13/cobra"
39
39
"sigs.k8s.io/controller-runtime/pkg/client/config"
40
40
"sigs.k8s.io/controller-runtime/pkg/manager"
41
+ logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
41
42
)
42
43
43
44
func NewLocalCmd () * cobra.Command {
@@ -131,6 +132,9 @@ func upLocal() {
131
132
func upLocalAnsible () {
132
133
// Set the kubeconfig that the manager will be able to grab
133
134
os .Setenv (k8sutil .KubeConfigEnvVar , kubeConfig )
135
+
136
+ logf .SetLogger (logf .ZapLogger (false ))
137
+
134
138
mgr , err := manager .New (config .GetConfigOrDie (), manager.Options {Namespace : namespace })
135
139
if err != nil {
136
140
log .Fatal (err )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import (
27
27
log "github.com/sirupsen/logrus"
28
28
"sigs.k8s.io/controller-runtime/pkg/client/config"
29
29
"sigs.k8s.io/controller-runtime/pkg/manager"
30
+ logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
30
31
)
31
32
32
33
func printVersion () {
@@ -38,6 +39,8 @@ func printVersion() {
38
39
func main () {
39
40
flag .Parse ()
40
41
42
+ logf .SetLogger (logf .ZapLogger (false ))
43
+
41
44
namespace , err := k8sutil .GetWatchNamespace ()
42
45
if err != nil {
43
46
log .Fatalf ("failed to get watch namespace: (%v)" , err )
You can’t perform that action at this time.
0 commit comments