Skip to content

Commit 1708bfd

Browse files
authored
Update PVC name in the spec with the once created by the operator (#154)
Signed-off-by: Shiva Krishna, Merla <[email protected]>
1 parent e648ba1 commit 1708bfd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/controller/platform/standalone/nimservice.go

+6
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,12 @@ func (r *NIMServiceReconciler) reconcilePVC(ctx context.Context, nimService *app
467467
return nil, err
468468
}
469469
}
470+
471+
// If explicit name is not provided in the spec, update it with the one created
472+
if nimService.Spec.Storage.PVC.Name == "" {
473+
nimService.Spec.Storage.PVC.Name = pvc.Name
474+
}
475+
470476
return &nimService.Spec.Storage.PVC, nil
471477
}
472478

0 commit comments

Comments
 (0)