Skip to content

Commit

Permalink
chore: bump k8s to 1.28 (#548)
Browse files Browse the repository at this point in the history
* bump k8s to 1.28

* fix codegen

* bump k8s-utils

* fix strcase

* bump deps

* bump again

* Separate out codegen and tests

* Fix file path

* Add protoc

* Run codegen before tests

* bump again

* bump go utils

* bump k8s-utils

* Add changelog

* move changelog

* update codegen script

* bump cloudbuilders

* update codegen script

* Remove redundant boilerplate

* update changelog
  • Loading branch information
davidjumani authored Dec 5, 2023
1 parent 1f34a76 commit 4ea30aa
Show file tree
Hide file tree
Showing 10 changed files with 240 additions and 218 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ verify-envoy-protos:
# Tests
#----------------------------------------------------------------------------------

GINKGO_VERSION := 2.5.0
GINKGO_VERSION ?= $(shell echo $(shell go list -m github.com/onsi/ginkgo/v2) | cut -d' ' -f2)
GINKGO_ENV ?= GOLANG_PROTOBUF_REGISTRATION_CONFLICT=ignore ACK_GINKGO_DEPRECATIONS=$(GINKGO_VERSION)
GINKGO_FLAGS ?= -v -tags=purego -compilers=4 --randomize-all --trace -progress -race
GINKGO_REPORT_FLAGS ?= --json-report=test-report.json --junit-report=junit.xml -output-dir=$(OUTPUT_DIR)
Expand All @@ -157,7 +157,7 @@ GINKGO_USER_FLAGS ?=

.PHONY: install-test-tools
install-test-tools:
go install github.com/onsi/ginkgo/v2/ginkgo@v$(GINKGO_VERSION)
go install github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION)

