From 46d3a31c9f8d47905e6981728d7d4453f838a1ba Mon Sep 17 00:00:00 2001 From: Alexander Dejanovski Date: Wed, 22 May 2024 16:01:17 +0200 Subject: [PATCH] Address review comments --- apis/k8ssandra/v1alpha1/k8ssandracluster_types.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apis/k8ssandra/v1alpha1/k8ssandracluster_types.go b/apis/k8ssandra/v1alpha1/k8ssandracluster_types.go index 31911c416..7478ae2bb 100644 --- a/apis/k8ssandra/v1alpha1/k8ssandracluster_types.go +++ b/apis/k8ssandra/v1alpha1/k8ssandracluster_types.go @@ -319,6 +319,7 @@ type DatacenterOptions struct { // - Cassandra: 3.11.X, 4.X.X and 5.X.X // - DSE: 6.8.X, 7.x.x // - HCD: 1.0.x + // +kubebuilder:validation:Pattern=(\d+\.\d+\.\d+)|(\d+\.\d+\.\d+-.*) ServerVersion string `json:"serverVersion,omitempty"` // ServerImage is the image for the cassandra container. Note that this should be a @@ -545,9 +546,6 @@ func (kc *K8ssandraCluster) DefaultNumTokens(serverVersion *semver.Version) floa if kc.Spec.Cassandra.ServerType.IsCassandra() && serverVersion.Major() == 3 { return float64(256) } - if kc.Spec.Cassandra.ServerType.IsCassandra() { - return float64(8) - } return float64(16) }