Starting v3 release for plugin developers.

[doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Per this Go modules [doc] a repo or branch that's
already tagged v2 or higher should increment the major
version (e.g. go to v3) when releasing their first Go
module-based packages.

At the moment, the kustomize repo has these top level
packages in the sigs.k8s.io/kustomize module:

 - `cmd` - holds main program for kustomize

	 Conceivably someone can depend on this
	 package for integration tests.

 - `internal` - intentionally unreleased subpackages

 - `k8sdeps` - an adapter wrapping k8s dependencies

	 This exists only for use in pre-Go-modules kustomize-into-kubectl
	 integration and won't live much longer (as everything involved is
	 switching to Go modules).

 - `pkg` - kustomize packages for export

	 This should shrink in later versions, since
	 the surface area is too large, containing
	 sub-packages that should be in 'internal'.

 - `plugin` - holds main programs for plugins

This PR changes the top level go.mod file from

```
module sigs.k8s.io/kustomize
```

to

```
module sigs.k8s.io/kustomize/v3
```

and adjusts all import statements to
reflect the change.
This commit is contained in:
jregan
2019-06-23 13:41:15 -07:00
parent 3127f1adc6
commit a7df00c07a
207 changed files with 626 additions and 638 deletions

View File

@@ -8,7 +8,7 @@ project_name: kustomize
builds: builds:
- main: ./cmd/kustomize/main.go - main: ./cmd/kustomize/main.go
binary: kustomize binary: kustomize
ldflags: -s -X sigs.k8s.io/kustomize/pkg/commands/misc.kustomizeVersion={{.Version}} -X sigs.k8s.io/kustomize/pkg/commands/misc.gitCommit={{.Commit}} -X sigs.k8s.io/kustomize/pkg/commands/misc.buildDate={{.Date}} ldflags: -s -X sigs.k8s.io/kustomize/v3/pkg/commands/misc.kustomizeVersion={{.Version}} -X sigs.k8s.io/kustomize/v3/pkg/commands/misc.gitCommit={{.Commit}} -X sigs.k8s.io/kustomize/v3/pkg/commands/misc.buildDate={{.Date}}
goos: goos:
- darwin - darwin
- linux - linux

View File

