Skip to content

Commit

Permalink
Upgrade to controller-runtime v0.10, controller-tools v0.7 and Kubern…
Browse files Browse the repository at this point in the history
…etes 1.22

Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Sep 20, 2021
1 parent 0065d5c commit 662bbc8
Show file tree
Hide file tree
Showing 31 changed files with 328 additions and 179 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: 7 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ require (
github.com/drone/envsubst/v2 v2.0.0-20210615175204-7bf45dbf5372
github.com/evanphx/json-patch v4.11.0+incompatible
github.com/fatih/color v1.12.0
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/go-logr/logr v0.4.0
github.com/gobuffalo/flect v0.2.3
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.5.6
github.com/google/go-github/v33 v33.0.0
github.com/google/gofuzz v1.2.0
Expand All @@ -30,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.21.4
k8s.io/apiextensions-apiserver v0.21.4
k8s.io/apimachinery v0.21.4
k8s.io/apiserver v0.21.4
k8s.io/client-go v0.21.4
k8s.io/api v0.22.1
k8s.io/apiextensions-apiserver v0.22.1
k8s.io/apimachinery v0.22.1
k8s.io/apiserver v0.22.1
k8s.io/client-go v0.22.1
k8s.io/cluster-bootstrap v0.21.4
k8s.io/component-base v0.21.4
k8s.io/component-base v0.22.1
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
sigs.k8s.io/controller-runtime v0.10.1-0.20210916143346-8e1263d50ea2
sigs.k8s.io/yaml v1.2.0
)
Loading

0 comments on commit 662bbc8

Please sign in to comment.