mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Isolate k8sdeps to top level internal.
This commit is contained in:
@@ -20,14 +20,16 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
|
"sigs.k8s.io/kustomize/internal/k8sdeps"
|
||||||
"sigs.k8s.io/kustomize/pkg/commands"
|
"sigs.k8s.io/kustomize/pkg/commands"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
defer glog.Flush()
|
defer glog.Flush()
|
||||||
|
|
||||||
if err := commands.NewDefaultCommand().Execute(); err != nil {
|
if err := commands.NewDefaultCommand(
|
||||||
|
k8sdeps.NewKustDecoder(),
|
||||||
|
k8sdeps.NewKustValidator()).Execute(); err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
|
"sigs.k8s.io/kustomize/internal/k8sdeps"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ package commands
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"os"
|
"os"
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/pkg/fs"
|
"sigs.k8s.io/kustomize/pkg/fs"
|
||||||
@@ -28,7 +27,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// NewDefaultCommand returns the default (aka root) command for kustomize command.
|
// NewDefaultCommand returns the default (aka root) command for kustomize command.
|
||||||
func NewDefaultCommand() *cobra.Command {
|
func NewDefaultCommand(
|
||||||
|
decoder ifc.Decoder, validator ifc.Validator) *cobra.Command {
|
||||||
fsys := fs.MakeRealFS()
|
fsys := fs.MakeRealFS()
|
||||||
stdOut := os.Stdout
|
stdOut := os.Stdout
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ See https://sigs.k8s.io/kustomize
|
|||||||
|
|
||||||
c.AddCommand(
|
c.AddCommand(
|
||||||
// TODO: Make consistent API for newCmd* functions.
|
// TODO: Make consistent API for newCmd* functions.
|
||||||
newCmdBuild(stdOut, fsys, k8sdeps.NewKustDecoder()),
|
newCmdBuild(stdOut, fsys, decoder),
|
||||||
newCmdEdit(fsys, k8sdeps.NewKustValidator()),
|
newCmdEdit(fsys, validator),
|
||||||
newCmdConfig(fsys),
|
newCmdConfig(fsys),
|
||||||
newCmdVersion(stdOut),
|
newCmdVersion(stdOut),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package resmap
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
|
"sigs.k8s.io/kustomize/internal/k8sdeps"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/pkg/gvk"
|
"sigs.k8s.io/kustomize/pkg/gvk"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package resource
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
|
"sigs.k8s.io/kustomize/internal/k8sdeps"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/loadertest"
|
"sigs.k8s.io/kustomize/pkg/internal/loadertest"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package target
|
|||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
|
"sigs.k8s.io/kustomize/internal/k8sdeps"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user