Skip to content

Commit 83bc67c

Browse files
authored
remove glog dependency from kustomize code (#542)
1 parent 1648ece commit 83bc67c

File tree

5 files changed

+6
-19
lines changed

5 files changed

+6
-19
lines changed

Gopkg.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
name = "github.com/ghodss/yaml"
3535
version = "1.0.0"
3636

37-
[[constraint]]
38-
branch = "master"
39-
name = "github.com/golang/glog"
40-
4137
[[constraint]]
4238
name = "github.com/spf13/cobra"
4339
version = "0.0.2"
@@ -65,7 +61,3 @@
6561
[[constraint]]
6662
branch = "master"
6763
name = "github.com/hashicorp/go-getter"
68-
69-
[[constraint]]
70-
name = "github.com/krishicks/yaml-patch"
71-
version = "0.0.10"

kustomize.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ package main
1919
import (
2020
"os"
2121

22-
"github.com/golang/glog"
2322
"sigs.k8s.io/kustomize/k8sdeps"
2423
"sigs.k8s.io/kustomize/pkg/commands"
2524
)
2625

2726
func main() {
28-
defer glog.Flush()
29-
3027
if err := commands.NewDefaultCommand(k8sdeps.NewFactory()).Execute(); err != nil {
3128
os.Exit(1)
3229
}

pkg/resmap/resmap.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ package resmap
2020
import (
2121
"bytes"
2222
"fmt"
23+
"log"
2324
"reflect"
2425
"sort"
2526

2627
"github.com/ghodss/yaml"
27-
"github.com/golang/glog"
2828
"sigs.k8s.io/kustomize/pkg/ifc"
2929
"sigs.k8s.io/kustomize/pkg/resid"
3030
"sigs.k8s.io/kustomize/pkg/resource"
@@ -181,17 +181,17 @@ func MergeWithOverride(maps ...ResMap) (ResMap, error) {
181181
id = matchedId[0]
182182
switch r.Behavior() {
183183
case ifc.BehaviorReplace:
184-
glog.V(4).Infof(
184+
log.Printf(
185185
"Replace %v with %v", result[id].Map(), r.Map())
186186
r.Replace(result[id])
187187
result[id] = r
188188
result[id].SetBehavior(ifc.BehaviorCreate)
189189
case ifc.BehaviorMerge:
190-
glog.V(4).Infof(
190+
log.Printf(
191191
"Merging %v with %v", result[id].Map(), r.Map())
192192
r.Merge(result[id])
193193
result[id] = r
194-
glog.V(4).Infof(
194+
log.Printf(
195195
"Merged object is %v", result[id].Map())
196196
result[id].SetBehavior(ifc.BehaviorCreate)
197197
default:

pkg/target/kusttarget.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"bytes"
2222
"encoding/json"
2323
"fmt"
24+
"log"
2425
"strings"
2526

2627
"github.com/ghodss/yaml"
27-
"github.com/golang/glog"
2828
"github.com/pkg/errors"
2929
"sigs.k8s.io/kustomize/pkg/constants"
3030
"sigs.k8s.io/kustomize/pkg/fs"
@@ -318,7 +318,7 @@ func (kt *KustTarget) resolveRefVars(m resmap.ResMap) (map[string]string, error)
318318
}
319319
result[v.Name] = s
320320
} else {
321-
glog.Infof("couldn't resolve v: %v", v)
321+
log.Printf("couldn't resolve v: %v", v)
322322
}
323323
}
324324
return result, nil

0 commit comments

Comments
 (0)