.PHONY: test
test: install-test-tools ## Run all tests, or only run the test package at {TEST_PKG} if it is specified
Expand Down
50 changes: 50 additions & 0 deletions changelog/v0.34.0/bump-k8s-128.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
changelog:
- type: BREAKING_CHANGE
description: >
Bump dependencies to support Kubernetes 1.28
issueLink: https://github.com/solo-io/gloo/issues/8515
resolvesIssue: false
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: api
dependencyTag: v0.28.3
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: apiextensions-apiserver
dependencyTag: v0.28.3
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: apimachinery
dependencyTag: v0.28.3
- type: DEPENDENCY_BUMP
dependencyOwner: k8s.io
dependencyRepo: client-go
dependencyTag: v0.28.3
- type: DEPENDENCY_BUMP
dependencyOwner: sigs.k8s.io
dependencyRepo: code-generator
dependencyTag: v0.28.3
- type: DEPENDENCY_BUMP
dependencyOwner: envoyproxy
dependencyRepo: go-control-plane
dependencyTag: v0.11.1-0.20230524094728-9239064ad72f
- type: DEPENDENCY_BUMP
dependencyOwner: onsi
dependencyRepo: ginkgo/v2
dependencyTag: v2.11.0
- type: DEPENDENCY_BUMP
dependencyOwner: onsi
dependencyRepo: gomega
dependencyTag: v1.27.10
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: go-utils
dependencyTag: v0.24.8
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: k8s-utils
dependencyTag: v0.6.0
- type: DEPENDENCY_BUMP
dependencyOwner: solo-io
dependencyRepo: cloud-builders
dependencyTag: v0.8.0
29 changes: 15 additions & 14 deletions ci/oss_compliance/osa_provided.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Name|Version|License
[cuelang.org/go](https://cuelang.org/go)|v0.3.2|Apache License 2.0
[Masterminds/sprig](https://github.com/Masterminds/sprig)|v2.22.0+incompatible|MIT License
[bugsnag/bugsnag-go](https://github.com/bugsnag/bugsnag-go)|v1.5.0|MIT License
[envoyproxy/go-control-plane](https://github.com/envoyproxy/go-control-plane)|v0.10.2-0.20220325020618-49ff273808a1|Apache License 2.0
[envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate)|v0.4.0|Apache License 2.0
[envoyproxy/go-control-plane](https://github.com/envoyproxy/go-control-plane)|v0.11.1-0.20230524094728-9239064ad72f|Apache License 2.0
[envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate)|v0.10.1|Apache License 2.0
[fgrosse/zaptest](https://github.com/fgrosse/zaptest)|v1.1.0|MIT License
[getkin/kin-openapi](https://github.com/getkin/kin-openapi)|v0.80.0|MIT License
[ghodss/yaml](https://github.com/ghodss/yaml)|v1.0.1-0.20190212211648-25d852aebe32|MIT License
Expand All @@ -13,26 +13,27 @@ Name|Version|License
[grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware)|v1.3.0|Apache License 2.0
[iancoleman/strcase](https://github.com/iancoleman/strcase)|v0.0.0-20191112232945-16388991a334|MIT License
[mitchellh/hashstructure](https://github.com/mitchellh/hashstructure)|v1.0.0|MIT License
[ginkgo/v2](https://github.com/onsi/ginkgo)|v2.9.5|MIT License
[onsi/gomega](https://github.com/onsi/gomega)|v1.27.7|MIT License
[ginkgo/v2](https://github.com/onsi/ginkgo)|v2.11.0|MIT License
[onsi/gomega](https://github.com/onsi/gomega)|v1.27.10|MIT License
[pkg/errors](https://github.com/pkg/errors)|v0.9.1|BSD 2-clause "Simplified" License
[pseudomuto/protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc)|v1.5.0|MIT License
[pseudomuto/protokit](https://github.com/pseudomuto/protokit)|v0.2.0|MIT License
[radovskyb/watcher](https://github.com/radovskyb/watcher)|v1.0.2|BSD 3-clause "New" or "Revised" License
[rotisserie/eris](https://github.com/rotisserie/eris)|v0.1.1|MIT License
[go.opencensus.io](https://go.opencensus.io)|v0.24.0|Apache License 2.0
[go.uber.org/zap](https://go.uber.org/zap)|v1.24.0|MIT License
[x/sync](https://golang.org/x/sync)|v0.2.0|BSD 3-clause "New" or "Revised" License
[google.golang.org/genproto](https://google.golang.org/genproto)|v0.0.0-20221201164419-0e50fba7f41c|Apache License 2.0
[google.golang.org/grpc](https://google.golang.org/grpc)|v1.51.0|Apache License 2.0
[go.uber.org/zap](https://go.uber.org/zap)|v1.25.0|MIT License
[x/sync](https://golang.org/x/sync)|v0.3.0|BSD 3-clause "New" or "Revised" License
[googleapis/api](https://google.golang.org/genproto/googleapis/api)|v0.0.0-20230525234035-dd9d682886f9|Apache License 2.0
[googleapis/rpc](https://google.golang.org/genproto/googleapis/rpc)|v0.0.0-20230525234030-28d5490b6b19|Apache License 2.0
[google.golang.org/grpc](https://google.golang.org/grpc)|v1.56.3|Apache License 2.0
[google.golang.org/protobuf](https://google.golang.org/protobuf)|v1.30.0|BSD 3-clause "New" or "Revised" License
[gopkg.in/yaml.v2](https://gopkg.in/yaml.v2)|v2.4.0|Apache License 2.0
[k8s.io/api](https://k8s.io/api)|v0.27.3|Apache License 2.0
[k8s.io/apiextensions-apiserver](https://k8s.io/apiextensions-apiserver)|v0.27.3|Apache License 2.0
[k8s.io/apimachinery](https://k8s.io/apimachinery)|v0.27.3|Apache License 2.0
[k8s.io/client-go](https://k8s.io/client-go)|v0.27.3|Apache License 2.0
[k8s.io/code-generator](https://k8s.io/code-generator)|v0.27.3|Apache License 2.0
[k8s.io/utils](https://k8s.io/utils)|v0.0.0-20230209194617-a36077c30491|Apache License 2.0
[k8s.io/api](https://k8s.io/api)|v0.28.3|Apache License 2.0
[k8s.io/apiextensions-apiserver](https://k8s.io/apiextensions-apiserver)|v0.28.3|Apache License 2.0
[k8s.io/apimachinery](https://k8s.io/apimachinery)|v0.28.3|Apache License 2.0
[k8s.io/client-go](https://k8s.io/client-go)|v0.28.3|Apache License 2.0
[k8s.io/code-generator](https://k8s.io/code-generator)|v0.28.3|Apache License 2.0
[k8s.io/utils](https://k8s.io/utils)|v0.0.0-20230406110748-d93618cff8a2|Apache License 2.0
[structured-merge-diff/v4](https://sigs.k8s.io/structured-merge-diff/v4)|v4.2.3|Apache License 2.0
[sigs.k8s.io/yaml](https://sigs.k8s.io/yaml)|v1.3.0|MIT License
[cmd/goimports](https://golang.org/x/tools/cmd/goimports)|latest|MIT License
Expand Down
28 changes: 14 additions & 14 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:
dir: &dir '/workspace/solo-kit'

# prepare-workspace to set up the project so it can be built and tested
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.6.2'
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.0'
args:
- "--repo-name"
- "$REPO_NAME"
Expand All @@ -20,14 +20,14 @@ steps:
id: 'prepare-workspace'

# download massive container in parallel
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.6.2'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.0'
entrypoint: 'bash'
dir: *dir
args: ['-c', 'ls']
waitFor: ['-']

# Installs go executables required by codegen tests
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.6.2'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.0'
args: ['update-all']
waitFor: ['prepare-workspace']
id: 'update-deps'
Expand All @@ -43,29 +43,29 @@ steps:
args: ['container', 'clusters', 'get-credentials', 'solo-kit-test']
id: 'gcloud-solo-kit-test'

# check code gen for kubernetes custom resources
# this step passes if there is no generated diff, fails otherwise
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.0'
entrypoint: 'bash'
args: ['ci/check-code-gen.sh']
waitFor: ['update-deps']
dir: *dir
id: 'check-code-and-docs-gen'

# e2e-go-mod-ginkgo is produced from https://github.com/solo-io/cloud-builders/tree/master/e2e-go-mod-ginkgo
# sets up redis, consul, kubectl, go with required environment variables
# need to use the provided entrypoint
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.6.2'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.0'
entrypoint: 'bash'
env:
- 'RUN_KUBE_TESTS=1'
- 'RUN_CONSUL_TESTS=1'
- 'RUN_VAULT_TESTS=1'
args: ['-c', 'make test']
waitFor: ['update-deps']
waitFor: ['check-code-and-docs-gen']
dir: *dir
id: 'test'

# check code gen for kubernetes custom resources
# this step passes if there is no generated diff, fails otherwise
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.6.2'
entrypoint: 'bash'
args: ['ci/check-code-gen.sh']
waitFor: ['update-deps']
dir: *dir
id: 'check-code-and-docs-gen'

timeout: 1500s
tags: ['solo-kit']
options:
Expand Down
91 changes: 47 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
cuelang.org/go v0.3.2
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/bugsnag/bugsnag-go v1.5.0
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1
github.com/envoyproxy/protoc-gen-validate v0.4.0
github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f
github.com/envoyproxy/protoc-gen-validate v0.10.1
github.com/fgrosse/zaptest v1.1.0
github.com/getkin/kin-openapi v0.80.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
Expand All @@ -18,34 +18,35 @@ require (
github.com/hashicorp/consul/api v1.3.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/vault/api v1.0.5-0.20191108163347-bdd38fca2cff
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334
github.com/iancoleman/strcase v0.2.0
github.com/mitchellh/hashstructure v1.0.0
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.7
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.10
github.com/pkg/errors v0.9.1
github.com/pseudomuto/protoc-gen-doc v1.5.0
github.com/pseudomuto/protokit v0.2.0
github.com/radovskyb/watcher v1.0.2
github.com/rotisserie/eris v0.1.1
github.com/solo-io/anyvendor v0.0.1
github.com/solo-io/go-list-licenses v0.1.4
github.com/solo-io/go-utils v0.24.6
github.com/solo-io/k8s-utils v0.5.0
github.com/solo-io/go-utils v0.24.8
github.com/solo-io/k8s-utils v0.6.0
github.com/solo-io/protoc-gen-ext v0.0.18
github.com/solo-io/protoc-gen-openapi v0.1.1
go.opencensus.io v0.24.0
go.uber.org/zap v1.24.0
golang.org/x/sync v0.2.0
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c
google.golang.org/grpc v1.51.0
go.uber.org/zap v1.25.0
golang.org/x/sync v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.30.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.27.3
k8s.io/apiextensions-apiserver v0.27.3
k8s.io/apimachinery v0.27.3
k8s.io/client-go v0.27.3
k8s.io/code-generator v0.27.3
k8s.io/utils v0.0.0-20230209194617-a36077c30491
k8s.io/api v0.28.3
k8s.io/apiextensions-apiserver v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/code-generator v0.28.3
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/structured-merge-diff/v4 v4.2.3
sigs.k8s.io/yaml v1.3.0
)
Expand All @@ -55,27 +56,27 @@ require (
github.com/Masterminds/semver v1.4.2 // indirect
github.com/armon/go-metrics v0.3.0 // indirect
github.com/avast/retry-go v2.2.0+incompatible // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/cockroachdb/apd/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emicklei/proto v1.6.15 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-hclog v0.9.2 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
Expand All @@ -86,20 +87,21 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/serf v0.8.2 // indirect
github.com/hashicorp/vault/sdk v0.1.14-0.20191108161836-82f2b5571044 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.13 // 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/k0kubun/pp v2.3.0+incompatible // indirect
github.com/lyft/protoc-gen-star v0.6.0 // indirect
github.com/lyft/protoc-gen-star/v2 v2.0.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-zglob v0.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -108,28 +110,28 @@ require (
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cobra v1.6.0 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/tools v0.9.3 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
)

Expand All @@ -140,8 +142,9 @@ replace (
// using the pseudo version of github.com/form3tech-oss/[email protected] instead of the version directly,
// to avoid error about it being used for two different module paths
github.com/dgrijalva/jwt-go => github.com/form3tech-oss/jwt-go v0.0.0-20210511163231-5b2d2b5f6c34
github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309
github.com/docker/docker => github.com/moby/moby v24.0.7+incompatible

// consul
github.com/hashicorp/consul/api => github.com/hashicorp/consul/api v1.1.0
github.com/iancoleman/strcase => github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334
)
Loading

0 comments on commit 4ea30aa

Please sign in to comment.