Skip to content

Commit c399f0c

Browse files
⚠️ : upgrade k8s 1.27.1 to 1.28.0 and controller-runtime from 0.15.0 to 0.16.0 (#3570)
⚠️ upgrade k8s 1.27 to 1.28 and controller-runtime from 0.15 to 0.16
1 parent 4976e0a commit c399f0c

File tree

65 files changed

+641
-562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+641
-562
lines changed

docs/book/src/component-config-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
ENVTEST_K8S_VERSION = 1.27.1
5+
ENVTEST_K8S_VERSION = 1.28.0
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))

docs/book/src/component-config-tutorial/testdata/project/go.mod

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module tutorial.kubebuilder.io/project
33
go 1.20
44

55
require (
6-
k8s.io/apimachinery v0.27.2
7-
k8s.io/client-go v0.27.2
8-
sigs.k8s.io/controller-runtime v0.15.0
6+
k8s.io/apimachinery v0.28.0
7+
k8s.io/client-go v0.28.0
8+
sigs.k8s.io/controller-runtime v0.16.0
99
)
1010

1111
require (
@@ -18,14 +18,14 @@ require (
1818
github.com/go-logr/logr v1.2.4 // indirect
1919
github.com/go-logr/zapr v1.2.4 // indirect
2020
github.com/go-openapi/jsonpointer v0.19.6 // indirect
21-
github.com/go-openapi/jsonreference v0.20.1 // indirect
21+
github.com/go-openapi/jsonreference v0.20.2 // indirect
2222
github.com/go-openapi/swag v0.22.3 // indirect
2323
github.com/gogo/protobuf v1.3.2 // indirect
2424
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2525
github.com/golang/protobuf v1.5.3 // indirect
26-
github.com/google/gnostic v0.5.7-v3refs // indirect
26+
github.com/google/gnostic-models v0.6.8 // indirect
2727
github.com/google/go-cmp v0.5.9 // indirect
28-
github.com/google/gofuzz v1.1.0 // indirect
28+
github.com/google/gofuzz v1.2.0 // indirect
2929
github.com/google/uuid v1.3.0 // indirect
3030
github.com/imdario/mergo v0.3.6 // indirect
3131
github.com/josharian/intern v1.0.0 // indirect
@@ -36,32 +36,32 @@ require (
3636
github.com/modern-go/reflect2 v1.0.2 // indirect
3737
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3838
github.com/pkg/errors v0.9.1 // indirect
39-
github.com/prometheus/client_golang v1.15.1 // indirect
39+
github.com/prometheus/client_golang v1.16.0 // indirect
4040
github.com/prometheus/client_model v0.4.0 // indirect
41-
github.com/prometheus/common v0.42.0 // indirect
42-
github.com/prometheus/procfs v0.9.0 // indirect
41+
github.com/prometheus/common v0.44.0 // indirect
42+
github.com/prometheus/procfs v0.10.1 // indirect
4343
github.com/spf13/pflag v1.0.5 // indirect
44-
go.uber.org/atomic v1.7.0 // indirect
45-
go.uber.org/multierr v1.6.0 // indirect
46-
go.uber.org/zap v1.24.0 // indirect
47-
golang.org/x/net v0.10.0 // indirect
48-
golang.org/x/oauth2 v0.5.0 // indirect
49-
golang.org/x/sys v0.8.0 // indirect
50-
golang.org/x/term v0.8.0 // indirect
51-
golang.org/x/text v0.9.0 // indirect
44+
go.uber.org/multierr v1.11.0 // indirect
45+
go.uber.org/zap v1.25.0 // indirect
46+
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
47+
golang.org/x/net v0.13.0 // indirect
48+
golang.org/x/oauth2 v0.8.0 // indirect
49+
golang.org/x/sys v0.11.0 // indirect
50+
golang.org/x/term v0.10.0 // indirect
51+
golang.org/x/text v0.11.0 // indirect
5252
golang.org/x/time v0.3.0 // indirect
53-
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
53+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
5454
google.golang.org/appengine v1.6.7 // indirect
5555
google.golang.org/protobuf v1.30.0 // indirect
5656
gopkg.in/inf.v0 v0.9.1 // indirect
5757
gopkg.in/yaml.v2 v2.4.0 // indirect
5858
gopkg.in/yaml.v3 v3.0.1 // indirect
59-
k8s.io/api v0.27.2 // indirect
60-
k8s.io/apiextensions-apiserver v0.27.2 // indirect
61-
k8s.io/component-base v0.27.2 // indirect
62-
k8s.io/klog/v2 v2.90.1 // indirect
63-
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
64-
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
59+
k8s.io/api v0.28.0 // indirect
60+
k8s.io/apiextensions-apiserver v0.28.0 // indirect
61+
k8s.io/component-base v0.28.0 // indirect
62+
k8s.io/klog/v2 v2.100.1 // indirect
63+
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
64+
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
6565
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
6666
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
6767
sigs.k8s.io/yaml v1.3.0 // indirect

docs/book/src/component-config-tutorial/testdata/project/go.sum

Lines changed: 93 additions & 112 deletions
Large diffs are not rendered by default.

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
ENVTEST_K8S_VERSION = 1.27.1
5+
ENVTEST_K8S_VERSION = 1.28.0
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))

docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import (
3838
"sigs.k8s.io/controller-runtime/pkg/envtest"
3939
logf "sigs.k8s.io/controller-runtime/pkg/log"
4040
"sigs.k8s.io/controller-runtime/pkg/log/zap"
41+
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
42+
"sigs.k8s.io/controller-runtime/pkg/webhook"
4143
)
4244

4345
// These tests use Ginkgo (BDD-style Go testing framework). Refer to
@@ -71,7 +73,7 @@ var _ = BeforeSuite(func() {
7173
// Note that you must have the required binaries setup under the bin directory to perform
7274
// the tests directly. When we run make test it will be setup and used automatically.
7375
BinaryAssetsDirectory: filepath.Join("..", "..", "bin", "k8s",
74-
fmt.Sprintf("1.27.1-%s-%s", runtime.GOOS, runtime.GOARCH)),
76+
fmt.Sprintf("1.28.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
7577

7678
WebhookInstallOptions: envtest.WebhookInstallOptions{
7779
Paths: []string{filepath.Join("..", "..", "config", "webhook")},
@@ -100,12 +102,14 @@ var _ = BeforeSuite(func() {
100102
// start webhook server using Manager
101103
webhookInstallOptions := &testEnv.WebhookInstallOptions
102104
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
103-
Scheme: scheme,
104-
Host: webhookInstallOptions.LocalServingHost,
105-
Port: webhookInstallOptions.LocalServingPort,
106-
CertDir: webhookInstallOptions.LocalServingCertDir,
107-
LeaderElection: false,
108-
MetricsBindAddress: "0",
105+
Scheme: scheme,
106+
WebhookServer: webhook.NewServer(webhook.Options{
107+
Host: webhookInstallOptions.LocalServingHost,
108+
Port: webhookInstallOptions.LocalServingPort,
109+
CertDir: webhookInstallOptions.LocalServingCertDir,
110+
}),
111+
LeaderElection: false,
112+
Metrics: metricsserver.Options{BindAddress: "0"},
109113
})
110114
Expect(err).NotTo(HaveOccurred())
111115

docs/book/src/cronjob-tutorial/testdata/project/cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
ctrl "sigs.k8s.io/controller-runtime"
3232
"sigs.k8s.io/controller-runtime/pkg/healthz"
3333
"sigs.k8s.io/controller-runtime/pkg/log/zap"
34+
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
3435

3536
batchv1 "tutorial.kubebuilder.io/project/api/v1"
3637
"tutorial.kubebuilder.io/project/internal/controller"
@@ -86,8 +87,7 @@ func main() {
8687

8788
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
8889
Scheme: scheme,
89-
MetricsBindAddress: metricsAddr,
90-
Port: 9443,
90+
Metrics: metricsserver.Options{BindAddress: metricsAddr},
9191
HealthProbeBindAddress: probeAddr,
9292
LeaderElection: enableLeaderElection,
9393
LeaderElectionID: "80807133.tutorial.kubebuilder.io",

0 commit comments

Comments
 (0)