Skip to content

Commit e6ff5f3

Browse files
authored
Merge pull request #12191 from sbueringer/pr-bump-cr-v0.21
⚠️ Bump to controller-runtime v0.21 / controller-tools v0.18 / k8s.io/* v0.33 / move to randfill
2 parents 2fd0833 + 11bbeea commit e6ff5f3

File tree

78 files changed

+672
-652
lines changed

Some content is hidden

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

78 files changed

+672
-652
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ linters:
261261
- linters:
262262
- staticcheck
263263
text: 'SA1019: .*\.Deprecated\.V1Beta1.* is deprecated'
264+
# CR v0.21 deprecated Result.Requeue, will be fixed incrementally and tracked via https://github.com/kubernetes-sigs/cluster-api/issues/12272
265+
- linters:
266+
- staticcheck
267+
text: 'SA1019: .*(res|result|i|j)\.Requeue is deprecated: Use `RequeueAfter` instead'
264268
- linters:
265269
- revive
266270
text: 'exported: exported method .*\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported'

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ KUSTOMIZE_BIN := kustomize
106106
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
107107
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
108108

109-
SETUP_ENVTEST_VER := release-0.20
109+
SETUP_ENVTEST_VER := release-0.21
110110
SETUP_ENVTEST_BIN := setup-envtest
111111
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
112112
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
113113

114-
CONTROLLER_GEN_VER := v0.17.3
114+
CONTROLLER_GEN_VER := v0.18.0
115115
CONTROLLER_GEN_BIN := controller-gen
116116
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
117117
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen

api/addons/v1beta1/conversion_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
"reflect"
2323
"testing"
2424

25-
fuzz "github.com/google/gofuzz"
2625
"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
2726
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
27+
"sigs.k8s.io/randfill"
2828

2929
addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2"
3030
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
@@ -51,8 +51,8 @@ func ClusterResourceSetFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{}
5151
}
5252
}
5353

54-
func hubClusterResourceSetStatus(in *addonsv1.ClusterResourceSetStatus, c fuzz.Continue) {
55-
c.FuzzNoCustom(in)
54+
func hubClusterResourceSetStatus(in *addonsv1.ClusterResourceSetStatus, c randfill.Continue) {
55+
c.FillNoCustom(in)
5656
// Drop empty structs with only omit empty fields.
5757
if in.Deprecated != nil {
5858
if in.Deprecated.V1Beta1 == nil || reflect.DeepEqual(in.Deprecated.V1Beta1, &addonsv1.ClusterResourceSetV1Beta1DeprecatedStatus{}) {
@@ -61,8 +61,8 @@ func hubClusterResourceSetStatus(in *addonsv1.ClusterResourceSetStatus, c fuzz.C
6161
}
6262
}
6363

64-
func spokeClusterResourceSetStatus(in *ClusterResourceSetStatus, c fuzz.Continue) {
65-
c.FuzzNoCustom(in)
64+
func spokeClusterResourceSetStatus(in *ClusterResourceSetStatus, c randfill.Continue) {
65+
c.FillNoCustom(in)
6666
// Drop empty structs with only omit empty fields.
6767
if in.V1Beta2 != nil {
6868
if reflect.DeepEqual(in.V1Beta2, &ClusterResourceSetV1Beta2Status{}) {

api/bootstrap/kubeadm/v1beta1/conversion_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
"reflect"
2323
"testing"
2424

25-
fuzz "github.com/google/gofuzz"
2625
"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
2726
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
27+
"sigs.k8s.io/randfill"
2828

2929
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
3030
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
@@ -53,8 +53,8 @@ func KubeadmConfigFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
5353
}
5454
}
5555

56-
func hubKubeadmConfigStatus(in *bootstrapv1.KubeadmConfigStatus, c fuzz.Continue) {
57-
c.FuzzNoCustom(in)
56+
func hubKubeadmConfigStatus(in *bootstrapv1.KubeadmConfigStatus, c randfill.Continue) {
57+
c.FillNoCustom(in)
5858
// Always create struct with at least one mandatory fields.
5959
if in.Deprecated == nil {
6060
in.Deprecated = &bootstrapv1.KubeadmConfigDeprecatedStatus{}
@@ -71,15 +71,15 @@ func hubKubeadmConfigStatus(in *bootstrapv1.KubeadmConfigStatus, c fuzz.Continue
7171
}
7272
}
7373

74-
func spokeKubeadmConfigSpec(in *KubeadmConfigSpec, c fuzz.Continue) {
75-
c.FuzzNoCustom(in)
74+
func spokeKubeadmConfigSpec(in *KubeadmConfigSpec, c randfill.Continue) {
75+
c.FillNoCustom(in)
7676

7777
// Drop UseExperimentalRetryJoin as we intentionally don't preserve it.
7878
in.UseExperimentalRetryJoin = false
7979
}
8080

81-
func spokeKubeadmConfigStatus(in *KubeadmConfigStatus, c fuzz.Continue) {
82-
c.FuzzNoCustom(in)
81+
func spokeKubeadmConfigStatus(in *KubeadmConfigStatus, c randfill.Continue) {
82+
c.FillNoCustom(in)
8383
// Drop empty structs with only omit empty fields.
8484
if in.V1Beta2 != nil {
8585
if reflect.DeepEqual(in.V1Beta2, &KubeadmConfigV1Beta2Status{}) {

api/controlplane/kubeadm/v1beta1/conversion_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222
"reflect"
2323
"testing"
2424

25-
fuzz "github.com/google/gofuzz"
2625
"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
2726
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
2827
"k8s.io/utils/ptr"
28+
"sigs.k8s.io/randfill"
2929

3030
bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1"
3131
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
@@ -55,8 +55,8 @@ func KubeadmControlPlaneFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{
5555
}
5656
}
5757

58-
func hubKubeadmControlPlaneStatus(in *controlplanev1.KubeadmControlPlaneStatus, c fuzz.Continue) {
59-
c.FuzzNoCustom(in)
58+
func hubKubeadmControlPlaneStatus(in *controlplanev1.KubeadmControlPlaneStatus, c randfill.Continue) {
59+
c.FillNoCustom(in)
6060
// Always create struct with at least one mandatory fields.
6161
if in.Deprecated == nil {
6262
in.Deprecated = &controlplanev1.KubeadmControlPlaneDeprecatedStatus{}
@@ -79,8 +79,8 @@ func hubKubeadmControlPlaneStatus(in *controlplanev1.KubeadmControlPlaneStatus,
7979
}
8080
}
8181

82-
func spokeKubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, c fuzz.Continue) {
83-
c.FuzzNoCustom(in)
82+
func spokeKubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, c randfill.Continue) {
83+
c.FillNoCustom(in)
8484
// Drop empty structs with only omit empty fields.
8585
if in.V1Beta2 != nil {
8686
if reflect.DeepEqual(in.V1Beta2, &KubeadmControlPlaneV1Beta2Status{}) {
@@ -98,8 +98,8 @@ func KubeadmControlPlaneTemplateFuzzFuncs(_ runtimeserializer.CodecFactory) []in
9898
}
9999
}
100100

101-
func spokeKubeadmConfigSpec(in *bootstrapv1beta1.KubeadmConfigSpec, c fuzz.Continue) {
102-
c.FuzzNoCustom(in)
101+
func spokeKubeadmConfigSpec(in *bootstrapv1beta1.KubeadmConfigSpec, c randfill.Continue) {
102+
c.FillNoCustom(in)
103103

104104
// Drop UseExperimentalRetryJoin as we intentionally don't preserve it.
105105
in.UseExperimentalRetryJoin = false

0 commit comments

Comments
 (0)