Skip to content

Commit

Permalink
Merge pull request #5249 from sbueringer/pr-upgrade-controller-runtime
Browse files Browse the repository at this point in the history
⚠️ Upgrade to controller-runtime v0.10, controller-tools v0.7 and Kubernetes v1.22
  • Loading branch information
k8s-ci-robot authored Sep 21, 2021
2 parents 106e2d6 + 81c140d commit c6ea715
Show file tree
Hide file tree
Showing 31 changed files with 222 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: kubeadmconfigs.bootstrap.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: metadata.clusterctl.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: providers.clusterctl.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/config/manifest/clusterctl-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: providers.clusterctl.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: clusterresourcesetbindings.addons.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: clusterresourcesets.addons.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: clusterclasses.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: clusters.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: machinedeployments.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: machinehealthchecks.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: machinepools.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: machines.cluster.x-k8s.io
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: machinesets.cluster.x-k8s.io
spec:
Expand Down
4 changes: 3 additions & 1 deletion controllers/machine_controller_node_labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func TestReconcileInterruptibleNodeLabel(t *testing.T) {
g.Expect(env.Create(ctx, cluster)).To(Succeed())
g.Expect(env.Create(ctx, node)).To(Succeed())
g.Expect(env.Create(ctx, infraMachine)).To(Succeed())
g.Expect(env.Create(ctx, machine)).To(Succeed())
// Note: We have to DeepCopy the machine, because the Create call clears the status and
// reconcileInterruptibleNodeLabel requires .status.nodeRef to be set.
g.Expect(env.Create(ctx, machine.DeepCopy())).To(Succeed())

// Patch infra machine status
patchHelper, err := patch.NewHelper(infraMachine, env)
Expand Down
9 changes: 5 additions & 4 deletions controllers/remote/cluster_cache_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ func TestClusterCacheTracker(t *testing.T) {
t.Log("Creating a test cluster")
clusterA = &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Namespace: ns.GetName(),
Name: "test-cluster",
Annotations: make(map[string]string),
Namespace: ns.GetName(),
Name: "test-cluster",
},
}
g.Expect(k8sClient.Create(ctx, clusterA)).To(Succeed())
Expand Down Expand Up @@ -150,7 +149,9 @@ func TestClusterCacheTracker(t *testing.T) {
}).Should(Equal(0))

t.Log("Updating the cluster")
clusterA.Annotations["update1"] = "1"
clusterA.Annotations = map[string]string{
"update1": "1",
}
g.Expect(k8sClient.Update(ctx, clusterA)).To(Succeed())

t.Log("Waiting to receive the watch notification")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io
spec:
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ require (
go.etcd.io/etcd/client/v3 v3.5.0
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
google.golang.org/grpc v1.39.0
k8s.io/api v0.22.1
k8s.io/apiextensions-apiserver v0.21.4
k8s.io/apimachinery v0.22.1
k8s.io/apiserver v0.21.4
k8s.io/client-go v0.22.1
k8s.io/api v0.22.2
k8s.io/apiextensions-apiserver v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/apiserver v0.22.2
k8s.io/client-go v0.22.2
k8s.io/cluster-bootstrap v0.21.4
k8s.io/component-base v0.22.1
k8s.io/component-base v0.22.2
k8s.io/klog/v2 v2.9.0
k8s.io/kubectl v0.21.4
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
sigs.k8s.io/controller-runtime v0.9.7
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
sigs.k8s.io/controller-runtime v0.10.1
sigs.k8s.io/yaml v1.2.0
)
Loading

0 comments on commit c6ea715

Please sign in to comment.