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

Change visibility of newNamespacedNameForStatefulSet #736

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
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
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
Loading