diff --git a/pkg/reconciliation/construct_statefulset.go b/pkg/reconciliation/construct_statefulset.go index a8ed4fbc..7a53516b 100644 --- a/pkg/reconciliation/construct_statefulset.go +++ b/pkg/reconciliation/construct_statefulset.go @@ -22,7 +22,7 @@ import ( const zoneLabel = "failure-domain.beta.kubernetes.io/zone" -func newNamespacedNameForStatefulSet( +func NewNamespacedNameForStatefulSet( dc *api.CassandraDatacenter, rackName string) types.NamespacedName { @@ -115,7 +115,7 @@ func newStatefulSetForCassandraDatacenter( } } - nsName := newNamespacedNameForStatefulSet(dc, rackName) + nsName := NewNamespacedNameForStatefulSet(dc, rackName) template, err := buildPodTemplateSpec(dc, rack, legacyInternodeMount(dc, sts)) if err != nil { diff --git a/pkg/reconciliation/construct_statefulset_test.go b/pkg/reconciliation/construct_statefulset_test.go index fd1ccf8a..0408bc71 100644 --- a/pkg/reconciliation/construct_statefulset_test.go +++ b/pkg/reconciliation/construct_statefulset_test.go @@ -607,7 +607,7 @@ func TestValidSubdomainNames(t *testing.T) { }, } for _, tt := range tests { - typedName := newNamespacedNameForStatefulSet(dc, tt.name) + typedName := NewNamespacedNameForStatefulSet(dc, tt.name) assert.Equal(tt.expected, typedName.Name) } } diff --git a/pkg/reconciliation/reconcile_racks.go b/pkg/reconciliation/reconcile_racks.go index 3cf1ab78..963be49f 100644 --- a/pkg/reconciliation/reconcile_racks.go +++ b/pkg/reconciliation/reconcile_racks.go @@ -1502,7 +1502,7 @@ func (rc *ReconciliationContext) GetStatefulSetForRack( currentStatefulSet := &appsv1.StatefulSet{} err := rc.Client.Get( rc.Ctx, - newNamespacedNameForStatefulSet(rc.Datacenter, nextRack.RackName), + NewNamespacedNameForStatefulSet(rc.Datacenter, nextRack.RackName), currentStatefulSet) if err == nil { diff --git a/pkg/reconciliation/reconcile_racks_test.go b/pkg/reconciliation/reconcile_racks_test.go index abf6ba77..bf062e87 100644 --- a/pkg/reconciliation/reconcile_racks_test.go +++ b/pkg/reconciliation/reconcile_racks_test.go @@ -2740,7 +2740,7 @@ func TestCheckRackPodTemplateWithVolumeExpansion(t *testing.T) { // Get the current StS sts := &appsv1.StatefulSet{} - nsName := newNamespacedNameForStatefulSet(rc.Datacenter, "default") + nsName := NewNamespacedNameForStatefulSet(rc.Datacenter, "default") require.NoError(rc.Client.Get(rc.Ctx, nsName, sts)) require.Equal(resource.MustParse("1Gi"), sts.Spec.VolumeClaimTemplates[0].Spec.Resources.Requests[corev1.ResourceStorage])