Skip to content

Commit

Permalink
get rid of gardener dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
pPrecel committed Sep 16, 2023
1 parent 47ec476 commit 2ae8c6d
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 807 deletions.
14 changes: 7 additions & 7 deletions cmd/check/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"testing"
"time"

"github.com/gardener/gardener/pkg/apis/core/v1beta1"
command "github.com/pPrecel/cloudagent/cmd"
"github.com/pPrecel/cloudagent/internal/output"
"github.com/pPrecel/cloudagent/pkg/agent"
cloud_agent "github.com/pPrecel/cloudagent/pkg/agent/proto"
"github.com/pPrecel/cloudagent/pkg/cache"
"github.com/pPrecel/cloudagent/pkg/types"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
googlerpc "google.golang.org/grpc"
Expand Down Expand Up @@ -86,8 +86,8 @@ func Test_run(t *testing.T) {
o.socketNetwork = socketNetwork
o.outFormat = *output.NewFlag(&o.outFormat, output.TextType, "$a", "-")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand All @@ -111,8 +111,8 @@ func Test_run(t *testing.T) {
o.socketNetwork = socketNetwork
o.outFormat = *output.NewFlag(&o.outFormat, output.TextType, "$a", "$e")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand All @@ -136,8 +136,8 @@ func Test_run(t *testing.T) {
o.socketAddress = "\n"
o.outFormat = *output.NewFlag(&o.outFormat, output.TextType, "$a", "$e")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand Down
18 changes: 9 additions & 9 deletions cmd/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"testing"
"time"

"github.com/gardener/gardener/pkg/apis/core/v1beta1"
command "github.com/pPrecel/cloudagent/cmd"
"github.com/pPrecel/cloudagent/internal/output"
"github.com/pPrecel/cloudagent/pkg/agent"
cloud_agent "github.com/pPrecel/cloudagent/pkg/agent/proto"
"github.com/pPrecel/cloudagent/pkg/cache"
"github.com/pPrecel/cloudagent/pkg/types"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
googlerpc "google.golang.org/grpc"
Expand Down Expand Up @@ -98,8 +98,8 @@ func Test_run(t *testing.T) {
o.updatedAfter = "2022-09-11"
o.updatedBefore = "2022-09-11"

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand Down Expand Up @@ -237,8 +237,8 @@ func Test_run(t *testing.T) {
o.socketNetwork = socketNetwork
o.outFormat = *output.NewFlag(&o.outFormat, output.TextType, "$a", "$e")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand All @@ -263,8 +263,8 @@ func Test_run(t *testing.T) {
o.socketAddress = "\n"
o.outFormat = *output.NewFlag(&o.outFormat, output.TextType, "$a", "$e")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, nil)
Expand Down Expand Up @@ -294,8 +294,8 @@ func Test_run(t *testing.T) {
o.socketNetwork = socketNetwork
o.outFormat = *output.NewFlag(&o.outFormat, output.TableType, "$r/$h/$u/$a", "-/-/-/-")

r.Set(&v1beta1.ShootList{
Items: []v1beta1.Shoot{
r.Set(&types.ShootList{
Items: []types.Shoot{
{}, {}, {},
},
}, errors.New("test error"))
Expand Down
91 changes: 37 additions & 54 deletions go.mod
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,53 @@ module github.com/pPrecel/cloudagent
go 1.18

require (
github.com/gardener/gardener v1.45.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.4.0
google.golang.org/grpc v1.47.0
google.golang.org/protobuf v1.28.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
k8s.io/apimachinery v0.23.6
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
)

require (
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/onsi/gomega v1.19.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/stretchr/objx v0.1.0 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
github.com/fsnotify/fsnotify v1.6.0
github.com/hpcloud/tail v1.0.0
github.com/invopop/jsonschema v0.8.0
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.15.0
google.golang.org/grpc v1.58.1
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/apimachinery v0.28.2
k8s.io/client-go v0.28.2
)

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/hpcloud/tail v1.0.0
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/invopop/jsonschema v0.4.0
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.1.4 // indirect
github.com/pkg/errors v0.9.1
github.com/robfig/cron/v3 v3.0.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.1
golang.org/x/net v0.0.0-20220708220712-1185a9018129
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220708155623-50e5f4832e73 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.23.6 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
// NOTE: some dependencies require old style client-go version k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/api => k8s.io/api v0.23.4
k8s.io/apimachinery => k8s.io/apimachinery v0.23.4
k8s.io/client-go => k8s.io/client-go v0.23.4
)
Loading

0 comments on commit 2ae8c6d

Please sign in to comment.