Skip to content

Commit

Permalink
replaced github.com/ghodss/yaml with sigs.k8s.io/yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Noam Gal <[email protected]>
  • Loading branch information
ATGardner committed Oct 4, 2024
1 parent 4e95571 commit 64d7c9b
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cmd/commands/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/util"

argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/ghodss/yaml"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

// used for mocking
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/util"

argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

type (
Expand Down
7 changes: 3 additions & 4 deletions cmd/commands/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/util"

argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/ghodss/yaml"
"github.com/golang/mock/gomock"

"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

func TestRunProjectCreate(t *testing.T) {
Expand Down Expand Up @@ -195,7 +194,7 @@ func Test_generateProjectManifests(t *testing.T) {
store.Default.LabelKeyAppName: "{{ appName }}",
},
wantAnnotations: map[string]string{
"some-key": "some-value",
"some-key": "some-value",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
argocdcommon "github.com/argoproj/argo-cd/v2/common"
argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
argocdsettings "github.com/argoproj/argo-cd/v2/util/settings"
"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/spf13/cobra"
v1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kusttypes "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/yaml"
)

const (
Expand Down
9 changes: 4 additions & 5 deletions cmd/commands/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ import (

argocdcommon "github.com/argoproj/argo-cd/v2/common"
argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
kusttypes "sigs.k8s.io/kustomize/api/types"

"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/stretchr/testify/assert"
"sigs.k8s.io/yaml"
)

func Test_setBootstrapOptsDefaults(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
code.gitea.io/sdk/gitea v0.19.0
github.com/argoproj/argo-cd/v2 v2.13.0
github.com/briandowns/spinner v1.23.1
github.com/ghodss/yaml v1.0.0
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.12.0
github.com/golang/mock v1.6.0
Expand All @@ -26,6 +25,7 @@ require (
k8s.io/kubectl v0.31.2
sigs.k8s.io/kustomize/api v0.17.2
sigs.k8s.io/kustomize/kyaml v0.17.1
sigs.k8s.io/yaml v1.4.0
)

require (
Expand Down Expand Up @@ -271,7 +271,6 @@ require (
sigs.k8s.io/controller-runtime v0.19.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace (
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4m
github.com/bombsimon/logrusr/v2 v2.0.1/go.mod h1:ByVAX+vHdLGAfdroiMg6q0zgq2FODY2lc5YJvzmOJio=
github.com/bradleyfalzon/ghinstallation/v2 v2.11.0 h1:R9d0v+iobRHSaE4wKUnXFiZp53AL4ED5MzgEMwGTZag=
github.com/bradleyfalzon/ghinstallation/v2 v2.11.0/go.mod h1:0LWKQwOHewXO/1acI6TtyE0Xc4ObDb2rFN7eHBAG71M=
github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A=
github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE=
github.com/briandowns/spinner v1.23.1 h1:t5fDPmScwUjozhDj4FA46p5acZWIPXYE30qW2Ptu650=
github.com/briandowns/spinner v1.23.1/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
Expand Down Expand Up @@ -252,7 +250,6 @@ github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/gfleury/go-bitbucket-v1 v0.0.0-20220301131131-8e7ed04b843e h1:C3DkNr9pxqXqCrmRHO7s3XgZS3zpi9GEA01GuWZODfo=
github.com/gfleury/go-bitbucket-v1 v0.0.0-20220301131131-8e7ed04b843e/go.mod h1:LB3osS9X2JMYmTzcCArHHLrndBAfcVLQAvUddfs+ONs=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
Expand Down
2 changes: 1 addition & 1 deletion pkg/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/store"
"github.com/argoproj-labs/argocd-autopilot/pkg/util"

"github.com/ghodss/yaml"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/spf13/cobra"
v1 "k8s.io/api/core/v1"
"sigs.k8s.io/kustomize/api/krusty"
kusttypes "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/filesys"
"sigs.k8s.io/yaml"
)

//go:generate mockgen -destination=./mocks/application.go -package=mocks -source=./application.go Application
Expand Down
2 changes: 1 addition & 1 deletion pkg/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/kube"
"github.com/argoproj-labs/argocd-autopilot/pkg/store"

"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
kusttypes "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/yaml"
)

func bootstrapMockFS() fs.FS {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/argoproj-labs/argocd-autopilot/pkg/util"

"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5"
billyUtils "github.com/go-git/go-billy/v5/util"
"sigs.k8s.io/yaml"
)

//go:generate mockgen -destination=./mocks/fs.go -package=mocks -source=./fs.go FS
Expand Down
2 changes: 1 addition & 1 deletion pkg/fs/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"github.com/argoproj-labs/argocd-autopilot/pkg/fs/mocks"
"github.com/argoproj-labs/argocd-autopilot/pkg/util"

"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/memfs"
billyUtils "github.com/go-git/go-billy/v5/util"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

type (
Expand Down

0 comments on commit 64d7c9b

Please sign in to comment.