diff --git a/controllers/provider/aws.go b/controllers/provider/aws.go index 6e3e6460..8ae8e11c 100644 --- a/controllers/provider/aws.go +++ b/controllers/provider/aws.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/azure.go b/controllers/provider/azure.go index 4bda617a..19619ee6 100644 --- a/controllers/provider/azure.go +++ b/controllers/provider/azure.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/baidu.go b/controllers/provider/baidu.go index 32da98fc..8755a9fd 100644 --- a/controllers/provider/baidu.go +++ b/controllers/provider/baidu.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/credentials_test.go b/controllers/provider/credentials_test.go index afbb075d..47d772df 100644 --- a/controllers/provider/credentials_test.go +++ b/controllers/provider/credentials_test.go @@ -8,10 +8,10 @@ import ( . "github.com/agiledragon/gomonkey/v2" "github.com/aliyun/alibaba-cloud-sdk-go/services/sts" - "github.com/go-yaml/yaml" "github.com/google/go-cmp/cmp" "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/controllers/provider/custom.go b/controllers/provider/custom.go index 46803d58..d4f50d11 100644 --- a/controllers/provider/custom.go +++ b/controllers/provider/custom.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/ec.go b/controllers/provider/ec.go index f6e04a51..a63c5a73 100644 --- a/controllers/provider/ec.go +++ b/controllers/provider/ec.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/gcp.go b/controllers/provider/gcp.go index b61dc6d1..535b6587 100644 --- a/controllers/provider/gcp.go +++ b/controllers/provider/gcp.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/tencent.go b/controllers/provider/tencent.go index fe1631dd..44751729 100644 --- a/controllers/provider/tencent.go +++ b/controllers/provider/tencent.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/ucloud.go b/controllers/provider/ucloud.go index 79324210..841f52bb 100644 --- a/controllers/provider/ucloud.go +++ b/controllers/provider/ucloud.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider/vsphere.go b/controllers/provider/vsphere.go index 0de5c025..ab39ae71 100644 --- a/controllers/provider/vsphere.go +++ b/controllers/provider/vsphere.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) diff --git a/controllers/provider_controller_test.go b/controllers/provider_controller_test.go index e951d7f7..370529a8 100644 --- a/controllers/provider_controller_test.go +++ b/controllers/provider_controller_test.go @@ -3,19 +3,19 @@ package controllers import ( "context" "fmt" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "strings" "testing" . "github.com/agiledragon/gomonkey/v2" - "github.com/go-yaml/yaml" "github.com/pkg/errors" + "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" diff --git a/go.mod b/go.mod index c000a37d..9b1001f3 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/aliyun/alibaba-cloud-sdk-go v1.61.1384 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v0.4.0 - github.com/go-yaml/yaml v2.1.0+incompatible github.com/google/go-cmp v0.5.5 github.com/jinzhu/copier v0.3.5 github.com/onsi/ginkgo v1.16.4 @@ -16,6 +15,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 + gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible k8s.io/api v0.21.3 k8s.io/apimachinery v0.21.3 @@ -70,7 +70,6 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.21.3 // indirect k8s.io/component-base v0.21.3 // indirect diff --git a/go.sum b/go.sum index 2536b5c8..4c0190ec 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,6 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= -github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=