Skip to content

Commit

Permalink
chore(deps): replace github.com/ghodss/yaml with sigs.k8s.io/yaml (
Browse files Browse the repository at this point in the history
…#2681)

At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: zachaller <zachaller@users.noreply.github.com>
Co-authored-by: zachaller <zachaller@users.noreply.github.com>
  • Loading branch information
Juneezee and zachaller authored May 5, 2023
1 parent 5910b3a commit deb4838
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion controller/metrics/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/stretchr/testify/assert"

"github.com/ghodss/yaml"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion controller/metrics/experiment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/ghodss/yaml"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion controller/metrics/rollout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"
"time"

"github.com/ghodss/yaml"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/argoproj/argo-rollouts/utils/conditions"
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ require (
github.com/blang/semver v3.5.1+incompatible
github.com/bombsimon/logrusr/v4 v4.0.0
github.com/evanphx/json-patch/v5 v5.6.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/hashicorp/go-plugin v1.4.9
github.com/influxdata/influxdb-client-go/v2 v2.12.3
github.com/juju/ansiterm v1.0.0
github.com/machinebox/graphql v0.2.2
github.com/mitchellh/mapstructure v1.5.0
github.com/newrelic/newrelic-client-go v1.1.0
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -53,7 +53,7 @@ require (
k8s.io/kubectl v0.25.8
k8s.io/kubernetes v1.25.8
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2

sigs.k8s.io/yaml v1.3.0
)

require (
Expand Down Expand Up @@ -104,6 +104,7 @@ require (
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand Down Expand Up @@ -136,7 +137,6 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lunixbochs/vtclean v1.0.0 // indirect
github.com/machinebox/graphql v0.2.2
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
Expand Down Expand Up @@ -190,7 +190,6 @@ require (
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
Expand Down
2 changes: 1 addition & 1 deletion hack/gen-crd-spec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured"

"github.com/blang/semver"
"github.com/ghodss/yaml"
extensionsobj "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
kubeopenapiutil "k8s.io/kube-openapi/pkg/util"
spec "k8s.io/kube-openapi/pkg/validation/spec"
"sigs.k8s.io/yaml"
)

const metadataValidation = `properties:
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl-argo-rollouts/cmd/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"strings"
"unicode"

"github.com/ghodss/yaml"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/pointer"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts"
"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
Expand Down Expand Up @@ -54,7 +54,7 @@ const (
createAnalysisRunExample = `
# Create an AnalysisRun from a local AnalysisTemplate file
%[1]s create analysisrun --from-file my-analysis-template.yaml
# Create an AnalysisRun from a AnalysisTemplate in the cluster
%[1]s create analysisrun --from my-analysis-template
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl-argo-rollouts/cmd/lint/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/validation"
"github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/options"
ingressutil "github.com/argoproj/argo-rollouts/utils/ingress"
"github.com/ghodss/yaml"
"github.com/spf13/cobra"
goyaml "gopkg.in/yaml.v2"
v1 "k8s.io/api/core/v1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
networkingv1 "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/yaml"
)

type LintOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl-argo-rollouts/info/testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"runtime"
"time"

"github.com/ghodss/yaml"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8sruntime "k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion rollout/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"testing"
"time"

"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
Expand All @@ -36,6 +35,7 @@ import (
"k8s.io/client-go/util/workqueue"
corev1defaults "k8s.io/kubernetes/pkg/apis/core/v1"
"k8s.io/utils/pointer"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/controller/metrics"
"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

a6util "github.com/argoproj/argo-rollouts/utils/apisix"

"github.com/ghodss/yaml"
smiv1alpha1 "github.com/servicemeshinterface/smi-sdk-go/pkg/apis/split/v1alpha1"
smiclientset "github.com/servicemeshinterface/smi-sdk-go/pkg/gen/client/split/clientset/versioned"
"github.com/sirupsen/logrus"
Expand All @@ -31,6 +30,7 @@ import (
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
rov1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/given.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"strings"

"github.com/ghodss/yaml"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/yaml"

rov1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/when.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"strconv"
"time"

"github.com/ghodss/yaml"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand All @@ -23,6 +22,7 @@ import (
"k8s.io/client-go/tools/cache"
watchutil "k8s.io/client-go/tools/watch"
retryutil "k8s.io/client-go/util/retry"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apiclient/rollout"
rov1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion test/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package util
import (
"os"

"github.com/ghodss/yaml"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
dynamicfake "k8s.io/client-go/dynamic/fake"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts"
"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion utils/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/argoproj/argo-rollouts/utils/defaults"
"github.com/argoproj/argo-rollouts/utils/plugin/types"
"github.com/ghodss/yaml"
v1 "k8s.io/api/core/v1"
k8errors "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/yaml"
)

// Config is the in memory representation of the configmap with some additional fields/functions for ease of use.
Expand Down
2 changes: 1 addition & 1 deletion utils/replicaset/replicaset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"testing"
"time"

"github.com/ghodss/yaml"
"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -19,6 +18,7 @@ import (
k8sfake "k8s.io/client-go/kubernetes/fake"
"k8s.io/kubernetes/pkg/controller"
"k8s.io/utils/pointer"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/argoproj/argo-rollouts/utils/annotations"
Expand Down
2 changes: 1 addition & 1 deletion utils/unstructured/unstructured.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package unstructured
import (
"regexp"

"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
logutil "github.com/argoproj/argo-rollouts/utils/log"
Expand Down

0 comments on commit deb4838

Please sign in to comment.