Skip to content

Commit

Permalink
Kubernetes 1.31 and go1.23 (#584)
Browse files Browse the repository at this point in the history
* Update go to 1.23.1 and kubernetes to 1.31.0

upgrade k8s

k8s and go upgrade

gen

wip

prevent duplicate controller registration errors

* tidy

gen

grafana cloud

gen

* fix changelog

* rename changelog and upgrade kind
  • Loading branch information
tjons authored Sep 10, 2024
1 parent 43680a0 commit 6b43ed3
Show file tree
Hide file tree
Showing 16 changed files with 426 additions and 601 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
uses: helm/[email protected]
with:
install_only: true
version: v0.17.0
version: v0.24.0
- name: Setup Kind
run: |
./ci/setup-kind.sh skv2-test-remote
- uses: azure/setup-kubectl@v3
with:
version: 'v1.24.7'
version: 'v1.31.0'
- name: Install deps for codegen
run: |
make install-tools
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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
92 changes: 92 additions & 0 deletions changelog/v0.41.0/go-1.23-k8s-1.31.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
changelog:
- type: BREAKING_CHANGE
description: "Bump dependencies to support Kubernetes 1.31"
issueLink: https://github.com/solo-io/gloo/issues/9683
- type: DEPENDENCY_BUMP
dependencyOwner: BurntSushi
dependencyRepo: toml
dependencyTag: v1.3.2
- type: DEPENDENCY_BUMP
dependencyOwner: Masterminds
dependencyRepo: sprig
dependencyTag: v3.2.3
- type: DEPENDENCY_BUMP
dependencyOwner: go-logr
dependencyRepo: logr
dependencyTag: v1.4.2
- type: DEPENDENCY_BUMP
dependencyOwner: grafana
dependencyRepo: pyroscope-go
dependencyTag: v0.1.8
- type: DEPENDENCY_BUMP
dependencyOwner: hashicorp
dependencyRepo: go-multierror
dependencyTag: v1.1.1
- type: DEPENDENCY_BUMP
dependencyOwner: onsi
dependencyRepo: gomega
dependencyTag: v2.19.0
- type: DEPENDENCY_BUMP
dependencyOwner: onsi
dependencyRepo: gomega
dependencyTag: v1.33.1
- type: DEPENDENCY_BUMP
dependencyOwner: prometheus
dependencyRepo: client_golang
dependencyTag: v1.19.1
- type: DEPENDENCY_BUMP
dependencyOwner: sirupsen
dependencyRepo: logrus
dependencyTag: v1.9.3
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: go-utils
dependencyTag: v0.26.0
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: k8s-utils
dependencyTag: v0.8.0
- type: DEPENDENCY_BUMP
dependencyOwner: golang
dependencyRepo: x/exp
dependencyTag: v0.0.0-20230515195305-f3d0a9c9a5cc
- type: DEPENDENCY_BUMP
dependencyOwner: golang
dependencyRepo: x/tools
dependencyTag: v0.22.0
- type: DEPENDENCY_BUMP
dependencyOwner: google
dependencyRepo: protobuf
dependencyTag: v1.34.2
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: api
dependencyTag: v0.31.0
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: apiextensions-apiserver
dependencyTag: v0.31.0
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: apimachinery
dependencyTag: v0.31.0
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: client-go
dependencyTag: v0.31.0
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: code-generator
dependencyTag: v0.31.0
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: klog
dependencyTag: v2.130.1
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: utils
dependencyTag: v0.0.0-20240711033017-18e509b52bc8
- type: DEPENDENCY_BUMP
dependencyOwner: sigs.k8s.io
dependencyRepo: controller-runtime
dependencyTag: v0.19.0
47 changes: 24 additions & 23 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
[pyroscope-go/godeltaprof](https://github.com/grafana/pyroscope-go)|v0.1.6|Apache License 2.0
[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.8|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
[klauspost/compress](https://github.com/klauspost/compress)|v1.17.8|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
85 changes: 63 additions & 22 deletions codegen/test/chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@
"properties": {
"name": {
"type": "string"
},
"request": {
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -615,6 +618,9 @@
"properties": {
"name": {
"type": "string"
},
"request": {
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -955,6 +961,16 @@
}
]
},
"supplementalGroupsPolicy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"fsGroup": {
"anyOf": [
{
Expand Down Expand Up @@ -3245,6 +3261,17 @@
}
},
"type": "object"
},
"image": {
"properties": {
"reference": {
"type": "string"
},
"pullPolicy": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
Expand Down Expand Up @@ -3582,6 +3609,9 @@
"properties": {
"name": {
"type": "string"
},
"request": {
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -4893,6 +4923,9 @@
"properties": {
"name": {
"type": "string"
},
"request": {
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -6204,6 +6237,9 @@
"properties": {
"name": {
"type": "string"
},
"request": {
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -7359,6 +7395,16 @@
}
]
},
"supplementalGroupsPolicy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"fsGroup": {
"anyOf": [
{
Expand Down Expand Up @@ -8857,30 +8903,25 @@
"name": {
"type": "string"
},
"source": {
"properties": {
"resourceClaimName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
"resourceClaimName": {
"anyOf": [
{
"type": "string"
},
"resourceClaimTemplateName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
{
"type": "null"
}
},
"type": "object"
]
},
"resourceClaimTemplateName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"type": "object"
Expand Down
Loading

0 comments on commit 6b43ed3

Please sign in to comment.