Skip to content

Add support for CAPI >= 1.11 (v1beta2) - #347

Merged
jschoone merged 3 commits into
migration/capi-v1.11from
pr-346-review
Oct 22, 2026
Merged

jschoone merged 3 commits into
migration/capi-v1.11from
pr-346-review

Conversation

@jschoone

Copy link
Copy Markdown
Contributor

No description provided.

…he owning object

external.Get in CAPI >= 1.11 uses the namespace of the reference instead of an
explicit namespace argument. A ClusterStack with a providerRef without
namespace (as documented) could therefore not find its template anymore.

Always resolve the template in the namespace of the ClusterStack, like before,
default the namespace of the Cluster references used for the addon builtins and
add a test for a providerRef without namespace.

Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
…p in the workload cluster

cleanUpResources talks to the workload cluster, where resources without a
namespace belong to the addon namespace (kube-system). The namespace of the
ClusterAddon object in the management cluster is not meaningful there.

Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
…terClasses are in use

Clusters of any namespace can use the ClusterClasses of a namespace since CAPI
1.11. The in-use checks of the ClusterStack and ClusterStackRelease webhooks and
controllers only looked at the clusters of the own namespace, so a
ClusterStackRelease could be deleted while a cluster in another namespace still
used its ClusterClass, and clusters of the own namespace using a ClusterClass of
another namespace were wrongly counted.

Add pkg/clusterclass with a helper listing the clusters that use the
ClusterClasses of a namespace and a test for getUsedClusterClasses.

Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
@jschoone
jschoone merged commit d847fc1 into migration/capi-v1.11 Oct 22, 2026
1 of 2 checks passed
@jschoone
jschoone deleted the pr-346-review branch October 22, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant