feat: enhance database and storage management with Longhorn support
This commit is contained in:
+4
-3
@@ -5,7 +5,7 @@ import {
|
||||
DATABASE_PORT,
|
||||
buildDatabaseUrl,
|
||||
getComposePostgresClaims,
|
||||
getRoleCredentials,
|
||||
reconcilePostgresClaim,
|
||||
} from "../lib/database";
|
||||
import { toTable } from "../lib/format";
|
||||
|
||||
@@ -43,7 +43,8 @@ const creds = defineCommand({
|
||||
const service = args._[0];
|
||||
if (!service) throw new Error("Service name is required");
|
||||
|
||||
const claim = getComposePostgresClaims(await ctx().compose()).find(
|
||||
const context = ctx();
|
||||
const claim = getComposePostgresClaims(await context.compose()).find(
|
||||
(entry) => entry.service === service,
|
||||
);
|
||||
if (!claim) {
|
||||
@@ -52,7 +53,7 @@ const creds = defineCommand({
|
||||
);
|
||||
}
|
||||
|
||||
const credentials = await getRoleCredentials(claim.username);
|
||||
const credentials = await reconcilePostgresClaim(context.project, claim);
|
||||
const url = buildDatabaseUrl(claim, credentials);
|
||||
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user