diff --git a/cmd/plural/config_test.go b/cmd/plural/config_test.go index 6edb9ca7..5444a048 100644 --- a/cmd/plural/config_test.go +++ b/cmd/plural/config_test.go @@ -25,13 +25,13 @@ func TestPluralConfigCommand(t *testing.T) { { name: `test "config read" command when config file doesn't exists'`, args: []string{plural.ApplicationName, "config", "read"}, - expectedResponse: "apiVersion: platform.plural.sh/v1alpha1\nkind: Config\nmetadata: null\nspec:\n email: \"\"\n token: \"\"\n namespacePrefix: \"\"\n endpoint: \"\"\n lockProfile: \"\"\n reportErrors: false\n", + expectedResponse: "apiVersion: platform.plural.sh/v1alpha1\nkind: Config\nmetadata: null\nspec:\n email: \"\"\n token: \"\"\n namespacePrefix: \"\"\n endpoint: \"\"\n lockProfile: \"\"\n reportErrors: false\n", }, { name: `test "config read" command with default test config'`, args: []string{plural.ApplicationName, "config", "read"}, createConfig: true, - expectedResponse: "apiVersion: platform.plural.sh/v1alpha1\nkind: Config\nmetadata: null\nspec:\n email: test@plural.sh\n token: abc\n namespacePrefix: test\n endpoint: http://example.com\n lockProfile: abc\n reportErrors: false\n", + expectedResponse: "apiVersion: platform.plural.sh/v1alpha1\nkind: Config\nmetadata: null\nspec:\n email: test@plural.sh\n token: abc\n namespacePrefix: test\n endpoint: http://example.com\n lockProfile: abc\n reportErrors: false\n", }, } for _, test := range tests { diff --git a/cmd/plural/deploy_test.go b/cmd/plural/deploy_test.go index b2e90b88..2df40cdc 100644 --- a/cmd/plural/deploy_test.go +++ b/cmd/plural/deploy_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/mock" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" plural "github.com/pluralsh/plural/cmd/plural" "github.com/pluralsh/plural/pkg/api" diff --git a/cmd/plural/ops_test.go b/cmd/plural/ops_test.go index a7e9496f..0a20188e 100644 --- a/cmd/plural/ops_test.go +++ b/cmd/plural/ops_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" plural "github.com/pluralsh/plural/cmd/plural" "github.com/pluralsh/plural/pkg/manifest" diff --git a/cmd/plural/utils.go b/cmd/plural/utils.go index b60c8ae2..b8541d3a 100644 --- a/cmd/plural/utils.go +++ b/cmd/plural/utils.go @@ -14,7 +14,7 @@ import ( "github.com/pluralsh/plural/pkg/utils/pathing" "github.com/thoas/go-funk" "github.com/urfave/cli" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) func utilsCommands() []cli.Command { diff --git a/go.mod b/go.mod index 69b6b63d..d59a1a24 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,6 @@ require ( golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 - gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.9.2 k8s.io/api v0.24.3 @@ -81,6 +80,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/stretchr/objx v0.2.0 // indirect github.com/vektah/gqlparser/v2 v2.4.6 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) require ( diff --git a/go.sum b/go.sum index f485aff9..bb57a1df 100644 --- a/go.sum +++ b/go.sum @@ -905,8 +905,6 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/packethost/packngo v0.22.0 h1:7syZ1jDN5rbdkkrh9A5rA/ijXe0AHNovNqlUUf0L+uM= -github.com/packethost/packngo v0.22.0/go.mod h1:/UHguFdPs6Lf6FOkkSEPnRY5tgS0fsVM+Zv/bvBrmt0= github.com/packethost/packngo v0.25.0 h1:ujGXL3lVqTiaQoX2/Go74lQAlYfTeop7jBNy5w99w2A= github.com/packethost/packngo v0.25.0/go.mod h1:/UHguFdPs6Lf6FOkkSEPnRY5tgS0fsVM+Zv/bvBrmt0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -1794,7 +1792,6 @@ k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0H k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4= k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= -k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= @@ -1808,7 +1805,6 @@ k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.18.4/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= @@ -1824,7 +1820,6 @@ k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90/go.mod h1:J69/JveO6XESwVgG53 k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k= k8s.io/client-go v0.18.4/go.mod h1:f5sXwL4yAZRkAtzOxRWUhA/N8XzGCb+nPZI8PfobZ9g= k8s.io/client-go v0.18.5/go.mod h1:EsiD+7Fx+bRckKWZXnAXRKKetm1WuzPagH4iOSC8x58= -k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= diff --git a/pkg/api/artifacts.go b/pkg/api/artifacts.go index bf691ae7..19785b30 100644 --- a/pkg/api/artifacts.go +++ b/pkg/api/artifacts.go @@ -8,7 +8,7 @@ import ( "github.com/pluralsh/gqlclient" "github.com/pluralsh/gqlclient/pkg/utils" file "github.com/pluralsh/plural/pkg/utils" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type ArtifactAttributes struct { diff --git a/pkg/api/recipes.go b/pkg/api/recipes.go index 7f0b9893..e597e3b9 100644 --- a/pkg/api/recipes.go +++ b/pkg/api/recipes.go @@ -6,7 +6,7 @@ import ( "github.com/pluralsh/gqlclient" "github.com/pluralsh/gqlclient/pkg/utils" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type RecipeInput struct { diff --git a/pkg/api/repos.go b/pkg/api/repos.go index 584e0539..2c5ccced 100644 --- a/pkg/api/repos.go +++ b/pkg/api/repos.go @@ -7,7 +7,7 @@ import ( "strings" _ "github.com/AlecAivazis/survey/v2" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/pluralsh/gqlclient" "github.com/pluralsh/gqlclient/pkg/utils" diff --git a/pkg/config/config.go b/pkg/config/config.go index 4da95fec..ef1b3000 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -8,10 +8,10 @@ import ( "strings" "golang.org/x/text/language" + "gopkg.in/yaml.v3" "github.com/oleiade/reflections" "golang.org/x/text/cases" - "gopkg.in/yaml.v2" ) const ( diff --git a/pkg/crypto/age.go b/pkg/crypto/age.go index 6339dfb5..41f7da09 100644 --- a/pkg/crypto/age.go +++ b/pkg/crypto/age.go @@ -16,7 +16,7 @@ import ( "github.com/pluralsh/plural/pkg/utils" "github.com/pluralsh/plural/pkg/utils/git" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) const ( diff --git a/pkg/crypto/config.go b/pkg/crypto/config.go index e5282eb2..77b9457a 100644 --- a/pkg/crypto/config.go +++ b/pkg/crypto/config.go @@ -6,7 +6,7 @@ import ( "github.com/pluralsh/plural/pkg/utils" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Config struct { diff --git a/pkg/crypto/key.go b/pkg/crypto/key.go index 7ae2a6ca..5b7163d4 100644 --- a/pkg/crypto/key.go +++ b/pkg/crypto/key.go @@ -12,7 +12,7 @@ import ( "github.com/pluralsh/plural/pkg/utils" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type KeyProvider struct { diff --git a/pkg/manifest/context.go b/pkg/manifest/context.go index 324123a0..1cf65782 100644 --- a/pkg/manifest/context.go +++ b/pkg/manifest/context.go @@ -6,7 +6,7 @@ import ( "path/filepath" "github.com/pluralsh/plural/pkg/api" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Bundle struct { diff --git a/pkg/manifest/manifest.go b/pkg/manifest/manifest.go index f66dd8fc..f30ec849 100644 --- a/pkg/manifest/manifest.go +++ b/pkg/manifest/manifest.go @@ -10,7 +10,7 @@ import ( "github.com/pluralsh/plural/pkg/api" "github.com/pluralsh/plural/pkg/utils" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Writer func() error diff --git a/pkg/output/types.go b/pkg/output/types.go index e845e380..bc4ebb03 100644 --- a/pkg/output/types.go +++ b/pkg/output/types.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "github.com/pluralsh/plural/pkg/manifest" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Output struct { diff --git a/pkg/pluralfile/lock.go b/pkg/pluralfile/lock.go index a0b9beda..ed7b1684 100644 --- a/pkg/pluralfile/lock.go +++ b/pkg/pluralfile/lock.go @@ -8,7 +8,7 @@ import ( "github.com/pluralsh/plural/pkg/api" "github.com/pluralsh/plural/pkg/config" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Lockfile struct { diff --git a/pkg/scaffold/application.go b/pkg/scaffold/application.go index 04958260..642b2572 100644 --- a/pkg/scaffold/application.go +++ b/pkg/scaffold/application.go @@ -7,7 +7,7 @@ import ( "github.com/pluralsh/plural/pkg/output" "github.com/pluralsh/plural/pkg/utils/git" "github.com/pluralsh/plural/pkg/utils/pathing" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Applications struct { diff --git a/pkg/scaffold/helm.go b/pkg/scaffold/helm.go index f12133cb..032a2bae 100644 --- a/pkg/scaffold/helm.go +++ b/pkg/scaffold/helm.go @@ -20,7 +20,7 @@ import ( "github.com/pluralsh/plural/pkg/utils/git" "github.com/pluralsh/plural/pkg/utils/pathing" "github.com/pluralsh/plural/pkg/wkspace" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type dependency struct { diff --git a/pkg/template/funcs.go b/pkg/template/funcs.go index 8397303b..e93ef60f 100644 --- a/pkg/template/funcs.go +++ b/pkg/template/funcs.go @@ -7,7 +7,7 @@ import ( "path" "strings" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/pluralsh/plural/pkg/api" "github.com/pluralsh/plural/pkg/config"