Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use consistent YAML library #463

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linters:
- gofmt
- goimports
- gomnd
- gomodguard
- gosec
- gci
- gosimple
Expand All @@ -39,6 +40,18 @@ linters-settings:
- standard
- default
- prefix(github.com/kong/kubernetes-testing-framework)
gomodguard:
blocked:
modules:
- github.com/ghodss/yaml:
recommendations:
- sigs.k8s.io/yaml
- gopkg.in/yaml.v2:
recommendations:
- sigs.k8s.io/yaml
- gopkg.in/yaml.v3:
recommendations:
- sigs.k8s.io/yaml

issues:
fix: true
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ require (
require github.com/docker/go-connections v0.4.0 // indirect

require (
github.com/ghodss/yaml v1.0.0
github.com/google/go-github/v48 v48.1.0
github.com/kong/deck v1.16.1
golang.org/x/sync v0.1.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/cli-runtime v0.25.4
k8s.io/kubectl v0.25.4
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
Expand Down Expand Up @@ -69,6 +67,7 @@ require (
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fvbommel/sortorder v1.0.1 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand Down Expand Up @@ -150,6 +149,7 @@ require (
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.25.4 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/clusters/addons/metallb/metallb.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"sigs.k8s.io/kustomize/api/types"
kustomize "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/resid"

"github.com/kong/kubernetes-testing-framework/pkg/clusters"
Expand Down
2 changes: 1 addition & 1 deletion pkg/clusters/types/kind/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"os/exec"
"sync"

"gopkg.in/yaml.v2"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/kind/pkg/apis/config/v1alpha4"
"sigs.k8s.io/yaml"

"github.com/kong/kubernetes-testing-framework/pkg/clusters"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/kubernetes/kubectl/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"os"
"path/filepath"

"github.com/ghodss/yaml"
"sigs.k8s.io/kustomize/api/krusty"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/filesys"
"sigs.k8s.io/yaml"
)

// GetKustomizedManifest takes a kustomization and any number of manifest readers. It adds the manifests to the
Expand Down