From 9efb8dd5929e0c2036b24e7ab21596d53472265e Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Thu, 23 Jan 2025 18:14:10 +0100 Subject: [PATCH] Deprecate old ClusterClass index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- api/v1beta1/index/cluster.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/v1beta1/index/cluster.go b/api/v1beta1/index/cluster.go index b48595e7d3cc..417abbcb9153 100644 --- a/api/v1beta1/index/cluster.go +++ b/api/v1beta1/index/cluster.go @@ -29,6 +29,8 @@ import ( const ( // ClusterClassNameField is used by the Cluster controller to index Clusters by ClusterClass name. + // + // Deprecated: This constant will be removed in an upcoming release, please use ClusterClassRefPath instead. ClusterClassNameField = "spec.topology.class" // ClusterClassRefPath is used by the Cluster controller to index Clusters by ClusterClass name and namespace. @@ -70,6 +72,8 @@ func ClusterClassRef(cc *clusterv1.ClusterClass) string { // ByClusterClassName adds the cluster class name index to the // managers cache. +// +// Deprecated: This func will be removed in an upcoming release, please use ByClusterClassRef instead. func ByClusterClassName(ctx context.Context, mgr ctrl.Manager) error { if err := mgr.GetCache().IndexField(ctx, &clusterv1.Cluster{}, ClusterClassNameField, @@ -81,6 +85,8 @@ func ByClusterClassName(ctx context.Context, mgr ctrl.Manager) error { } // ClusterByClusterClassClassName contains the logic to index Clusters by ClusterClass name. +// +// Deprecated: This func will be removed in an upcoming release, please use ClusterByClusterClassRef instead. func ClusterByClusterClassClassName(o client.Object) []string { cluster, ok := o.(*clusterv1.Cluster) if !ok {