Skip to content

Commit

Permalink
name/label update
Browse files Browse the repository at this point in the history
  • Loading branch information
vimystic committed Nov 20, 2024
1 parent 8be6661 commit dc23a15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/fullnode/pvc_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ func BuildPVCs(
}

var pvcs []diff.Resource[*corev1.PersistentVolumeClaim]
for i := crd.Spec.Ordinal.Start; i < crd.Spec.Ordinal.Start+crd.Spec.Replicas; i++ {
for i := int32(0); i < crd.Spec.Replicas; i++ {
if pvcDisabled(crd, i) {
continue
}

pvc := base.DeepCopy()
name := pvcName(crd, i)
name := pvcName(crd, i+crd.Spec.Ordinal.Start)
pvc.Name = name
pvc.Labels[kube.InstanceLabel] = instanceName(crd, i)
pvc.Labels[kube.InstanceLabel] = instanceName(crd, i+crd.Spec.Ordinal.Start)

var dataSource *corev1.TypedLocalObjectReference
var existingSize resource.Quantity
Expand Down
2 changes: 1 addition & 1 deletion internal/fullnode/pvc_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (control PVCControl) Reconcile(ctx context.Context, reporter kube.Reporter,

dataSources := make(map[int32]*dataSource)
if len(currentPVCs) < int(crd.Spec.Replicas) {
for i := crd.Spec.Ordinal.Start; i < crd.Spec.Ordinal.Start+crd.Spec.Replicas; i++ {
for i := int32(0); i < crd.Spec.Replicas; i++ {
name := pvcName(crd, i)
found := false
for _, pvc := range currentPVCs {
Expand Down

0 comments on commit dc23a15

Please sign in to comment.