Skip to content

Commit a1538c5

Browse files
authored
Merge pull request #403 from monopole/isolateK8sdeps
Isolate k8sdeps to top level internal.
2 parents 132cdad + e32e5c2 commit a1538c5

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

kustomize.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ import (
2020
"os"
2121

2222
"github.com/golang/glog"
23-
23+
"sigs.k8s.io/kustomize/internal/k8sdeps"
2424
"sigs.k8s.io/kustomize/pkg/commands"
2525
)
2626

2727
func main() {
2828
defer glog.Flush()
2929

30-
if err := commands.NewDefaultCommand().Execute(); err != nil {
30+
if err := commands.NewDefaultCommand(
31+
k8sdeps.NewKustDecoder(),
32+
k8sdeps.NewKustValidator()).Execute(); err != nil {
3133
os.Exit(1)
3234
}
3335
os.Exit(0)

pkg/commands/build_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"os"
2323
"path/filepath"
2424
"reflect"
25-
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
25+
"sigs.k8s.io/kustomize/internal/k8sdeps"
2626
"strings"
2727
"testing"
2828

pkg/commands/commands.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ package commands
2020
import (
2121
"flag"
2222
"os"
23-
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
2423

2524
"github.com/spf13/cobra"
2625
"sigs.k8s.io/kustomize/pkg/fs"
2726
"sigs.k8s.io/kustomize/pkg/ifc"
2827
)
2928

3029
// NewDefaultCommand returns the default (aka root) command for kustomize command.
31-
func NewDefaultCommand() *cobra.Command {
30+
func NewDefaultCommand(
31+
decoder ifc.Decoder, validator ifc.Validator) *cobra.Command {
3232
fsys := fs.MakeRealFS()
3333
stdOut := os.Stdout
3434

@@ -44,8 +44,8 @@ See https://sigs.k8s.io/kustomize
4444

4545
c.AddCommand(
4646
// TODO: Make consistent API for newCmd* functions.
47-
newCmdBuild(stdOut, fsys, k8sdeps.NewKustDecoder()),
48-
newCmdEdit(fsys, k8sdeps.NewKustValidator()),
47+
newCmdBuild(stdOut, fsys, decoder),
48+
newCmdEdit(fsys, validator),
4949
newCmdConfig(fsys),
5050
newCmdVersion(stdOut),
5151
)

pkg/resmap/resmap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package resmap
1919
import (
2020
"fmt"
2121
"reflect"
22-
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
22+
"sigs.k8s.io/kustomize/internal/k8sdeps"
2323
"testing"
2424

2525
"sigs.k8s.io/kustomize/pkg/gvk"

pkg/resource/resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package resource
1818

1919
import (
2020
"reflect"
21-
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
21+
"sigs.k8s.io/kustomize/internal/k8sdeps"
2222
"testing"
2323

2424
"sigs.k8s.io/kustomize/pkg/internal/loadertest"

pkg/target/kusttarget_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package target
1919
import (
2020
"encoding/base64"
2121
"reflect"
22-
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
22+
"sigs.k8s.io/kustomize/internal/k8sdeps"
2323
"strings"
2424
"testing"
2525

0 commit comments

Comments
 (0)