Skip to content

Commit

Permalink
update g/g to 1.108.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh Patel committed Nov 26, 2024
1 parent 4a8de42 commit b4a4cf6
Show file tree
Hide file tree
Showing 18 changed files with 240 additions and 280 deletions.
2 changes: 1 addition & 1 deletion controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
if err != nil {
return err
}
return c.Watch(source.Kind(mgr.GetCache(), &extensionsv1alpha1.Cluster{}), &handler.EnqueueRequestForObject{}, workerLessShoot(c.GetLogger()))
return c.Watch(source.Kind[client.Object](mgr.GetCache(), &extensionsv1alpha1.Cluster{}, &handler.EnqueueRequestForObject{}, workerLessShoot(c.GetLogger())))
}

// getEffectiveProbeConfig returns the updated probe config after checking the shoot KCM configuration for NodeMonitorGracePeriod.
Expand Down
2 changes: 1 addition & 1 deletion controllers/cluster/cluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func testProberSharedEnvTest(t *testing.T) {
}

for _, test := range tests {
t.Run(test.title, func(t *testing.T) {
t.Run(test.title, func(_ *testing.T) {
test.run(g, crClient, reconciler)
})
deleteAllClusters(g, crClient)
Expand Down
4 changes: 2 additions & 2 deletions controllers/endpoint/endpointpredicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ReadyEndpoints(logger logr.Logger) predicate.Predicate {
return false
},

DeleteFunc: func(event event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
return false
},

Expand Down Expand Up @@ -77,7 +77,7 @@ func MatchingEndpoints(epMap map[string]wapi.DependantSelectors) predicate.Predi
return isMatchingEndpoints(event.ObjectNew, epMap)
},

DeleteFunc: func(event event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
return false
},

Expand Down
4 changes: 2 additions & 2 deletions controllers/endpoint/endpointpredicate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestReadyEndpoints(t *testing.T) {
}

for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
createEv := event.CreateEvent{
Object: tc.ep,
}
Expand Down Expand Up @@ -228,7 +228,7 @@ func TestMatchingEndpointsPredicate(t *testing.T) {
}

for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
createEv := event.CreateEvent{
Object: tc.ep,
}
Expand Down
14 changes: 8 additions & 6 deletions controllers/endpoint/endpoints_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
return err
}
return c.Watch(
source.Kind(mgr.GetCache(), &v1.Endpoints{}),
&handler.EnqueueRequestForObject{},
predicate.And(
predicate.ResourceVersionChangedPredicate{},
MatchingEndpoints(r.WeederConfig.ServicesAndDependantSelectors),
ReadyEndpoints(c.GetLogger()),
source.Kind[client.Object](mgr.GetCache(),
&v1.Endpoints{},
&handler.EnqueueRequestForObject{},
predicate.And[client.Object](
predicate.ResourceVersionChangedPredicate{},
MatchingEndpoints(r.WeederConfig.ServicesAndDependantSelectors),
ReadyEndpoints(c.GetLogger()),
),
),
)
}
7 changes: 4 additions & 3 deletions controllers/endpoint/endpoints_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ package endpoint

import (
"context"
"k8s.io/apimachinery/pkg/util/rand"
"path/filepath"
"testing"
"time"

"k8s.io/apimachinery/pkg/util/rand"

testutil "github.com/gardener/dependency-watchdog/internal/test"
"k8s.io/client-go/kubernetes/scheme"

Expand Down Expand Up @@ -129,7 +130,7 @@ func testWeederSharedEnvTest(t *testing.T) {
childCtx, chileCancelFn := context.WithCancel(ctx)
testNs := rand.String(4)
testutil.CreateTestNamespace(childCtx, g, reconciler.Client, testNs)
t.Run(test.description, func(t *testing.T) {
t.Run(test.description, func(_ *testing.T) {
test.run(childCtx, chileCancelFn, g, reconciler, testNs)
})
deleteAllPods(childCtx, g, reconciler.Client)
Expand All @@ -153,7 +154,7 @@ func testWeederDedicatedEnvTest(t *testing.T) {
testEnv, reconciler := setupWeederEnv(ctx, t, test.apiServerFlags)
testNs := rand.String(4)
testutil.CreateTestNamespace(ctx, g, reconciler.Client, testNs)
t.Run(test.description, func(t *testing.T) {
t.Run(test.description, func(_ *testing.T) {
test.run(ctx, cancelFn, g, reconciler, testNs)
})
testutil.TeardownEnv(g, testEnv, cancelFn)
Expand Down
127 changes: 64 additions & 63 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
module github.com/gardener/dependency-watchdog

go 1.22.0
go 1.23.0

require (
github.com/gardener/gardener v1.99.1
github.com/gardener/machine-controller-manager v0.53.0
github.com/go-logr/logr v1.4.1
github.com/gardener/gardener v1.108.1
github.com/gardener/machine-controller-manager v0.55.0
github.com/go-logr/logr v1.4.2
github.com/hashicorp/go-multierror v1.1.1
github.com/onsi/gomega v1.33.1
github.com/onsi/gomega v1.35.0
github.com/spf13/pflag v1.0.5
go.uber.org/zap v1.27.0
k8s.io/api v0.29.6
k8s.io/apimachinery v0.29.6
k8s.io/client-go v0.29.6
k8s.io/code-generator v0.29.6
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
sigs.k8s.io/controller-runtime v0.17.5
golang.org/x/tools v0.27.0
k8s.io/api v0.31.2
k8s.io/apimachinery v0.31.2
k8s.io/client-go v0.31.2
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078
sigs.k8s.io/controller-runtime v0.19.1
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231015215740-bf15e44028f9
sigs.k8s.io/kind v0.20.0
sigs.k8s.io/kind v0.24.0
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/BurntSushi/toml v1.3.2 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cyphar/filepath-securejoin v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fluent/fluent-operator/v2 v2.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gardener/cert-management v0.15.0 // indirect
github.com/gardener/etcd-druid v0.22.1 // indirect
github.com/gardener/hvpa-controller/api v0.15.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gardener/cert-management v0.16.0 // indirect
github.com/gardener/etcd-druid v0.24.1 // indirect
github.com/gardener/hvpa-controller/api v0.17.0 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -54,67 +57,65 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.78.1 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.8.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/protobuf v1.34.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
helm.sh/helm/v3 v3.14.4 // indirect
istio.io/api v1.22.2 // indirect
istio.io/client-go v1.22.0 // indirect
k8s.io/apiextensions-apiserver v0.29.6 // indirect
k8s.io/autoscaler/vertical-pod-autoscaler v1.1.2 // indirect
k8s.io/component-base v0.29.6 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-aggregator v0.29.6 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/kubelet v0.29.6 // indirect
k8s.io/metrics v0.29.6 // indirect
helm.sh/helm/v3 v3.16.2 // indirect
istio.io/api v1.23.3 // indirect
istio.io/client-go v1.23.2 // indirect
k8s.io/apiextensions-apiserver v0.31.2 // indirect
k8s.io/autoscaler/vertical-pod-autoscaler v1.2.1 // indirect
k8s.io/component-base v0.31.2 // indirect
k8s.io/kube-aggregator v0.31.2 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
k8s.io/kubelet v0.31.2 // indirect
k8s.io/metrics v0.31.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading

0 comments on commit b4a4cf6

Please sign in to comment.