Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Deprecate old ClusterClass index #11744

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/v1beta1/index/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
Loading