Skip to content

Commit

Permalink
Update go to 1.23.1 and kubernetes to 1.31.0
Browse files Browse the repository at this point in the history
upgrade k8s

k8s and go upgrade

gen

wip

prevent duplicate controller registration errors
  • Loading branch information
tjons committed Sep 10, 2024
1 parent 4f24776 commit 0427ebe
Show file tree
Hide file tree
Showing 29 changed files with 1,228 additions and 1,481 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ generated-code: install-tools update-licenses
go run api/generate.go
# the api/generate.go command is separated out to enable us to run go generate on the generated files (used for mockgen)
# this re-gens test protos
PATH=$(DEPSGOBIN):$(PATH) go test ./codegen
go test ./codegen
go generate -v ./...
$(DEPSGOBIN)/goimports -w .
go mod tidy
Expand Down
43 changes: 22 additions & 21 deletions ci/oss_compliance/osa_provided.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Name|Version|License
---|---|---
[perks/quantile](https://github.com/beorn7/perks)|v1.0.1|MIT License
[xxhash/v2](https://github.com/cespare/xxhash)|v2.2.0|MIT License
[go-spew/spew](https://github.com/davecgh/go-spew)|v1.1.1|ISC License
[xxhash/v2](https://github.com/cespare/xxhash)|v2.3.0|MIT License
[go-spew/spew](https://github.com/davecgh/go-spew)|v1.1.2-0.20180830191138-d8f796af33cc|ISC License
[v3/log](https://github.com/emicklei/go-restful)|v3.11.0|MIT License
[internal/json](https://github.com/evanphx/json-patch)|v5.9.0|BSD 3-clause "New" or "Revised" License
[fsnotify/fsnotify](https://github.com/fsnotify/fsnotify)|v1.7.0|BSD 3-clause "New" or "Revised" License
[go-logr/logr](https://github.com/go-logr/logr)|v1.4.1|Apache License 2.0
[cbor/v2](https://github.com/fxamacker/cbor)|v2.7.0|MIT License
[go-logr/logr](https://github.com/go-logr/logr)|v1.4.2|Apache License 2.0
[go-openapi/jsonpointer](https://github.com/go-openapi/jsonpointer)|v0.20.2|Apache License 2.0
[jsonreference/internal](https://github.com/go-openapi/jsonreference)|v0.20.2|Apache License 2.0
[go-openapi/swag](https://github.com/go-openapi/swag)|v0.22.8|Apache License 2.0
Expand All @@ -16,42 +17,42 @@ Name|Version|License
[google/gnostic-models](https://github.com/google/gnostic-models)|v0.6.8|Apache License 2.0
[cmp/internal](https://github.com/google/go-cmp)|v0.6.0|BSD 3-clause "New" or "Revised" License
[gofuzz/bytesource](https://github.com/google/gofuzz)|v1.2.0|Apache License 2.0
[google/uuid](https://github.com/google/uuid)|v1.3.0|BSD 3-clause "New" or "Revised" License
[google/uuid](https://github.com/google/uuid)|v1.6.0|BSD 3-clause "New" or "Revised" License
[pyroscope-go/godeltaprof](https://github.com/grafana/pyroscope-go)|v0.1.6|Apache License 2.0
[josharian/intern](https://github.com/josharian/intern)|v1.0.0|MIT License
[json-iterator/go](https://github.com/json-iterator/go)|v1.1.12|MIT License
[klauspost/compress](https://github.com/klauspost/compress)|v1.17.3|Apache License 2.0
[mailru/easyjson](https://github.com/mailru/easyjson)|v0.7.7|MIT License
[v2/pbutil](https://github.com/matttproud/golang_protobuf_extensions)|v2.0.0|Apache License 2.0
[modern-go/concurrent](https://github.com/modern-go/concurrent)|v0.0.0-20180306012644-bacd9c7ef1dd|Apache License 2.0
[modern-go/reflect2](https://github.com/modern-go/reflect2)|v1.0.2|Apache License 2.0
[munnerz/goautoneg](https://github.com/munnerz/goautoneg)|v0.0.0-20191010083416-a7dc8b61c822|BSD 3-clause "New" or "Revised" License
[pkg/errors](https://github.com/pkg/errors)|v0.9.1|BSD 2-clause "Simplified" License
[client_golang/prometheus](https://github.com/prometheus/client_golang)|v1.18.0|Apache License 2.0
[client_model/go](https://github.com/prometheus/client_model)|v0.5.0|Apache License 2.0
[prometheus/common](https://github.com/prometheus/common)|v0.45.0|Apache License 2.0
[procfs/internal](https://github.com/prometheus/procfs)|v0.12.0|Apache License 2.0
[client_golang/prometheus](https://github.com/prometheus/client_golang)|v1.19.1|Apache License 2.0
[client_model/go](https://github.com/prometheus/client_model)|v0.6.1|Apache License 2.0
[prometheus/common](https://github.com/prometheus/common)|v0.55.0|Apache License 2.0
[procfs/internal](https://github.com/prometheus/procfs)|v0.15.1|Apache License 2.0
[rotisserie/eris](https://github.com/rotisserie/eris)|v0.1.1|MIT License
[x448/float16](https://github.com/x448/float16)|v0.8.4|MIT License
[go.uber.org/multierr](https://go.uber.org/multierr)|v1.11.0|MIT License
[go.uber.org/zap](https://go.uber.org/zap)|v1.26.0|MIT License
[exp/maps](https://golang.org/x/exp/maps)|v0.0.0-20220921164117-439092de6870|BSD 3-clause "New" or "Revised" License
[x/net](https://golang.org/x/net)|v0.23.0|BSD 3-clause "New" or "Revised" License
[oauth2/internal](https://golang.org/x/oauth2/internal)|v0.12.0|BSD 3-clause "New" or "Revised" License
[x/term](https://golang.org/x/term)|v0.18.0|BSD 3-clause "New" or "Revised" License
[x/text](https://golang.org/x/text)|v0.14.0|BSD 3-clause "New" or "Revised" License
[exp/maps](https://golang.org/x/exp/maps)|v0.0.0-20230515195305-f3d0a9c9a5cc|BSD 3-clause "New" or "Revised" License
[x/net](https://golang.org/x/net)|v0.26.0|BSD 3-clause "New" or "Revised" License
[oauth2/internal](https://golang.org/x/oauth2/internal)|v0.21.0|BSD 3-clause "New" or "Revised" License
[x/term](https://golang.org/x/term)|v0.23.0|BSD 3-clause "New" or "Revised" License
[x/text](https://golang.org/x/text)|v0.17.0|BSD 3-clause "New" or "Revised" License
[time/rate](https://golang.org/x/time/rate)|v0.3.0|BSD 3-clause "New" or "Revised" License
[jsonpatch/v2](https://gomodules.xyz/jsonpatch/v2)|v2.4.0|Apache License 2.0
[google.golang.org/protobuf](https://google.golang.org/protobuf)|v1.33.0|BSD 3-clause "New" or "Revised" License
[google.golang.org/protobuf](https://google.golang.org/protobuf)|v1.34.2|BSD 3-clause "New" or "Revised" License
[gopkg.in/inf.v0](https://gopkg.in/inf.v0)|v0.9.1|BSD 3-clause "New" or "Revised" License
[gopkg.in/yaml.v2](https://gopkg.in/yaml.v2)|v2.4.0|Apache License 2.0
[gopkg.in/yaml.v3](https://gopkg.in/yaml.v3)|v3.0.1|MIT License
[k8s.io/api](https://k8s.io/api)|v0.30.0|Apache License 2.0
[k8s.io/apimachinery](https://k8s.io/apimachinery)|v0.30.0|Apache License 2.0
[k8s.io/client-go](https://k8s.io/client-go)|v0.30.0|Apache License 2.0
[v2/internal](https://k8s.io/klog/v2/internal)|v2.120.1|Apache License 2.0
[k8s.io/api](https://k8s.io/api)|v0.31.0|Apache License 2.0
[k8s.io/apimachinery](https://k8s.io/apimachinery)|v0.31.0|Apache License 2.0
[k8s.io/client-go](https://k8s.io/client-go)|v0.31.0|Apache License 2.0
[v2/internal](https://k8s.io/klog/v2/internal)|v2.130.1|Apache License 2.0
[kube-openapi/pkg](https://k8s.io/kube-openapi/pkg)|v0.0.0-20240228011516-70dd3763d340|Apache License 2.0
[k8s.io/utils](https://k8s.io/utils)|v0.0.0-20230726121419-3b25d923346b|Apache License 2.0
[controller-runtime/pkg](https://sigs.k8s.io/controller-runtime/pkg)|v0.18.2|Apache License 2.0
[k8s.io/utils](https://k8s.io/utils)|v0.0.0-20240711033017-18e509b52bc8|Apache License 2.0
[controller-runtime/pkg](https://sigs.k8s.io/controller-runtime/pkg)|v0.19.0|Apache License 2.0
[encoding/json](https://sigs.k8s.io/json/internal/golang/encoding/json)|v0.0.0-20221116044647-bc3834ca7abd|Apache License 2.0
[structured-merge-diff/v4](https://sigs.k8s.io/structured-merge-diff/v4)|v4.4.1|Apache License 2.0
[yaml/goyaml.v2](https://sigs.k8s.io/yaml/goyaml.v2)|v1.4.0|Apache License 2.0
Expand Down
13 changes: 11 additions & 2 deletions codegen/render/kube_multicluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/config"
"sigs.k8s.io/controller-runtime/pkg/log"
zaputil "sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down Expand Up @@ -124,7 +126,7 @@ var _ = WithRemoteClusterContextDescribe("Multicluster", func() {
It("works", func() {
cw := watch.NewClusterWatcher(ctx, manager.Options{
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{ns: cache.Config{}},
DefaultNamespaces: map[string]cache.Config{ns: {}},
},
}, watch.RetryOptions{}, nil)
err := cw.Run(masterManager)
Expand Down Expand Up @@ -194,8 +196,15 @@ var _ = WithRemoteClusterContextDescribe("Multicluster", func() {

BeforeEach(func() {
cw = watch.NewClusterWatcher(ctx, manager.Options{
Controller: config.Controller{
// see https://github.com/kubernetes-sigs/controller-runtime/issues/2937
// in short, our tests reuse the same name (reasonably so) and the controller-runtime
// package does not reset the stack of controller names between tests, so we disable
// the name validation here.
SkipNameValidation: ptr.To(true),
},
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{ns: cache.Config{}},
DefaultNamespaces: map[string]cache.Config{ns: {}},
},
}, watch.RetryOptions{}, nil)
})
Expand Down
Loading

0 comments on commit 0427ebe

Please sign in to comment.