mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
Compare commits
11 Commits
api/v0.1.1
...
kustomize/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7050c6a7b6 | ||
|
|
02f9b98b5a | ||
|
|
ce7ebe3299 | ||
|
|
0a8faced8f | ||
|
|
3c06debf98 | ||
|
|
fcee91eafd | ||
|
|
b0b3a705f4 | ||
|
|
67c8fbcc3c | ||
|
|
9b50b78ec8 | ||
|
|
943a1b0195 | ||
|
|
f77143cd34 |
@@ -8,8 +8,6 @@ require (
|
|||||||
github.com/pkg/errors v0.8.1
|
github.com/pkg/errors v0.8.1
|
||||||
github.com/spf13/cobra v0.0.5
|
github.com/spf13/cobra v0.0.5
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
sigs.k8s.io/kustomize/api v0.0.1
|
sigs.k8s.io/kustomize/api v0.1.1
|
||||||
sigs.k8s.io/yaml v1.1.0
|
sigs.k8s.io/yaml v1.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
replace sigs.k8s.io/kustomize/api v0.0.1 => ../api
|
|
||||||
|
|||||||
@@ -202,7 +202,8 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
|||||||
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||||
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY=
|
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY=
|
||||||
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||||
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
|
sigs.k8s.io/kustomize/api v0.1.1 h1:W2dWXex2MhF4/EZNokZllvet2RejCHqdAFklufN7VTg=
|
||||||
|
sigs.k8s.io/kustomize/api v0.1.1/go.mod h1:FyfJD1q1QMjC/TvK78b6cCtZB+mbpnGIo9YOvbucJes=
|
||||||
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=
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type addBaseOptions struct {
|
type addBaseOptions struct {
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// kindOfAdd is the kind of metadata being added: label or annotation
|
// kindOfAdd is the kind of metadata being added: label or annotation
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ package add
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/testutils/valtest"
|
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeKustomization(t *testing.T) *types.Kustomization {
|
func makeKustomization(t *testing.T) *types.Kustomization {
|
||||||
@@ -73,7 +73,7 @@ func TestAddAnnotationInvalidFormat(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("expected an error")
|
t.Errorf("expected an error")
|
||||||
}
|
}
|
||||||
if err.Error() != validators.SAD {
|
if err.Error() != valtest_test.SAD {
|
||||||
t.Errorf("incorrect error: %v", err.Error())
|
t.Errorf("incorrect error: %v", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ func TestAddLabelInvalidFormat(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("expected an error")
|
t.Errorf("expected an error")
|
||||||
}
|
}
|
||||||
if err.Error() != validators.SAD {
|
if err.Error() != valtest_test.SAD {
|
||||||
t.Errorf("incorrect error: %v", err.Error())
|
t.Errorf("incorrect error: %v", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type addPatchOptions struct {
|
type addPatchOptions struct {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type addResourceOptions struct {
|
type addResourceOptions struct {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ package add
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/ifc"
|
"sigs.k8s.io/kustomize/api/ifc"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newCmdAddConfigMap returns a new command.
|
// newCmdAddConfigMap returns a new command.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/kv"
|
"sigs.k8s.io/kustomize/api/kv"
|
||||||
"sigs.k8s.io/kustomize/api/loader"
|
"sigs.k8s.io/kustomize/api/loader"
|
||||||
"sigs.k8s.io/kustomize/api/testutils/valtest"
|
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// flagsAndArgs encapsulates the options for add secret/configmap commands.
|
// flagsAndArgs encapsulates the options for add secret/configmap commands.
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ package add
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/ifc"
|
"sigs.k8s.io/kustomize/api/ifc"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newCmdAddSecret returns a new command.
|
// newCmdAddSecret returns a new command.
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/kv"
|
"sigs.k8s.io/kustomize/api/kv"
|
||||||
|
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/loader"
|
"sigs.k8s.io/kustomize/api/loader"
|
||||||
"sigs.k8s.io/kustomize/api/testutils/valtest"
|
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFix(t *testing.T) {
|
func TestFix(t *testing.T) {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
// kindOfAdd is the kind of metadata being added: label or annotation
|
// kindOfAdd is the kind of metadata being added: label or annotation
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/testutils/valtest"
|
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeKustomizationFS() filesys.FileSystem {
|
func makeKustomizationFS() filesys.FileSystem {
|
||||||
@@ -147,7 +147,7 @@ func TestRemoveAnnotationInvalidFormat(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("expected an error")
|
t.Errorf("expected an error")
|
||||||
}
|
}
|
||||||
if err.Error() != validators.SAD {
|
if err.Error() != valtest_test.SAD {
|
||||||
t.Errorf("incorrect error: %v", err.Error())
|
t.Errorf("incorrect error: %v", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ func TestRemoveLabelInvalidFormat(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("expected an error")
|
t.Errorf("expected an error")
|
||||||
}
|
}
|
||||||
if err.Error() != validators.SAD {
|
if err.Error() != valtest_test.SAD {
|
||||||
t.Errorf("incorrect error: %v", err.Error())
|
t.Errorf("incorrect error: %v", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
|
||||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type removePatchOptions struct {
|
type removePatchOptions struct {
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||||
|
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type removeResourceOptions struct {
|
type removeResourceOptions struct {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRemoveResources(t *testing.T) {
|
func TestRemoveResources(t *testing.T) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetImage(t *testing.T) {
|
func TestSetImage(t *testing.T) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/testutils/valtest"
|
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetReplicas(t *testing.T) {
|
func TestSetReplicas(t *testing.T) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"sigs.k8s.io/kustomize/api/filesys"
|
"sigs.k8s.io/kustomize/api/filesys"
|
||||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||||
"sigs.k8s.io/kustomize/api/types"
|
"sigs.k8s.io/kustomize/api/types"
|
||||||
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFieldOrder(t *testing.T) {
|
func TestFieldOrder(t *testing.T) {
|
||||||
|
|||||||
@@ -2,6 +2,4 @@ module sigs.k8s.io/kustomize/pluginator
|
|||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require sigs.k8s.io/kustomize/api v0.0.1
|
require sigs.k8s.io/kustomize/api v0.1.1
|
||||||
|
|
||||||
replace sigs.k8s.io/kustomize/api v0.0.1 => ../api
|
|
||||||
|
|||||||
@@ -152,6 +152,8 @@ k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUc
|
|||||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||||
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||||
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||||
|
sigs.k8s.io/kustomize/api v0.1.1 h1:W2dWXex2MhF4/EZNokZllvet2RejCHqdAFklufN7VTg=
|
||||||
|
sigs.k8s.io/kustomize/api v0.1.1/go.mod h1:FyfJD1q1QMjC/TvK78b6cCtZB+mbpnGIo9YOvbucJes=
|
||||||
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=
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ files.
|
|||||||
|
|
||||||
#### Packages
|
#### Packages
|
||||||
|
|
||||||
There's only one package in this module. It's called `main`,
|
There's only one public package in this module.
|
||||||
and it holds the _kustomize_ executable.
|
It's called `main`, and it holds the _kustomize_ executable.
|
||||||
|
|
||||||
|
|
||||||
#### Release artifacts
|
#### Release artifacts
|
||||||
@@ -113,6 +113,10 @@ The tag appears in the URL, e.g. [pluginator/v1.0.0].
|
|||||||
|
|
||||||
## Release procedure
|
## Release procedure
|
||||||
|
|
||||||
|
> TODO: script this, e.g. `go run ./releasing/release.go kustomize minor`
|
||||||
|
> would look at the tags, bump the minor version, and
|
||||||
|
> create the right branch, tag, etc. No more bash please.
|
||||||
|
|
||||||
At any given moment, the repository's master branch is
|
At any given moment, the repository's master branch is
|
||||||
passing all its tests and contains code one could release.
|
passing all its tests and contains code one could release.
|
||||||
|
|
||||||
@@ -132,6 +136,18 @@ module=kustomize # The kustomize executable
|
|||||||
module=api # The API
|
module=api # The API
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### review tags to help determine new tag
|
||||||
|
|
||||||
|
Local:
|
||||||
|
```
|
||||||
|
git tag -l | grep $module
|
||||||
|
```
|
||||||
|
|
||||||
|
Remote:
|
||||||
|
```
|
||||||
|
git ls-remote --tags upstream | grep $module
|
||||||
|
```
|
||||||
|
|
||||||
### determine the version
|
### determine the version
|
||||||
|
|
||||||
Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
|
Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
|
||||||
@@ -139,7 +155,7 @@ Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
|
|||||||
| major | minor | patch |
|
| major | minor | patch |
|
||||||
| :---: | :---: | :---: |
|
| :---: | :---: | :---: |
|
||||||
| API change | enhancements | bug fixes |
|
| API change | enhancements | bug fixes |
|
||||||
| manual update | OK to auto-update | OK to auto-update |
|
| manual update | maybe auto-update | auto-update encouraged |
|
||||||
|
|
||||||
- If there are only bug fixes or refactors, increment `patch` from whatever it is now.
|
- If there are only bug fixes or refactors, increment `patch` from whatever it is now.
|
||||||
- If there are new features, increment `minor`.
|
- If there are new features, increment `minor`.
|
||||||
@@ -172,10 +188,17 @@ Create it:
|
|||||||
git checkout -b $branch
|
git checkout -b $branch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### define the release tag
|
||||||
|
|
||||||
### remove API replacements from go.mod
|
```
|
||||||
|
tag="${module}/v${major}.${minor}.${patch}"
|
||||||
|
echo "tag=$tag"
|
||||||
|
```
|
||||||
|
|
||||||
Only do this if releasing one of the executables.
|
### pin the executable to a particular API version
|
||||||
|
|
||||||
|
Only do this if releasing one of the
|
||||||
|
executables (kustomize or pluginator).
|
||||||
|
|
||||||
In this repository, an executable in development
|
In this repository, an executable in development
|
||||||
on the master branch typically depends on the API
|
on the master branch typically depends on the API
|
||||||
@@ -193,22 +216,12 @@ requires.
|
|||||||
```
|
```
|
||||||
# Update the following as needed, obviously.
|
# Update the following as needed, obviously.
|
||||||
|
|
||||||
if [ "$module" != "api" ]; then
|
# git checkout -b pinTheRelease
|
||||||
# go mod edit -dropreplace=sigs.k8s.io/kustomize/api $module/go.mod
|
# go mod edit -dropreplace=sigs.k8s.io/kustomize/api $module/go.mod
|
||||||
# go mod edit -require=sigs.k8s.io/kustomize/api@v?.0.1 $module/go.mod
|
# go mod edit -require=sigs.k8s.io/kustomize/api@v0.1.1 $module/go.mod
|
||||||
# git commit -a -m "Drop API module replacement"
|
# git commit -a -m "Drop API module replacement"
|
||||||
fi
|
|
||||||
```
|
|
||||||
|
|
||||||
### optionally build a release locally
|
|
||||||
|
|
||||||
Install [`cloud-build-local`], then run
|
|
||||||
|
|
||||||
```
|
```
|
||||||
./releasing/localbuild.sh $module
|
|
||||||
```
|
|
||||||
|
|
||||||
This should create release artifacts in a local directory.
|
|
||||||
|
|
||||||
### push the release branch
|
### push the release branch
|
||||||
|
|
||||||
@@ -216,26 +229,6 @@ This should create release artifacts in a local directory.
|
|||||||
git push -f upstream $branch
|
git push -f upstream $branch
|
||||||
```
|
```
|
||||||
|
|
||||||
### optionally review tags
|
|
||||||
|
|
||||||
|
|
||||||
Local:
|
|
||||||
```
|
|
||||||
git tag -l
|
|
||||||
```
|
|
||||||
|
|
||||||
Remote:
|
|
||||||
```
|
|
||||||
git ls-remote --tags upstream
|
|
||||||
```
|
|
||||||
|
|
||||||
### define the release tag
|
|
||||||
|
|
||||||
```
|
|
||||||
tag="${module}/v${major}.${minor}.${patch}"
|
|
||||||
echo "tag=$tag"
|
|
||||||
```
|
|
||||||
|
|
||||||
### if replacing a release...
|
### if replacing a release...
|
||||||
|
|
||||||
Must delete the tag before re-pushing it.
|
Must delete the tag before re-pushing it.
|
||||||
@@ -268,6 +261,16 @@ version.
|
|||||||
git tag -a $tag -m "Release $tag on branch $branch"
|
git tag -a $tag -m "Release $tag on branch $branch"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### optionally build a release locally
|
||||||
|
|
||||||
|
Install [`cloud-build-local`], then run
|
||||||
|
|
||||||
|
```
|
||||||
|
./releasing/localbuild.sh $module
|
||||||
|
```
|
||||||
|
|
||||||
|
This should create release artifacts in a local directory.
|
||||||
|
|
||||||
### trigger the cloud build by pushing the tag
|
### trigger the cloud build by pushing the tag
|
||||||
|
|
||||||
Push the tag:
|
Push the tag:
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ if [ "$module" != "$tModule" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd $module
|
||||||
|
|
||||||
configFile=$(mktemp)
|
configFile=$(mktemp)
|
||||||
cat <<EOF >$configFile
|
cat <<EOF >$configFile
|
||||||
project_name: $module
|
project_name: $module
|
||||||
@@ -47,9 +49,9 @@ release:
|
|||||||
github:
|
github:
|
||||||
owner: kubernetes-sigs
|
owner: kubernetes-sigs
|
||||||
name: kustomize
|
name: kustomize
|
||||||
|
draft: true
|
||||||
builds:
|
builds:
|
||||||
- main: ./$module/main.go
|
- ldflags: >
|
||||||
ldflags: >
|
|
||||||
-s
|
-s
|
||||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
steps:
|
steps:
|
||||||
- name: "gcr.io/cloud-builders/git@sha256:477015d9bb2bc4780f505a4497f10ee581a28fccfa553821cc540cc64bdc37b9"
|
- name: "gcr.io/cloud-builders/git"
|
||||||
args: [fetch, --tags, --depth=100]
|
args: [fetch, --tags, --depth=100]
|
||||||
- name: "goreleaser/goreleaser:v0.120.3"
|
- name: "goreleaser/goreleaser:v0.120.3"
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
steps:
|
steps:
|
||||||
- name: "gcr.io/cloud-builders/git@sha256:477015d9bb2bc4780f505a4497f10ee581a28fccfa553821cc540cc64bdc37b9"
|
- name: "gcr.io/cloud-builders/git"
|
||||||
args: [fetch, --tags, --depth=100]
|
args: [fetch, --tags, --depth=100]
|
||||||
- name: "goreleaser/goreleaser:v0.120.3"
|
- name: "goreleaser/goreleaser:v0.120.3"
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
|
|||||||
@@ -79,5 +79,5 @@ cloud-build-local \
|
|||||||
echo " "
|
echo " "
|
||||||
echo "Result of local build:"
|
echo "Result of local build:"
|
||||||
echo "##########################################"
|
echo "##########################################"
|
||||||
tree ./dist
|
tree ./$module/dist
|
||||||
echo "##########################################"
|
echo "##########################################"
|
||||||
|
|||||||
Reference in New Issue
Block a user