Skip to content

Commit

Permalink
Change visibility of newNamespacedNameForStatefulSet (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm authored Nov 26, 2024
1 parent e580f21 commit 702a150
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/reconciliation/construct_statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

const zoneLabel = "failure-domain.beta.kubernetes.io/zone"

func newNamespacedNameForStatefulSet(
func NewNamespacedNameForStatefulSet(
dc *api.CassandraDatacenter,
rackName string) types.NamespacedName {

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciliation/construct_statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciliation/reconcile_racks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciliation/reconcile_racks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 702a150

Please sign in to comment.