@@ -6,7 +6,7 @@ package main
import ( import (
"os" "os"
"sigs.k8s.io/kustomize/pkg/commands" "sigs.k8s.io/kustomize/v3/pkg/commands"
) )
func main() { func main() {

View File

@@ -12,8 +12,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/plugins" "sigs.k8s.io/kustomize/v3/pkg/plugins"
) )
func main() { func main() {

View File

@@ -23,17 +23,8 @@ kustomization file, and refering to this directory as a
wants to use it. This encourages modularity and wants to use it. This encourages modularity and
relocatability. relocatability.
At the moment (in v2.0.3), however, there's no To disable this, use v3, and the `load_restrictor` flag:
(released) analogous way to share patch files and other
transformer configuration data between kustomizations.
As a stop-gap until we add base-like behavior for
transformers, we've added a flag to disable the check:
``` ```
kustomize build --load_restrictor none $target kustomize build --load_restrictor none $target
``` ```
This flag is not in v2.0.3, but is available from head
(`go install sigs.k8s.io/kustomize`).

View File

@@ -23,13 +23,13 @@ To install from head with [Go] v1.12 or higher:
<!-- @installkustomize @test --> <!-- @installkustomize @test -->
``` ```
go install sigs.k8s.io/kustomize/cmd/kustomize go install sigs.k8s.io/kustomize/v3/cmd/kustomize
``` ```
### Other methods ### Other methods
#### macOS #### macOS
``` ```
brew install kustomize brew install kustomize
``` ```
@@ -44,4 +44,3 @@ For support on the chocolatey package
and prior releases, see: and prior releases, see:
- [Choco Package](https://chocolatey.org/packages/kustomize) - [Choco Package](https://chocolatey.org/packages/kustomize)
- [Package Source](https://github.com/kenmaglio/choco-kustomize) - [Package Source](https://github.com/kenmaglio/choco-kustomize)

View File

@@ -242,8 +242,8 @@ A [Go plugin] for kustomize looks like this:
> package main > package main
> >
> import ( > import (
> "sigs.k8s.io/kustomize/pkg/ifc" > "sigs.k8s.io/kustomize/v3/pkg/ifc"
> "sigs.k8s.io/kustomize/pkg/resmap" > "sigs.k8s.io/kustomize/v3/pkg/resmap"
> ... > ...
> ) > )
> >

View File

@@ -35,5 +35,5 @@ chmod u+x kustomize
<!-- @installkustomize @test --> <!-- @installkustomize @test -->
``` ```
go get sigs.k8s.io/kustomize go install sigs.k8s.io/kustomize/v3/cmd/kustomize
``` ```

View File

@@ -9,7 +9,7 @@ tests, and should work with HEAD
<!-- @installkustomize @test --> <!-- @installkustomize @test -->
``` ```
go get sigs.k8s.io/kustomize/cmd/kustomize go get sigs.k8s.io/kustomize/v3/cmd/kustomize
``` ```
Basic Usage Basic Usage

View File

@@ -7,7 +7,7 @@
这些示例通过了 [pre-commit](../../travis/pre-commit.sh) 测试,并且应该与 HEAD 一起使用。 这些示例通过了 [pre-commit](../../travis/pre-commit.sh) 测试,并且应该与 HEAD 一起使用。
``` ```
go get sigs.k8s.io/kustomize go get sigs.k8s.io/kustomize/v3/cmd/kustomize
``` ```
基本用法 基本用法

2
go.mod
View File

@@ -1,4 +1,4 @@
module sigs.k8s.io/kustomize module sigs.k8s.io/kustomize/v3
go 1.12 go 1.12

1
go.sum
View File

@@ -172,6 +172,7 @@ k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco= k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco=
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

View File

@@ -6,11 +6,11 @@ package loadertest
import ( import (
"log" "log"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
// FakeLoader encapsulates the delegate Loader and the fake file system. // FakeLoader encapsulates the delegate Loader and the fake file system.

View File

@@ -9,7 +9,7 @@ import (
"unicode/utf8" "unicode/utf8"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
func makeFreshConfigMap( func makeFreshConfigMap(

View File

@@ -9,10 +9,10 @@ import (
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func makeEnvConfigMap(name string) *corev1.ConfigMap { func makeEnvConfigMap(name string) *corev1.ConfigMap {

View File

@@ -4,8 +4,8 @@
package configmapandsecret package configmapandsecret
import ( import (
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// Factory makes ConfigMaps and Secrets. // Factory makes ConfigMaps and Secrets.

View File

@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
func makeFreshSecret( func makeFreshSecret(

View File

@@ -9,10 +9,10 @@ import (
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func makeEnvSecret(name string) *corev1.Secret { func makeEnvSecret(name string) *corev1.Secret {

View File

@@ -11,9 +11,9 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/util/yaml" "k8s.io/apimachinery/pkg/util/yaml"
"sigs.k8s.io/kustomize/k8sdeps/configmapandsecret" "sigs.k8s.io/kustomize/v3/k8sdeps/configmapandsecret"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// KunstructuredFactoryImpl hides construction using apimachinery types. // KunstructuredFactoryImpl hides construction using apimachinery types.

View File

@@ -20,7 +20,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
func TestSliceFromBytes(t *testing.T) { func TestSliceFromBytes(t *testing.T) {

View File

@@ -9,8 +9,8 @@ import (
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/kustomize/pkg/hasher" "sigs.k8s.io/kustomize/v3/pkg/hasher"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// kustHash computes a hash of an unstructured object. // kustHash computes a hash of an unstructured object.

View File

@@ -20,13 +20,13 @@ package kunstruct
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
var _ ifc.Kunstructured = &UnstructAdapter{} var _ ifc.Kunstructured = &UnstructAdapter{}

View File

@@ -5,9 +5,9 @@
package transformer package transformer
import ( import (
"sigs.k8s.io/kustomize/k8sdeps/transformer/patch" "sigs.k8s.io/kustomize/v3/k8sdeps/transformer/patch"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
) )
// FactoryImpl makes patch transformer and name hash transformer // FactoryImpl makes patch transformer and name hash transformer

View File

@@ -10,7 +10,7 @@ import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/mergepatch" "k8s.io/apimachinery/pkg/util/mergepatch"
"k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/strategicpatch"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
) )
type conflictDetector interface { type conflictDetector interface {

View File

@@ -12,11 +12,11 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
) )
// transformer applies strategic merge patches. // transformer applies strategic merge patches.

View File

@@ -8,9 +8,9 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/pkg/resmaptest" "sigs.k8s.io/kustomize/v3/pkg/resmaptest"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
) )
var rf = resource.NewFactory( var rf = resource.NewFactory(

View File

@@ -8,11 +8,11 @@ import (
"log" "log"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
"sigs.k8s.io/kustomize/pkg/transformers/config" "sigs.k8s.io/kustomize/v3/pkg/transformers/config"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// ResAccumulator accumulates resources and the rules // ResAccumulator accumulates resources and the rules

View File

@@ -10,14 +10,14 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
. "sigs.k8s.io/kustomize/pkg/accumulator" . "sigs.k8s.io/kustomize/v3/pkg/accumulator"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resmaptest" "sigs.k8s.io/kustomize/v3/pkg/resmaptest"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers/config" "sigs.k8s.io/kustomize/v3/pkg/transformers/config"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
func makeResAccumulator(t *testing.T) (*ResAccumulator, *resource.Factory) { func makeResAccumulator(t *testing.T) (*ResAccumulator, *resource.Factory) {

View File

@@ -11,15 +11,15 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/ifc/transformer" "sigs.k8s.io/kustomize/v3/pkg/ifc/transformer"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/plugins" "sigs.k8s.io/kustomize/v3/pkg/plugins"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/target" "sigs.k8s.io/kustomize/v3/pkg/target"
"sigs.k8s.io/kustomize/plugin/builtin" "sigs.k8s.io/kustomize/v3/plugin/builtin"
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
) )

View File

@@ -19,7 +19,7 @@ package build
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
) )
func TestNewOptionsToSilenceCodeInspectionError(t *testing.T) { func TestNewOptionsToSilenceCodeInspectionError(t *testing.T) {

View File

@@ -9,16 +9,16 @@ import (
"os" "os"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/k8sdeps/transformer" "sigs.k8s.io/kustomize/v3/k8sdeps/transformer"
"sigs.k8s.io/kustomize/k8sdeps/validator" "sigs.k8s.io/kustomize/v3/k8sdeps/validator"
"sigs.k8s.io/kustomize/pkg/commands/build" "sigs.k8s.io/kustomize/v3/pkg/commands/build"
"sigs.k8s.io/kustomize/pkg/commands/edit" "sigs.k8s.io/kustomize/v3/pkg/commands/edit"
"sigs.k8s.io/kustomize/pkg/commands/misc" "sigs.k8s.io/kustomize/v3/pkg/commands/misc"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
) )
// NewDefaultCommand returns the default (aka root) command for kustomize command. // NewDefaultCommand returns the default (aka root) command for kustomize command.

View File

@@ -22,8 +22,8 @@ import (
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
type addBaseOptions struct { type addBaseOptions struct {

View File

@@ -20,8 +20,8 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
const ( const (

View File

@@ -21,10 +21,10 @@ import (
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// kindOfAdd is the kind of metadata being added: label or annotation // kindOfAdd is the kind of metadata being added: label or annotation

View File

@@ -20,10 +20,10 @@ import (
"reflect" "reflect"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func makeKustomization(t *testing.T) *types.Kustomization { func makeKustomization(t *testing.T) *types.Kustomization {

View File

@@ -21,9 +21,9 @@ import (
"log" "log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/patch" "sigs.k8s.io/kustomize/v3/pkg/patch"
) )
type addPatchOptions struct { type addPatchOptions struct {

View File

@@ -21,7 +21,7 @@ import (
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
const ( const (

View File

@@ -21,8 +21,8 @@ import (
"log" "log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
type addResourceOptions struct { type addResourceOptions struct {

View File

@@ -20,7 +20,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
const ( const (

View File

@@ -5,8 +5,8 @@ package add
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// NewCmdAdd returns an instance of 'add' subcommand. // NewCmdAdd returns an instance of 'add' subcommand.

View File

@@ -5,10 +5,10 @@ package add
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// newCmdAddConfigMap returns a new command. // newCmdAddConfigMap returns a new command.

View File

@@ -6,10 +6,10 @@ package add
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func TestNewAddConfigMapIsNotNil(t *testing.T) { func TestNewAddConfigMapIsNotNil(t *testing.T) {

View File

@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
// flagsAndArgs encapsulates the options for add secret/configmap commands. // flagsAndArgs encapsulates the options for add secret/configmap commands.

View File

@@ -20,7 +20,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestDataValidation_NoName(t *testing.T) { func TestDataValidation_NoName(t *testing.T) {

View File

@@ -5,10 +5,10 @@ package add
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// newCmdAddSecret returns a new command. // newCmdAddSecret returns a new command.

View File

@@ -6,10 +6,10 @@ package add
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func TestNewCmdAddSecretIsNotNil(t *testing.T) { func TestNewCmdAddSecretIsNotNil(t *testing.T) {

View File

@@ -19,7 +19,7 @@ package add
import ( import (
"log" "log"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func globPatterns(fsys fs.FileSystem, patterns []string) ([]string, error) { func globPatterns(fsys fs.FileSystem, patterns []string) ([]string, error) {

View File

@@ -5,13 +5,13 @@ package edit
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/edit/add" "sigs.k8s.io/kustomize/v3/pkg/commands/edit/add"
"sigs.k8s.io/kustomize/pkg/commands/edit/fix" "sigs.k8s.io/kustomize/v3/pkg/commands/edit/fix"
"sigs.k8s.io/kustomize/pkg/commands/edit/remove" "sigs.k8s.io/kustomize/v3/pkg/commands/edit/remove"
"sigs.k8s.io/kustomize/pkg/commands/edit/set" "sigs.k8s.io/kustomize/v3/pkg/commands/edit/set"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
) )
// NewCmdEdit returns an instance of 'edit' subcommand. // NewCmdEdit returns an instance of 'edit' subcommand.

View File

@@ -18,8 +18,8 @@ package fix
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
// NewCmdFix returns an instance of 'fix' subcommand. // NewCmdFix returns an instance of 'fix' subcommand.

View File

@@ -20,7 +20,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestFix(t *testing.T) { func TestFix(t *testing.T) {

View File

@@ -18,8 +18,8 @@ package remove
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// NewCmdRemove returns an instance of 'remove' subcommand. // NewCmdRemove returns an instance of 'remove' subcommand.

View File

@@ -19,10 +19,10 @@ package remove
import ( import (
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"strings" "strings"
) )

View File

@@ -18,10 +18,10 @@ package remove
import ( import (
"fmt" "fmt"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
"strings" "strings"
"testing" "testing"
) )

View File

@@ -21,8 +21,8 @@ import (
"path/filepath" "path/filepath"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
type removeResourceOptions struct { type removeResourceOptions struct {

View File

@@ -22,7 +22,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestRemoveResources(t *testing.T) { func TestRemoveResources(t *testing.T) {

View File

@@ -18,8 +18,8 @@ package set
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// NewCmdSet returns an instance of 'set' subcommand. // NewCmdSet returns an instance of 'set' subcommand.

View File

@@ -20,8 +20,8 @@ import (
"errors" "errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
type setNamePrefixOptions struct { type setNamePrefixOptions struct {

View File

@@ -20,7 +20,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
const ( const (

View File

@@ -20,8 +20,8 @@ import (
"errors" "errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
type setNameSuffixOptions struct { type setNameSuffixOptions struct {

View File

@@ -20,7 +20,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
const ( const (

View File

@@ -23,9 +23,9 @@ import (
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/image" "sigs.k8s.io/kustomize/v3/pkg/image"
) )
type setImageOptions struct { type setImageOptions struct {

View File

@@ -21,7 +21,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestSetImage(t *testing.T) { func TestSetImage(t *testing.T) {

View File

@@ -22,9 +22,9 @@ import (
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
type setNamespaceOptions struct { type setNamespaceOptions struct {

View File

@@ -21,8 +21,8 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
const ( const (

View File

@@ -26,9 +26,9 @@ import (
"regexp" "regexp"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
) )

View File

@@ -21,9 +21,9 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
func TestFieldOrder(t *testing.T) { func TestFieldOrder(t *testing.T) {

View File

@@ -22,8 +22,8 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig" "sigs.k8s.io/kustomize/v3/pkg/transformers/config/defaultconfig"
) )
// NewCmdConfig returns an instance of 'config' subcommand. // NewCmdConfig returns an instance of 'config' subcommand.

View File

@@ -22,7 +22,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestValidate(t *testing.T) { func TestValidate(t *testing.T) {

View File

@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"testing" "testing"
. "sigs.k8s.io/kustomize/pkg/expansion" . "sigs.k8s.io/kustomize/v3/pkg/expansion"
) )
type expected struct { type expected struct {

View File

@@ -22,7 +22,7 @@ import (
"sort" "sort"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
) )
var _ FileSystem = &fakeFs{} var _ FileSystem = &fakeFs{}

View File

@@ -21,7 +21,7 @@ import (
"os/exec" "os/exec"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
// Cloner is a function that can clone a git repo. // Cloner is a function that can clone a git repo.

View File

@@ -21,7 +21,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
// Used as a temporary non-empty occupant of the cloneDir // Used as a temporary non-empty occupant of the cloneDir

View File

@@ -6,7 +6,7 @@ package hasher_test
import ( import (
"testing" "testing"
. "sigs.k8s.io/kustomize/pkg/hasher" . "sigs.k8s.io/kustomize/v3/pkg/hasher"
) )
func TestSortArrayAndComputeHash(t *testing.T) { func TestSortArrayAndComputeHash(t *testing.T) {

View File

@@ -5,8 +5,8 @@
package ifc package ifc
import ( import (
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// Validator provides functions to validate annotations and labels // Validator provides functions to validate annotations and labels

View File

@@ -5,8 +5,8 @@
package transformer package transformer
import ( import (
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
) )
// Factory makes transformers that require k8sdeps. // Factory makes transformers that require k8sdeps.

View File

@@ -6,7 +6,7 @@ package inventory
import ( import (
"encoding/json" "encoding/json"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
) )
//Refs is a reference map. Each key is the id //Refs is a reference map. Each key is the id

View File

@@ -19,7 +19,7 @@ package inventory
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
) )
func makeRefs() (Refs, Refs) { func makeRefs() (Refs, Refs) {

View File

@@ -9,17 +9,17 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/v3/internal/loadertest"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/k8sdeps/transformer" "sigs.k8s.io/kustomize/v3/k8sdeps/transformer"
"sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/v3/pkg/loader"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/plugins" "sigs.k8s.io/kustomize/v3/pkg/plugins"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/target" "sigs.k8s.io/kustomize/v3/pkg/target"
"sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig" "sigs.k8s.io/kustomize/v3/pkg/transformers/config/defaultconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// KustTestHarness helps test kustomization generation and transformation. // KustTestHarness helps test kustomization generation and transformation.

View File

@@ -9,9 +9,9 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/git" "sigs.k8s.io/kustomize/v3/pkg/git"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// fileLoader is a kustomization's interface to files. // fileLoader is a kustomization's interface to files.

View File

@@ -25,11 +25,11 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/git" "sigs.k8s.io/kustomize/v3/pkg/git"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
type testData struct { type testData struct {

View File

@@ -14,8 +14,8 @@ import (
"unicode/utf8" "unicode/utf8"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
var utf8bom = []byte{0xEF, 0xBB, 0xBF} var utf8bom = []byte{0xEF, 0xBB, 0xBF}

View File

@@ -7,9 +7,9 @@ import (
"reflect" "reflect"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
"sigs.k8s.io/kustomize/pkg/validators" "sigs.k8s.io/kustomize/v3/pkg/validators"
) )
func TestKeyValuesFromLines(t *testing.T) { func TestKeyValuesFromLines(t *testing.T) {

View File

@@ -18,9 +18,9 @@ limitations under the License.
package loader package loader
import ( import (
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
"sigs.k8s.io/kustomize/pkg/git" "sigs.k8s.io/kustomize/v3/pkg/git"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
) )
// NewLoader returns a Loader pointed at the given target. // NewLoader returns a Loader pointed at the given target.

View File

@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
//go:generate stringer -type=loadRestrictions //go:generate stringer -type=loadRestrictions

View File

@@ -20,7 +20,7 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/v3/pkg/fs"
) )
func TestRestrictionNone(t *testing.T) { func TestRestrictionNone(t *testing.T) {

View File

@@ -16,7 +16,7 @@ limitations under the License.
package patch package patch
import "sigs.k8s.io/kustomize/pkg/types" import "sigs.k8s.io/kustomize/v3/pkg/types"
// Append appends a slice of patch paths to a PatchStrategicMerge slice // Append appends a slice of patch paths to a PatchStrategicMerge slice
func Append(patches []types.PatchStrategicMerge, paths ...string) []types.PatchStrategicMerge { func Append(patches []types.PatchStrategicMerge, paths ...string) []types.PatchStrategicMerge {

View File

@@ -19,11 +19,11 @@ package transformer
import ( import (
"fmt" "fmt"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// PatchJson6902Factory makes PatchJson6902 transformers // PatchJson6902Factory makes PatchJson6902 transformers

View File

@@ -22,11 +22,11 @@ import (
"testing" "testing"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/v3/internal/loadertest"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/pkg/resmaptest" "sigs.k8s.io/kustomize/v3/pkg/resmaptest"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
var rf = resource.NewFactory( var rf = resource.NewFactory(

View File

@@ -21,10 +21,10 @@ import (
jsonpatch "github.com/evanphx/json-patch" jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
) )

View File

@@ -21,11 +21,11 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmaptest" "sigs.k8s.io/kustomize/v3/pkg/resmaptest"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
) )
var deploy = gvk.Gvk{Group: "apps", Version: "v1", Kind: "Deployment"} var deploy = gvk.Gvk{Group: "apps", Version: "v1", Kind: "Deployment"}

View File

@@ -25,7 +25,7 @@ import (
"strings" "strings"
"time" "time"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
) )
// Compiler creates Go plugin object files. // Compiler creates Go plugin object files.

View File

@@ -22,7 +22,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
. "sigs.k8s.io/kustomize/pkg/plugins" . "sigs.k8s.io/kustomize/v3/pkg/plugins"
) )
// Regression coverage over compiler behavior. // Regression coverage over compiler behavior.

View File

@@ -7,8 +7,8 @@ import (
"fmt" "fmt"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"path/filepath" "path/filepath"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
const ( const (

View File

@@ -1,7 +1,7 @@
// Copyright 2019 The Kubernetes Authors. // Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
package plugin package plugins
import ( import (
"io/ioutil" "io/ioutil"
@@ -11,15 +11,14 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/v3/pkg/pgmconfig"
"sigs.k8s.io/kustomize/pkg/plugins"
) )
// EnvForTest manages the plugin test environment. // EnvForTest manages the plugin test environment.
// It sets/resets XDG_CONFIG_HOME, makes/removes a temp objRoot. // It sets/resets XDG_CONFIG_HOME, makes/removes a temp objRoot.
type EnvForTest struct { type EnvForTest struct {
t *testing.T t *testing.T
compiler *plugins.Compiler compiler *Compiler
workDir string workDir string
oldXdg string oldXdg string
wasSet bool wasSet bool
@@ -62,7 +61,7 @@ func (x *EnvForTest) BuildExecPlugin(g, v, k string) {
} }
} }
func (x *EnvForTest) makeCompiler() *plugins.Compiler { func (x *EnvForTest) makeCompiler() *Compiler {
// The plugin loader wants to find object code under // The plugin loader wants to find object code under
// $XDG_CONFIG_HOME/kustomize/plugins // $XDG_CONFIG_HOME/kustomize/plugins
// and the compiler writes object code to // and the compiler writes object code to
@@ -74,11 +73,11 @@ func (x *EnvForTest) makeCompiler() *plugins.Compiler {
if err != nil { if err != nil {
x.t.Error(err) x.t.Error(err)
} }
srcRoot, err := plugins.DefaultSrcRoot() srcRoot, err := DefaultSrcRoot()
if err != nil { if err != nil {
x.t.Error(err) x.t.Error(err)
} }
return plugins.NewCompiler(srcRoot, objRoot) return NewCompiler(srcRoot, objRoot)
} }
func (x *EnvForTest) createWorkDir() { func (x *EnvForTest) createWorkDir() {

View File

@@ -25,9 +25,9 @@ import (
"strings" "strings"
"syscall" "syscall"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
) )

View File

@@ -20,10 +20,10 @@ import (
"strings" "strings"
"testing" "testing"
"sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/v3/internal/loadertest"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
) )
func TestExecPluginConfig(t *testing.T) { func TestExecPluginConfig(t *testing.T) {

View File

@@ -10,12 +10,12 @@ import (
"strings" "strings"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/transformers" "sigs.k8s.io/kustomize/v3/pkg/transformers"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
type Configurable interface { type Configurable interface {

View File

@@ -6,12 +6,11 @@ package plugins_test
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/v3/internal/loadertest"
"sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/v3/k8sdeps/kunstruct"
. "sigs.k8s.io/kustomize/pkg/plugins" . "sigs.k8s.io/kustomize/v3/pkg/plugins"
"sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/plugin"
) )
const ( const (
@@ -42,7 +41,7 @@ port: "12345"
) )
func TestLoader(t *testing.T) { func TestLoader(t *testing.T) {
tc := plugin.NewEnvForTest(t).Set() tc := NewEnvForTest(t).Set()
defer tc.Reset() defer tc.Reset()
tc.BuildGoPlugin( tc.BuildGoPlugin(

View File

@@ -6,7 +6,7 @@ package resid
import ( import (
"strings" "strings"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
) )
// ResId is an identifier of a k8s resource object. // ResId is an identifier of a k8s resource object.

View File

@@ -6,7 +6,7 @@ package resid
import ( import (
"testing" "testing"
"sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/v3/pkg/gvk"
) )
var stringTests = []struct { var stringTests = []struct {

View File

@@ -5,10 +5,10 @@ package resmap
import ( import (
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/internal/kusterr" "sigs.k8s.io/kustomize/v3/internal/kusterr"
"sigs.k8s.io/kustomize/pkg/ifc" "sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/pkg/types" "sigs.k8s.io/kustomize/v3/pkg/types"
) )
// Factory makes instances of ResMap. // Factory makes instances of ResMap.

Some files were not shown because too many files have changed in this diff Show More