Repository: kubernetes-sigs/cluster-api
Pull request #6701 (2022-06-22 14:22:12)

:book: add notes about cert-managers CRD storage version deprecation
<!-- please add a icon to the title of this PR (see https://sigs.k8s.io/cluster-api/VERSIONING.md), and delete this line and similar ones -->
<!-- the icon will be either ⚠️ (:warning:, major or breaking changes), ✨ (:sparkles:, feature additions), 🐛 (:bug:, patch and bugfixes), 📖 (:book:, documentation or proposals), or 🌱 (:seedling:, minor or other) -->

**What this PR does / why we need it**:

Adds information about the issue described in https://github.com/kubernetes-sigs/cluster-api/issues/6674#issuecomment-1162746050 to the documentation and adds a link to the documentation of Cert Manager.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of #6674


chrischdi: @sbueringer / @fabriziopandini cherry pick for release-v1.2?
sbueringer: /cherry-pick release-1.2
k8s-infra-cherrypick-robot: @sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.2 in a new PR and assign it to you.

<details>

In response to [this](https://github.com/kubernetes-sigs/cluster-api/pull/6701#issuecomment-1164263021):

>/cherry-pick release-1.2


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
k8s-ci-robot: New changes are detected. LGTM label has been removed.

Patch:
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index ddea2be67..ba935577f 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -1,6 +1,10 @@
 on:
   pull_request_target:
     types: [opened, edited, synchronize, reopened]
+    # Don't run this check on PRs created by the cherry-pick bot,
+    # as the PR description is too short, but otherwise the PRs are fine.
+    branches-ignore:
+      - k8s-infra-cherrypick-robot/**
 
 jobs:
   verify:
@@ -10,8 +14,5 @@ jobs:
     - name: Verifier action
       id: verifier
       uses: kubernetes-sigs/kubebuilder-release-tools@v0.2.0
-      # Don't run this step on PRs created by the cherry-pick bot,
-      # as the PR description is too short, but otherwise the PRs are fine.
-      if: ${{ github.event.pull_request.head.repo.owner.login != 'k8s-infra-cherrypick-robot' }}
       with:
         github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/cmd/clusterctl/client/cluster/template.go b/cmd/clusterctl/client/cluster/template.go
index 4f8414ade..859d20dd8 100644
--- a/cmd/clusterctl/client/cluster/template.go
+++ b/cmd/clusterctl/client/cluster/template.go
@@ -24,7 +24,7 @@ import (
 	"os"
 	"strings"
 
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 	"github.com/pkg/errors"
 	"golang.org/x/oauth2"
 	corev1 "k8s.io/api/core/v1"
diff --git a/cmd/clusterctl/client/repository/repository_github.go b/cmd/clusterctl/client/repository/repository_github.go
index 3e5d506ba..6d1f1b8ea 100644
--- a/cmd/clusterctl/client/repository/repository_github.go
+++ b/cmd/clusterctl/client/repository/repository_github.go
@@ -26,7 +26,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 	"github.com/pkg/errors"
 	"golang.org/x/oauth2"
 	"k8s.io/apimachinery/pkg/util/version"
diff --git a/cmd/clusterctl/cmd/version_checker.go b/cmd/clusterctl/cmd/version_checker.go
index e3a410593..7dce92455 100644
--- a/cmd/clusterctl/cmd/version_checker.go
+++ b/cmd/clusterctl/cmd/version_checker.go
@@ -26,7 +26,7 @@ import (
 	"time"
 
 	"github.com/blang/semver"
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 	"github.com/pkg/errors"
 	"golang.org/x/oauth2"
 	"k8s.io/client-go/util/homedir"
diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md
index 55558523e..d333814ba 100644
--- a/docs/book/src/SUMMARY.md
+++ b/docs/book/src/SUMMARY.md
@@ -68,7 +68,6 @@
           - [v0.4 to v1.0](./developer/providers/v0.4-to-v1.0.md)
           - [v1.0 to v1.1](./developer/providers/v1.0-to-v1.1.md)
           - [v1.1 to v1.2](./developer/providers/v1.1-to-v1.2.md)
-          - [v1.2 to v1.3](./developer/providers/v1.2-to-v1.3.md)
         - [Provider contracts](./developer/providers/contracts.md)
           - [Cluster Infrastructure](./developer/providers/cluster-infrastructure.md)
           - [Machine Infrastructure](./developer/providers/machine-infrastructure.md)
diff --git a/docs/book/src/developer/providers/v1.2-to-v1.3.md b/docs/book/src/developer/providers/v1.2-to-v1.3.md
deleted file mode 100644
index f94d30ae7..000000000
--- a/docs/book/src/developer/providers/v1.2-to-v1.3.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Cluster API v1.2 compared to v1.3
-
-This document provides an overview over relevant changes between Cluster API v1.2 and v1.3 for
-maintainers of providers and consumers of our Go API.
-
-## Minimum Go version
-
-* The Go version used by Cluster API is still Go 1.18.x
-
-## Dependencies
-
-**Note**: Only the most relevant dependencies are listed, `k8s.io/` and `ginkgo`/`gomega` dependencies
-in Cluster API are kept in sync with the versions used by `sigs.k8s.io/controller-runtime`. 
-
--
-
-## Changes by Kind
-
-### Deprecation
-
--
-
-### Removals
-
--
-
-### API Changes
-
--
-
-### Other
-
--
\ No newline at end of file
diff --git a/docs/book/src/user/troubleshooting.md b/docs/book/src/user/troubleshooting.md
index 1765834a4..8e95cfe5b 100644
--- a/docs/book/src/user/troubleshooting.md
+++ b/docs/book/src/user/troubleshooting.md
@@ -96,7 +96,7 @@ exit
 When using older versions of Cluster API 0.4 and 1.0 releases - 0.4.6, 1.0.3 and older respectively - Cert Manager may not be downloadable due to a change in the repository location. This will cause `clusterctl init` to fail with the error:
 
 ```bash
-cluster-api % clusterctl init --infrastructure docker
+clusterctl init --infrastructure docker
 ```
 ```bash
 Fetching providers
@@ -116,6 +116,31 @@ Alternatively a Cert Manager yaml file can be placed in the [clusterctl override
 
 More information on the clusterctl config file can be found at [its page in the book](../clusterctl/configuration.md#clusterctl-configuration-file)
 
+## Failed clusterctl upgrade apply - 'failed to update cert-manager component'
+
+Upgrading Cert Manager may fail due to a breaking change introduced in Cert Manager release v1.6.
+An upgrade using `clusterctl` is affected when:
+
+* using `clusterctl` in version `v1.1.4` or a more recent version.
+* Cert Manager lower than version `v1.0.0` did run in the management cluster (which was shipped in Cluster API until including `v0.3.14`).
+
+This will cause `clusterctl upgrade apply` to fail with the error:
+
+```bash
+clusterctl upgrade apply
+```
+
+```bash
+Checking cert-manager version...
+Deleting cert-manager Version="v1.5.3"
+Installing cert-manager Version="v1.7.2"
+Error: action failed after 10 attempts: failed to update cert-manager component apiextensions.k8s.io/v1, Kind=CustomResourceDefinition, /certificaterequests.cert-manager.io: CustomResourceDefinition.apiextensions.k8s.io "certificaterequests.cert-manager.io" is invalid: status.storedVersions[0]: Invalid value: "v1alpha2": must appear in spec.versions
+```
+
+The Cert Manager maintainers provide documentation to [migrate the deprecated API Resources](https://cert-manager.io/docs/installation/upgrading/remove-deprecated-apis/#upgrading-existing-cert-manager-resources) to the new storage versions to mitigate the issue.
+
+More information about the change in Cert Manager can be found at [their upgrade notes from v1.5 to v1.6](https://cert-manager.io/docs/installation/upgrading/upgrading-1.5-1.6).
+
 ## Clusterctl failing to start providers due to outdated image overrides
 
 clusterctl allows users to configure [image overrides](../clusterctl/configuration.md#image-overrides) via the clusterctl config file.
diff --git a/go.mod b/go.mod
index b9b7903c1..3f20d648a 100644
--- a/go.mod
+++ b/go.mod
@@ -17,7 +17,7 @@ require (
 	github.com/go-logr/logr v1.2.0
 	github.com/gobuffalo/flect v0.2.5
 	github.com/google/go-cmp v0.5.8
-	github.com/google/go-github/v45 v45.2.0
+	github.com/google/go-github/v33 v33.0.0
 	github.com/google/gofuzz v1.2.0
 	github.com/mattn/go-runewidth v0.0.13 // indirect
 	github.com/onsi/ginkgo v1.16.5
@@ -83,7 +83,7 @@ require (
 	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/google/btree v1.0.1 // indirect
 	github.com/google/cel-go v0.10.1 // indirect
-	github.com/google/go-querystring v1.1.0 // indirect
+	github.com/google/go-querystring v1.0.0 // indirect
 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
 	github.com/google/uuid v1.1.2 // indirect
 	github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
diff --git a/go.sum b/go.sum
index 42525dc7d..463ee37bc 100644
--- a/go.sum
+++ b/go.sum
@@ -339,10 +339,10 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
 github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI=
-github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
-github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
-github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
+github.com/google/go-github/v33 v33.0.0 h1:qAf9yP0qc54ufQxzwv+u9H0tiVOnPJxo0lI/JXqw3ZM=
+github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg=
+github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
+github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
@@ -794,7 +794,6 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
diff --git a/hack/tools/go.mod b/hack/tools/go.mod
index fcec21b8b..79cf39839 100644
--- a/hack/tools/go.mod
+++ b/hack/tools/go.mod
@@ -67,7 +67,7 @@ require (
 	github.com/google/cel-go v0.10.1 // indirect
 	github.com/google/gnostic v0.5.7-v3refs // indirect
 	github.com/google/go-cmp v0.5.8 // indirect
-	github.com/google/go-github/v45 v45.2.0 // indirect
+	github.com/google/go-github/v33 v33.0.0 // indirect
 	github.com/google/go-querystring v1.1.0 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/uuid v1.3.0 // indirect
diff --git a/hack/tools/go.sum b/hack/tools/go.sum
index eb6b18679..1d468df70 100644
--- a/hack/tools/go.sum
+++ b/hack/tools/go.sum
@@ -334,8 +334,9 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
 github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI=
-github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
+github.com/google/go-github/v33 v33.0.0 h1:qAf9yP0qc54ufQxzwv+u9H0tiVOnPJxo0lI/JXqw3ZM=
+github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg=
+github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
 github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=


Test patch:
diff --git a/cmd/clusterctl/client/cluster/template_test.go b/cmd/clusterctl/client/cluster/template_test.go
index c64b4937d..18fac15ba 100644
--- a/cmd/clusterctl/client/cluster/template_test.go
+++ b/cmd/clusterctl/client/cluster/template_test.go
@@ -25,7 +25,7 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 	. "github.com/onsi/gomega"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/cmd/clusterctl/client/repository/repository_github_test.go b/cmd/clusterctl/client/repository/repository_github_test.go
index faef2373a..c1ef05b52 100644
--- a/cmd/clusterctl/client/repository/repository_github_test.go
+++ b/cmd/clusterctl/client/repository/repository_github_test.go
@@ -22,7 +22,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 	. "github.com/onsi/gomega"
 	"k8s.io/utils/pointer"
 
diff --git a/cmd/clusterctl/internal/test/fake_github.go b/cmd/clusterctl/internal/test/fake_github.go
index eb1b31d01..42cb65f26 100644
--- a/cmd/clusterctl/internal/test/fake_github.go
+++ b/cmd/clusterctl/internal/test/fake_github.go
@@ -21,7 +21,7 @@ import (
 	"net/http/httptest"
 	"net/url"
 
-	"github.com/google/go-github/v45/github"
+	"github.com/google/go-github/v33/github"
 )
 
 const baseURLPath = "/api-v3"
diff --git a/internal/controllers/topology/cluster/cluster_controller_test.go b/internal/controllers/topology/cluster/cluster_controller_test.go
index e0d92dc43..d0b534e44 100644
--- a/internal/controllers/topology/cluster/cluster_controller_test.go
+++ b/internal/controllers/topology/cluster/cluster_controller_test.go
@@ -547,19 +547,19 @@ func setupTestEnvForIntegrationTests(ns *corev1.Namespace) (func() error, error)
 	// Cluster given a skeletal Cluster object and a ClusterClass. The objects include:
 
 	// 1) Templates for Machine, Cluster, ControlPlane and Bootstrap.
-	infrastructureMachineTemplate1 := builder.TestInfrastructureMachineTemplate(ns.Name, infrastructureMachineTemplateName1).Build()
-	infrastructureMachineTemplate2 := builder.TestInfrastructureMachineTemplate(ns.Name, infrastructureMachineTemplateName2).
+	infrastructureMachineTemplate1 := builder.InfrastructureMachineTemplate(ns.Name, infrastructureMachineTemplateName1).Build()
+	infrastructureMachineTemplate2 := builder.InfrastructureMachineTemplate(ns.Name, infrastructureMachineTemplateName2).
 		WithSpecFields(map[string]interface{}{"spec.template.spec.fakeSetting": true}).
 		Build()
-	infrastructureClusterTemplate1 := builder.TestInfrastructureClusterTemplate(ns.Name, "infraclustertemplate1").
+	infrastructureClusterTemplate1 := builder.InfrastructureClusterTemplate(ns.Name, "infraclustertemplate1").
 		Build()
-	infrastructureClusterTemplate2 := builder.TestInfrastructureClusterTemplate(ns.Name, "infraclustertemplate2").
+	infrastructureClusterTemplate2 := builder.InfrastructureClusterTemplate(ns.Name, "infraclustertemplate2").
 		WithSpecFields(map[string]interface{}{"spec.template.spec.alteredSetting": true}).
 		Build()
-	controlPlaneTemplate := builder.TestControlPlaneTemplate(ns.Name, "cp1").
+	controlPlaneTemplate := builder.ControlPlaneTemplate(ns.Name, "cp1").
 		WithInfrastructureMachineTemplate(infrastructureMachineTemplate1).
 		Build()
-	bootstrapTemplate := builder.TestBootstrapTemplate(ns.Name, "bootstraptemplate").Build()
+	bootstrapTemplate := builder.BootstrapTemplate(ns.Name, "bootstraptemplate").Build()
 
 	// 2) ClusterClass definitions including definitions of MachineDeploymentClasses used inside the ClusterClass.
 	machineDeploymentClass1 := builder.MachineDeploymentClass(workerClassName1).
@@ -676,14 +676,14 @@ func assertClusterReconcile(cluster *clusterv1.Cluster) error {
 
 	// Check if InfrastructureRef exists and is of the expected Kind and APIVersion.
 	if err := referenceExistsWithCorrectKindAndAPIVersion(cluster.Spec.InfrastructureRef,
-		builder.TestInfrastructureClusterKind,
+		builder.GenericInfrastructureClusterKind,
 		builder.InfrastructureGroupVersion); err != nil {
 		return err
 	}
 
 	// Check if ControlPlaneRef exists is of the expected Kind and APIVersion.
 	if err := referenceExistsWithCorrectKindAndAPIVersion(cluster.Spec.ControlPlaneRef,
-		builder.TestControlPlaneKind,
+		builder.GenericControlPlaneKind,
 		builder.ControlPlaneGroupVersion); err != nil {
 		return err
 	}
@@ -742,7 +742,7 @@ func assertControlPlaneReconcile(cluster *clusterv1.Cluster) error {
 			return err
 		}
 		if err := referenceExistsWithCorrectKindAndAPIVersion(cpInfra,
-			builder.TestInfrastructureMachineTemplateKind,
+			builder.GenericInfrastructureMachineTemplateKind,
 			builder.InfrastructureGroupVersion); err != nil {
 			return err
 		}
@@ -824,7 +824,7 @@ func assertMachineDeploymentsReconcile(cluster *clusterv1.Cluster) error {
 
 			// Check if the InfrastructureReference exists.
 			if err := referenceExistsWithCorrectKindAndAPIVersion(&md.Spec.Template.Spec.InfrastructureRef,
-				builder.TestInfrastructureMachineTemplateKind,
+				builder.GenericInfrastructureMachineTemplateKind,
 				builder.InfrastructureGroupVersion); err != nil {
 				return err
 			}
@@ -836,7 +836,7 @@ func assertMachineDeploymentsReconcile(cluster *clusterv1.Cluster) error {
 
 			// Check if the Bootstrap reference has the expected Kind and APIVersion.
 			if err := referenceExistsWithCorrectKindAndAPIVersion(md.Spec.Template.Spec.Bootstrap.ConfigRef,
-				builder.TestBootstrapConfigTemplateKind,
+				builder.GenericBootstrapConfigTemplateKind,
 				builder.BootstrapGroupVersion); err != nil {
 				return err
 			}
diff --git a/internal/test/builder/bootstrap.go b/internal/test/builder/bootstrap.go
index 690e02a24..f68d79a31 100644
--- a/internal/test/builder/bootstrap.go
+++ b/internal/test/builder/bootstrap.go
@@ -50,11 +50,6 @@ var (
 
 func testBootstrapConfigTemplateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
@@ -72,11 +67,6 @@ func testBootstrapConfigTemplateCRD(gvk schema.GroupVersionKind) *apiextensionsv
 
 func testBootstrapConfigCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": bootstrapConfigSpecSchema,
 		"status": {
 			Type: "object",
diff --git a/internal/test/builder/builders.go b/internal/test/builder/builders.go
index cbcbcd1f2..dc04df51d 100644
--- a/internal/test/builder/builders.go
+++ b/internal/test/builder/builders.go
@@ -613,51 +613,6 @@ func (i *InfrastructureClusterTemplateBuilder) Build() *unstructured.Unstructure
 	return obj
 }
 
-// TestInfrastructureClusterTemplateBuilder holds the variables needed to build a generic TestInfrastructureClusterTemplate.
-// +kubebuilder:object:generate=false
-type TestInfrastructureClusterTemplateBuilder struct {
-	namespace  string
-	name       string
-	specFields map[string]interface{}
-}
-
-// TestInfrastructureClusterTemplate returns an TestInfrastructureClusterTemplateBuilder with the given name and namespace.
-func TestInfrastructureClusterTemplate(namespace, name string) *TestInfrastructureClusterTemplateBuilder {
-	return &TestInfrastructureClusterTemplateBuilder{
-		namespace: namespace,
-		name:      name,
-	}
-}
-
-// WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds
-// to the value of the spec field.
-//
-// Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.
-//
-// Example map: map[string]interface{}{
-//     "spec.version": "v1.2.3",
-// }.
-func (i *TestInfrastructureClusterTemplateBuilder) WithSpecFields(fields map[string]interface{}) *TestInfrastructureClusterTemplateBuilder {
-	i.specFields = fields
-	return i
-}
-
-// Build creates a new Unstructured object with the variables passed to the InfrastructureClusterTemplateBuilder.
-func (i *TestInfrastructureClusterTemplateBuilder) Build() *unstructured.Unstructured {
-	obj := &unstructured.Unstructured{}
-	obj.SetAPIVersion(InfrastructureGroupVersion.String())
-	obj.SetKind(TestInfrastructureClusterTemplateKind)
-	obj.SetNamespace(i.namespace)
-	obj.SetName(i.name)
-
-	// Initialize the spec.template.spec to make the object valid in reconciliation.
-	setSpecFields(obj, map[string]interface{}{"spec.template.spec": map[string]interface{}{}})
-
-	setSpecFields(obj, i.specFields)
-
-	return obj
-}
-
 // ControlPlaneTemplateBuilder holds the variables and objects needed to build a generic ControlPlane template.
 // +kubebuilder:object:generate=false
 type ControlPlaneTemplateBuilder struct {
@@ -715,63 +670,6 @@ func (c *ControlPlaneTemplateBuilder) Build() *unstructured.Unstructured {
 	return obj
 }
 
-// TestControlPlaneTemplateBuilder holds the variables and objects needed to build a generic ControlPlane template.
-// +kubebuilder:object:generate=false
-type TestControlPlaneTemplateBuilder struct {
-	namespace                     string
-	name                          string
-	infrastructureMachineTemplate *unstructured.Unstructured
-	specFields                    map[string]interface{}
-}
-
-// TestControlPlaneTemplate creates a NewControlPlaneTemplate builder with the given name and namespace.
-func TestControlPlaneTemplate(namespace, name string) *TestControlPlaneTemplateBuilder {
-	return &TestControlPlaneTemplateBuilder{
-		namespace: namespace,
-		name:      name,
-	}
-}
-
-// WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds
-// to the value of the spec field.
-//
-// Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.
-//
-// Example map: map[string]interface{}{
-//     "spec.version": "v1.2.3",
-// }.
-func (c *TestControlPlaneTemplateBuilder) WithSpecFields(fields map[string]interface{}) *TestControlPlaneTemplateBuilder {
-	c.specFields = fields
-	return c
-}
-
-// WithInfrastructureMachineTemplate adds the given Unstructured object to the ControlPlaneTemplateBuilder as its InfrastructureMachineTemplate.
-func (c *TestControlPlaneTemplateBuilder) WithInfrastructureMachineTemplate(t *unstructured.Unstructured) *TestControlPlaneTemplateBuilder {
-	c.infrastructureMachineTemplate = t
-	return c
-}
-
-// Build creates an Unstructured object from the variables passed to the ControlPlaneTemplateBuilder.
-func (c *TestControlPlaneTemplateBuilder) Build() *unstructured.Unstructured {
-	obj := &unstructured.Unstructured{}
-	obj.SetAPIVersion(ControlPlaneGroupVersion.String())
-	obj.SetKind(TestControlPlaneTemplateKind)
-	obj.SetNamespace(c.namespace)
-	obj.SetName(c.name)
-
-	// Initialize the spec.template.spec to make the object valid in reconciliation.
-	setSpecFields(obj, map[string]interface{}{"spec.template.spec": map[string]interface{}{}})
-
-	setSpecFields(obj, c.specFields)
-
-	if c.infrastructureMachineTemplate != nil {
-		if err := setNestedRef(obj, c.infrastructureMachineTemplate, "spec", "template", "spec", "machineTemplate", "infrastructureRef"); err != nil {
-			panic(err)
-		}
-	}
-	return obj
-}
-
 // InfrastructureClusterBuilder holds the variables and objects needed to build a generic InfrastructureCluster.
 // +kubebuilder:object:generate=false
 type InfrastructureClusterBuilder struct {
diff --git a/internal/test/builder/controlplane.go b/internal/test/builder/controlplane.go
index e715fcd02..ed01b2e75 100644
--- a/internal/test/builder/controlplane.go
+++ b/internal/test/builder/controlplane.go
@@ -37,47 +37,63 @@ var (
 
 	// TODO: drop generic CRDs in favour of typed test CRDs.
 
-	// TestControlPlaneTemplateKind is the Kind for the TestControlPlaneTemplate.
-	TestControlPlaneTemplateKind = "TestControlPlaneTemplate"
-	// TestControlPlaneTemplateCRD is a test control plane template CRD.
-	TestControlPlaneTemplateCRD = testControlPlaneTemplateCRD(ControlPlaneGroupVersion.WithKind(TestControlPlaneTemplateKind))
-
 	// TestControlPlaneKind is the Kind for the TestControlPlane.
 	TestControlPlaneKind = "TestControlPlane"
 	// TestControlPlaneCRD is a test control plane CRD.
 	TestControlPlaneCRD = testControlPlaneCRD(ControlPlaneGroupVersion.WithKind(TestControlPlaneKind))
 )
 
-func testControlPlaneTemplateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
+func testControlPlaneCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
-				// Mandatory field from the Cluster API contract
-				"template": {
+				// Mandatory field from the Cluster API contract - version support
+				"version": {
+					Type: "string",
+				},
+				// mandatory field from the Cluster API contract - replicas support
+				"replicas": {
+					Type:   "integer",
+					Format: "int32",
+				},
+				// mandatory field from the Cluster API contract - using Machines support
+				"machineTemplate": {
+					Type: "object",
+					Properties: map[string]apiextensionsv1.JSONSchemaProps{
+						"metadata":            metadataSchema,
+						"infrastructureRef":   refSchema,
+						"nodeDeletionTimeout": {Type: "string"},
+						"nodeDrainTimeout":    {Type: "string"},
+					},
+				},
+				// General purpose fields to be used in different test scenario.
+				"foo": {Type: "string"},
+				"bar": {Type: "string"},
+				// Copy of a subset of KCP spec fields to test server side apply on deep nested structs
+				"kubeadmConfigSpec": {
 					Type: "object",
 					Properties: map[string]apiextensionsv1.JSONSchemaProps{
-						"spec": controPlaneSpecSchema,
+						"clusterConfiguration": {
+							Type: "object",
+							Properties: map[string]apiextensionsv1.JSONSchemaProps{
+								"controllerManager": {
+									Type: "object",
+									Properties: map[string]apiextensionsv1.JSONSchemaProps{
+										"extraArgs": {
+											Type: "object",
+											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
+												Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
+											},
+										},
+									},
+								},
+							},
+						},
 					},
 				},
 			},
 		},
-	})
-}
-
-func testControlPlaneCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
-	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
-		"spec": controPlaneSpecSchema,
 		"status": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
@@ -98,55 +114,3 @@ func testControlPlaneCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomRes
 		},
 	})
 }
-
-var (
-	controPlaneSpecSchema = apiextensionsv1.JSONSchemaProps{
-		Type: "object",
-		Properties: map[string]apiextensionsv1.JSONSchemaProps{
-			// Mandatory field from the Cluster API contract - version support
-			"version": {
-				Type: "string",
-			},
-			// mandatory field from the Cluster API contract - replicas support
-			"replicas": {
-				Type:   "integer",
-				Format: "int32",
-			},
-			// mandatory field from the Cluster API contract - using Machines support
-			"machineTemplate": {
-				Type: "object",
-				Properties: map[string]apiextensionsv1.JSONSchemaProps{
-					"metadata":            metadataSchema,
-					"infrastructureRef":   refSchema,
-					"nodeDeletionTimeout": {Type: "string"},
-					"nodeDrainTimeout":    {Type: "string"},
-				},
-			},
-			// General purpose fields to be used in different test scenario.
-			"foo": {Type: "string"},
-			"bar": {Type: "string"},
-			// Copy of a subset of KCP spec fields to test server side apply on deep nested structs
-			"kubeadmConfigSpec": {
-				Type: "object",
-				Properties: map[string]apiextensionsv1.JSONSchemaProps{
-					"clusterConfiguration": {
-						Type: "object",
-						Properties: map[string]apiextensionsv1.JSONSchemaProps{
-							"controllerManager": {
-								Type: "object",
-								Properties: map[string]apiextensionsv1.JSONSchemaProps{
-									"extraArgs": {
-										Type: "object",
-										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
-											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
-										},
-									},
-								},
-							},
-						},
-					},
-				},
-			},
-		},
-	}
-)
diff --git a/internal/test/builder/infrastructure.go b/internal/test/builder/infrastructure.go
index 8fdb9617d..1f2857d39 100644
--- a/internal/test/builder/infrastructure.go
+++ b/internal/test/builder/infrastructure.go
@@ -47,11 +47,6 @@ var (
 
 	// TODO: drop generic CRDs in favour of typed test CRDs.
 
-	// TestInfrastructureClusterTemplateKind is the kind for the TestInfrastructureClusterTemplate type.
-	TestInfrastructureClusterTemplateKind = "TestInfrastructureClusterTemplate"
-	// TestInfrastructureClusterTemplateCRD is a test infrastructure machine template CRD.
-	TestInfrastructureClusterTemplateCRD = testInfrastructureClusterTemplateCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureClusterTemplateKind))
-
 	// TestInfrastructureClusterKind is the kind for the TestInfrastructureCluster type.
 	TestInfrastructureClusterKind = "TestInfrastructureCluster"
 	// TestInfrastructureClusterCRD is a test infrastructure machine CRD.
@@ -68,36 +63,43 @@ var (
 	TestInfrastructureMachineCRD = testInfrastructureMachineCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureMachineKind))
 )
 
-func testInfrastructureClusterTemplateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
+func testInfrastructureClusterCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
 				// Mandatory field from the Cluster API contract
-				"template": {
+				"controlPlaneEndpoint": {
+					Type: "object",
+					Properties: map[string]apiextensionsv1.JSONSchemaProps{
+						"host": {Type: "string"},
+						"port": {Type: "integer"},
+					},
+					Required: []string{"host", "port"},
+				},
+				// General purpose fields to be used in different test scenario.
+				"foo": {Type: "string"},
+				"bar": {Type: "string"},
+				"fooMap": {
 					Type: "object",
 					Properties: map[string]apiextensionsv1.JSONSchemaProps{
-						"spec": clusterSpecSchema,
+						"foo": {Type: "string"},
+					},
+				},
+				"fooList": {
+					Type: "array",
+					Items: &apiextensionsv1.JSONSchemaPropsOrArray{
+						Schema: &apiextensionsv1.JSONSchemaProps{
+							Type: "object",
+							Properties: map[string]apiextensionsv1.JSONSchemaProps{
+								"foo": {Type: "string"},
+							},
+						},
 					},
 				},
+				// Field for testing
 			},
 		},
-	})
-}
-
-func testInfrastructureClusterCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
-	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
-		"spec": clusterSpecSchema,
 		"status": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
@@ -114,11 +116,6 @@ func testInfrastructureClusterCRD(gvk schema.GroupVersionKind) *apiextensionsv1.
 
 func testInfrastructureMachineTemplateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": {
 			Type: "object",
 			Properties: map[string]apiextensionsv1.JSONSchemaProps{
@@ -137,11 +134,6 @@ func testInfrastructureMachineTemplateCRD(gvk schema.GroupVersionKind) *apiexten
 
 func testInfrastructureMachineCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition {
 	return generateCRD(gvk, map[string]apiextensionsv1.JSONSchemaProps{
-		"metadata": {
-			// NOTE: in CRD there is only a partial definition of metadata schema.
-			// Ref https://github.com/kubernetes-sigs/controller-tools/blob/59485af1c1f6a664655dad49543c474bb4a0d2a2/pkg/crd/gen.go#L185
-			Type: "object",
-		},
 		"spec": machineSpecSchema,
 		"status": {
 			Type: "object",
@@ -157,42 +149,6 @@ func testInfrastructureMachineCRD(gvk schema.GroupVersionKind) *apiextensionsv1.
 }
 
 var (
-	clusterSpecSchema = apiextensionsv1.JSONSchemaProps{
-		Type: "object",
-		Properties: map[string]apiextensionsv1.JSONSchemaProps{
-			// Mandatory field from the Cluster API contract
-			"controlPlaneEndpoint": {
-				Type: "object",
-				Properties: map[string]apiextensionsv1.JSONSchemaProps{
-					"host": {Type: "string"},
-					"port": {Type: "integer"},
-				},
-				Required: []string{"host", "port"},
-			},
-			// General purpose fields to be used in different test scenario.
-			"foo": {Type: "string"},
-			"bar": {Type: "string"},
-			"fooMap": {
-				Type: "object",
-				Properties: map[string]apiextensionsv1.JSONSchemaProps{
-					"foo": {Type: "string"},
-				},
-			},
-			"fooList": {
-				Type: "array",
-				Items: &apiextensionsv1.JSONSchemaPropsOrArray{
-					Schema: &apiextensionsv1.JSONSchemaProps{
-						Type: "object",
-						Properties: map[string]apiextensionsv1.JSONSchemaProps{
-							"foo": {Type: "string"},
-						},
-					},
-				},
-			},
-			// Field for testing
-		},
-	}
-
 	machineSpecSchema = apiextensionsv1.JSONSchemaProps{
 		Type: "object",
 		Properties: map[string]apiextensionsv1.JSONSchemaProps{
diff --git a/internal/test/envtest/environment.go b/internal/test/envtest/environment.go
index 42f9ade73..c2bd921b8 100644
--- a/internal/test/envtest/environment.go
+++ b/internal/test/envtest/environment.go
@@ -188,13 +188,11 @@ func newEnvironment(uncachedObjs ...client.Object) *Environment {
 			builder.GenericInfrastructureClusterTemplateCRD.DeepCopy(),
 			builder.GenericRemediationCRD.DeepCopy(),
 			builder.GenericRemediationTemplateCRD.DeepCopy(),
-			builder.TestInfrastructureClusterTemplateCRD.DeepCopy(),
 			builder.TestInfrastructureClusterCRD.DeepCopy(),
 			builder.TestInfrastructureMachineTemplateCRD.DeepCopy(),
 			builder.TestInfrastructureMachineCRD.DeepCopy(),
 			builder.TestBootstrapConfigTemplateCRD.DeepCopy(),
 			builder.TestBootstrapConfigCRD.DeepCopy(),
-			builder.TestControlPlaneTemplateCRD.DeepCopy(),
 			builder.TestControlPlaneCRD.DeepCopy(),
 		},
 		// initialize webhook here to be able to test the envtest install via webhookOptions
diff --git a/test/e2e/cluster_upgrade_runtimesdk.go b/test/e2e/cluster_upgrade_runtimesdk.go
index 4f7e7a3dc..3444644e0 100644
--- a/test/e2e/cluster_upgrade_runtimesdk.go
+++ b/test/e2e/cluster_upgrade_runtimesdk.go
@@ -26,11 +26,9 @@ import (
 
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
-	"github.com/pkg/errors"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/utils/pointer"
-	"sigs.k8s.io/controller-runtime/pkg/client"
 
 	runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1"
 	"sigs.k8s.io/cluster-api/test/framework"
@@ -119,26 +117,22 @@ func clusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() cl
 	})
 
 	It("Should create and upgrade a workload cluster", func() {
-		clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
 		By("Deploy Test Extension")
 		testExtensionDeploymentTemplate, err := os.ReadFile(testExtensionPath) //nolint:gosec
-		Expect(err).ToNot(HaveOccurred(), "Failed to read the extension deployment manifest file")
+		Expect(err).ToNot(HaveOccurred(), "Failed to read the extension config deployment manifest file")
 
 		// Set the SERVICE_NAMESPACE, which is used in the cert-manager Certificate CR.
 		// We have to dynamically set the namespace here, because it depends on the test run and thus
 		// cannot be set when rendering the test extension YAML with kustomize.
 		testExtensionDeployment := strings.ReplaceAll(string(testExtensionDeploymentTemplate), "${SERVICE_NAMESPACE}", namespace.Name)
-
 		Expect(testExtensionDeployment).ToNot(BeEmpty(), "Test Extension deployment manifest file should not be empty")
+
 		Expect(input.BootstrapClusterProxy.Apply(ctx, []byte(testExtensionDeployment), "--namespace", namespace.Name)).To(Succeed())
 
-		By("Deploy Test Extension ExtensionConfig and ConfigMap")
+		By("Deploy Test Extension ExtensionConfig")
 		ext = extensionConfig(specName, namespace)
 		err = input.BootstrapClusterProxy.GetClient().Create(ctx, ext)
 		Expect(err).ToNot(HaveOccurred(), "Failed to create the extension config")
-		responses := responsesConfigMap(clusterName, namespace)
-		err = input.BootstrapClusterProxy.GetClient().Create(ctx, responses)
-		Expect(err).ToNot(HaveOccurred(), "Failed to create the responses configmap")
 
 		By("Creating a workload cluster")
 
@@ -151,7 +145,7 @@ func clusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() cl
 				InfrastructureProvider:   clusterctl.DefaultInfrastructureProvider,
 				Flavor:                   pointer.StringDeref(input.Flavor, "upgrades"),
 				Namespace:                namespace.Name,
-				ClusterName:              clusterName,
+				ClusterName:              fmt.Sprintf("%s-%s", specName, util.RandomString(6)),
 				KubernetesVersion:        input.E2EConfig.GetVariable(KubernetesVersionUpgradeFrom),
 				ControlPlaneMachineCount: pointer.Int64Ptr(controlPlaneMachineCount),
 				WorkerMachineCount:       pointer.Int64Ptr(workerMachineCount),
@@ -200,17 +194,6 @@ func clusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() cl
 			WaitForNodesReady: input.E2EConfig.GetIntervals(specName, "wait-nodes-ready"),
 		})
 
-		By("Checking all lifecycle hooks have been called")
-		// Assert that each hook passed to this function is marked as "true" in the response configmap
-		err = checkLifecycleHooks(ctx, input.BootstrapClusterProxy.GetClient(), namespace.Name, clusterName, map[string]string{
-			"BeforeClusterCreate":          "",
-			"BeforeClusterUpgrade":         "",
-			"AfterControlPlaneInitialized": "",
-			"AfterControlPlaneUpgrade":     "",
-			"AfterClusterUpgrade":          "",
-		})
-		Expect(err).ToNot(HaveOccurred(), "Lifecycle hook calls were not as expected")
-
 		By("PASSED!")
 	})
 
@@ -258,34 +241,3 @@ func extensionConfig(specName string, namespace *corev1.Namespace) *runtimev1.Ex
 		},
 	}
 }
-
-// responsesConfigMap generates a ConfigMap with preloaded responses for the test extension.
-func responsesConfigMap(name string, namespace *corev1.Namespace) *corev1.ConfigMap {
-	return &corev1.ConfigMap{
-		ObjectMeta: metav1.ObjectMeta{
-			Name:      fmt.Sprintf("%s-hookresponses", name),
-			Namespace: namespace.Name,
-		},
-		// Every response contain only Status:Success. The test checks whether each handler has been called at least once.
-		Data: map[string]string{
-			"BeforeClusterCreate-response":          `{"Status": "Success"}`,
-			"BeforeClusterUpgrade-response":         `{"Status": "Success"}`,
-			"AfterControlPlaneInitialized-response": `{"Status": "Success"}`,
-			"AfterControlPlaneUpgrade-response":     `{"Status": "Success"}`,
-			"AfterClusterUpgrade-response":          `{"Status": "Success"}`,
-		},
-	}
-}
-
-func checkLifecycleHooks(ctx context.Context, c client.Client, namespace string, clusterName string, hooks map[string]string) error {
-	configMap := &corev1.ConfigMap{}
-	configMapName := clusterName + "-hookresponses"
-	err := c.Get(ctx, client.ObjectKey{Namespace: namespace, Name: configMapName}, configMap)
-	Expect(err).ToNot(HaveOccurred(), "Failed to get the hook response configmap")
-	for hook := range hooks {
-		if _, ok := configMap.Data[hook+"-called"]; !ok {
-			return errors.Errorf("hook %s call not recorded in configMap %s/%s", hook, namespace, configMapName)
-		}
-	}
-	return nil
-}
diff --git a/test/extension/config/default/extension.yaml b/test/extension/config/default/extension.yaml
index 512891a50..9601638bb 100644
--- a/test/extension/config/default/extension.yaml
+++ b/test/extension/config/default/extension.yaml
@@ -19,7 +19,6 @@ spec:
         image: controller:latest
         name: extension
       terminationGracePeriodSeconds: 10
-      serviceAccountName: test-extension
       tolerations:
         - effect: NoSchedule
           key: node-role.kubernetes.io/master
diff --git a/test/extension/config/default/kustomization.yaml b/test/extension/config/default/kustomization.yaml
index 65fc423bf..9f3c7b4d1 100644
--- a/test/extension/config/default/kustomization.yaml
+++ b/test/extension/config/default/kustomization.yaml
@@ -3,9 +3,6 @@ commonLabels:
 resources:
 - extension.yaml
 - service.yaml
-- role.yaml
-- rolebinding.yaml
-- service_account.yaml
 
 bases:
 - ../certmanager
diff --git a/test/extension/config/default/role.yaml b/test/extension/config/default/role.yaml
deleted file mode 100644
index 231b12d3e..000000000
--- a/test/extension/config/default/role.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: test-extension
-rules:
-  - apiGroups:
-      - ""
-    resources:
-      - configmaps
-    verbs:
-      - get
-      - list
-      - watch
-      - patch
-      - update
-      - create
diff --git a/test/extension/config/default/rolebinding.yaml b/test/extension/config/default/rolebinding.yaml
deleted file mode 100644
index ef898ab43..000000000
--- a/test/extension/config/default/rolebinding.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: test-extension
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: test-extension
-subjects:
-  - kind: ServiceAccount
-    name: test-extension
-    namespace: ${SERVICE_NAMESPACE}
\ No newline at end of file
diff --git a/test/extension/config/default/service_account.yaml b/test/extension/config/default/service_account.yaml
deleted file mode 100644
index 88e2aaa77..000000000
--- a/test/extension/config/default/service_account.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: test-extension
diff --git a/test/extension/handlers/lifecycle/handlers.go b/test/extension/handlers/lifecycle/handlers.go
deleted file mode 100644
index cc7409d11..000000000
--- a/test/extension/handlers/lifecycle/handlers.go
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package lifecycle contains the handlers for the lifecycle hooks.
-package lifecycle
-
-import (
-	"context"
-	"fmt"
-
-	"github.com/pkg/errors"
-	corev1 "k8s.io/api/core/v1"
-	"k8s.io/apimachinery/pkg/types"
-	ctrl "sigs.k8s.io/controller-runtime"
-	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/yaml"
-
-	runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
-	runtimecatalog "sigs.k8s.io/cluster-api/internal/runtime/catalog"
-)
-
-// Handler is the handler for the lifecycle hooks.
-type Handler struct {
-	Client client.Client
-}
-
-// DoBeforeClusterCreate implements the BeforeClusterCreate hook.
-func (h *Handler) DoBeforeClusterCreate(ctx context.Context, request *runtimehooksv1.BeforeClusterCreateRequest, response *runtimehooksv1.BeforeClusterCreateResponse) {
-	log := ctrl.LoggerFrom(ctx)
-	log.Info("BeforeClusterCreate is called")
-	cluster := request.Cluster
-	if err := h.recordCallInConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.BeforeClusterCreate); err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-	log.Info("BeforeClusterCreate has been recorded in configmap", "cm", cluster.Name+"-hookresponses")
-
-	err := h.readResponseFromConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.BeforeClusterCreate, response)
-	if err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-}
-
-// DoBeforeClusterUpgrade implements the BeforeClusterUpgrade hook.
-func (h *Handler) DoBeforeClusterUpgrade(ctx context.Context, request *runtimehooksv1.BeforeClusterUpgradeRequest, response *runtimehooksv1.BeforeClusterUpgradeResponse) {
-	log := ctrl.LoggerFrom(ctx)
-	log.Info("BeforeClusterUpgrade is called")
-	cluster := request.Cluster
-	if err := h.recordCallInConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.BeforeClusterUpgrade); err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-	err := h.readResponseFromConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.BeforeClusterUpgrade, response)
-	if err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-}
-
-// DoAfterControlPlaneInitialized implements the AfterControlPlaneInitialized hook.
-func (h *Handler) DoAfterControlPlaneInitialized(ctx context.Context, request *runtimehooksv1.AfterControlPlaneInitializedRequest, response *runtimehooksv1.AfterControlPlaneInitializedResponse) {
-	log := ctrl.LoggerFrom(ctx)
-	log.Info("AfterControlPlaneInitialized is called")
-	cluster := request.Cluster
-	if err := h.recordCallInConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterControlPlaneInitialized); err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-	err := h.readResponseFromConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterControlPlaneInitialized, response)
-	if err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-}
-
-// DoAfterControlPlaneUpgrade implements the AfterControlPlaneUpgrade hook.
-func (h *Handler) DoAfterControlPlaneUpgrade(ctx context.Context, request *runtimehooksv1.AfterControlPlaneUpgradeRequest, response *runtimehooksv1.AfterControlPlaneUpgradeResponse) {
-	log := ctrl.LoggerFrom(ctx)
-	log.Info("AfterControlPlaneUpgrade is called")
-	cluster := request.Cluster
-	if err := h.recordCallInConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterControlPlaneUpgrade); err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-	err := h.readResponseFromConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterControlPlaneUpgrade, response)
-	if err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-}
-
-// DoAfterClusterUpgrade implements the AfterClusterUpgrade hook.
-func (h *Handler) DoAfterClusterUpgrade(ctx context.Context, request *runtimehooksv1.AfterClusterUpgradeRequest, response *runtimehooksv1.AfterClusterUpgradeResponse) {
-	log := ctrl.LoggerFrom(ctx)
-	log.Info("AfterClusterUpgrade is called")
-	cluster := request.Cluster
-	if err := h.recordCallInConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterClusterUpgrade); err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-	err := h.readResponseFromConfigMap(ctx, cluster.Name, cluster.Namespace, runtimehooksv1.AfterClusterUpgrade, response)
-	if err != nil {
-		response.Status = runtimehooksv1.ResponseStatusFailure
-		response.Message = err.Error()
-		return
-	}
-}
-
-func (h *Handler) readResponseFromConfigMap(ctx context.Context, name, namespace string, hook runtimecatalog.Hook, response runtimehooksv1.ResponseObject) error {
-	hookName := runtimecatalog.HookName(hook)
-	configMap := &corev1.ConfigMap{}
-	configMapName := name + "-hookresponses"
-	if err := h.Client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: configMapName}, configMap); err != nil {
-		return errors.Wrapf(err, "failed to read the ConfigMap %s/%s", namespace, configMapName)
-	}
-	if err := yaml.Unmarshal([]byte(configMap.Data[hookName+"-response"]), response); err != nil {
-		return errors.Wrapf(err, "failed to read %q response information from ConfigMap", hook)
-	}
-	return nil
-}
-
-func (h *Handler) recordCallInConfigMap(ctx context.Context, name, namespace string, hook runtimecatalog.Hook) error {
-	hookName := runtimecatalog.HookName(hook)
-	configMap := &corev1.ConfigMap{}
-	configMapName := name + "-hookresponses"
-	if err := h.Client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: configMapName}, configMap); err != nil {
-		return errors.Wrapf(err, "failed to read the ConfigMap %s/%s", namespace, configMapName)
-	}
-
-	patch := client.RawPatch(types.MergePatchType,
-		[]byte(fmt.Sprintf(`{"data":{"%s-called":"true"}}`, hookName)))
-	if err := h.Client.Patch(ctx, configMap, patch); err != nil {
-		return errors.Wrapf(err, "failed to update the ConfigMap %s/%s", namespace, configMapName)
-	}
-	return nil
-}
diff --git a/test/extension/main.go b/test/extension/main.go
index e5a00fa20..3aa9571d8 100644
--- a/test/extension/main.go
+++ b/test/extension/main.go
@@ -28,11 +28,9 @@ import (
 	"k8s.io/klog/v2"
 	"k8s.io/utils/pointer"
 	ctrl "sigs.k8s.io/controller-runtime"
-	"sigs.k8s.io/controller-runtime/pkg/client"
 
 	runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
 	runtimecatalog "sigs.k8s.io/cluster-api/internal/runtime/catalog"
-	"sigs.k8s.io/cluster-api/test/extension/handlers/lifecycle"
 	"sigs.k8s.io/cluster-api/test/extension/handlers/topologymutation"
 	"sigs.k8s.io/cluster-api/test/extension/server"
 	infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1"
@@ -131,72 +129,6 @@ func main() {
 		os.Exit(1)
 	}
 
-	restConfig, err := ctrl.GetConfig()
-	if err != nil {
-		setupLog.Error(err, "error getting config for the cluster")
-		os.Exit(1)
-	}
-
-	c, err := client.New(restConfig, client.Options{})
-	if err != nil {
-		setupLog.Error(err, "error creating client to the cluster")
-		os.Exit(1)
-	}
-	lifecycleHandler := lifecycle.Handler{Client: c}
-
-	// Lifecycle Hooks
-	if err := webhookServer.AddExtensionHandler(server.ExtensionHandler{
-		Hook:           runtimehooksv1.BeforeClusterCreate,
-		Name:           "before-cluster-create",
-		HandlerFunc:    lifecycleHandler.DoBeforeClusterCreate,
-		TimeoutSeconds: pointer.Int32(5),
-		FailurePolicy:  toPtr(runtimehooksv1.FailurePolicyFail),
-	}); err != nil {
-		setupLog.Error(err, "error adding handler")
-		os.Exit(1)
-	}
-	if err := webhookServer.AddExtensionHandler(server.ExtensionHandler{
-		Hook:           runtimehooksv1.AfterControlPlaneInitialized,
-		Name:           "after-control-plane-initialized",
-		HandlerFunc:    lifecycleHandler.DoAfterControlPlaneInitialized,
-		TimeoutSeconds: pointer.Int32(5),
-		FailurePolicy:  toPtr(runtimehooksv1.FailurePolicyFail),
-	}); err != nil {
-		setupLog.Error(err, "error adding handler")
-		os.Exit(1)
-	}
-	if err := webhookServer.AddExtensionHandler(server.ExtensionHandler{
-		Hook:           runtimehooksv1.BeforeClusterUpgrade,
-		Name:           "before-cluster-upgrade",
-		HandlerFunc:    lifecycleHandler.DoBeforeClusterUpgrade,
-		TimeoutSeconds: pointer.Int32(5),
-		FailurePolicy:  toPtr(runtimehooksv1.FailurePolicyFail),
-	}); err != nil {
-		setupLog.Error(err, "error adding handler")
-		os.Exit(1)
-	}
-
-	if err := webhookServer.AddExtensionHandler(server.ExtensionHandler{
-		Hook:           runtimehooksv1.AfterControlPlaneUpgrade,
-		Name:           "after-control-plane-upgrade",
-		HandlerFunc:    lifecycleHandler.DoAfterControlPlaneUpgrade,
-		TimeoutSeconds: pointer.Int32(5),
-		FailurePolicy:  toPtr(runtimehooksv1.FailurePolicyFail),
-	}); err != nil {
-		setupLog.Error(err, "error adding handler")
-		os.Exit(1)
-	}
-	if err := webhookServer.AddExtensionHandler(server.ExtensionHandler{
-		Hook:           runtimehooksv1.AfterClusterUpgrade,
-		Name:           "after-cluster-upgrade",
-		HandlerFunc:    lifecycleHandler.DoAfterClusterUpgrade,
-		TimeoutSeconds: pointer.Int32(5),
-		FailurePolicy:  toPtr(runtimehooksv1.FailurePolicyFail),
-	}); err != nil {
-		setupLog.Error(err, "error adding handler")
-		os.Exit(1)
-	}
-
 	setupLog.Info("starting RuntimeExtension", "version", version.Get().String())
 	if err := webhookServer.Start(ctx); err != nil {
 		setupLog.Error(err, "error running webhook server")
diff --git a/test/go.mod b/test/go.mod
index aa6c1ce3e..6ecb2008d 100644
--- a/test/go.mod
+++ b/test/go.mod
@@ -67,8 +67,8 @@ require (
 	github.com/google/cel-go v0.10.1 // indirect
 	github.com/google/gnostic v0.5.7-v3refs // indirect
 	github.com/google/go-cmp v0.5.8 // indirect
-	github.com/google/go-github/v45 v45.2.0 // indirect
-	github.com/google/go-querystring v1.1.0 // indirect
+	github.com/google/go-github/v33 v33.0.0 // indirect
+	github.com/google/go-querystring v1.0.0 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/uuid v1.2.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
diff --git a/test/go.sum b/test/go.sum
index 7ed511558..6feabf902 100644
--- a/test/go.sum
+++ b/test/go.sum
@@ -331,10 +331,10 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
 github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI=
-github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
-github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
-github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
+github.com/google/go-github/v33 v33.0.0 h1:qAf9yP0qc54ufQxzwv+u9H0tiVOnPJxo0lI/JXqw3ZM=
+github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg=
+github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
+github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
@@ -773,7 +773,6 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=