This paper proposes a novel predefined-time secondary control framework for an islanded DC microgrid to achieve the current sharing and voltage regulation within a tunable settling time. An integrated error, namely, a positive linear combination of current sharing error and DC bus voltage error is constructed and then used in the design of finite/fixed-time feedback loop. Using the integrated error, instead of the current error and the voltage error separately, a unified finite/fixed-time controller structure is proposed to save the computation resource. In addition, the framework enables us to provide rigorous theoretical analysis of the resulting system, which shows the upper bound of convergence time is dependent on both control and system parameters of DC microgrid and therefore is tunable by adjusting control parameters. Finally, simulation tests are carried out to demonstrate the effectiveness of the methods.