diff --git a/extensions/arc/src/localizedConstants.ts b/extensions/arc/src/localizedConstants.ts index d856b9d10e..ad7ba25ee8 100644 --- a/extensions/arc/src/localizedConstants.ts +++ b/extensions/arc/src/localizedConstants.ts @@ -192,6 +192,9 @@ export function instanceDeleted(name: string): string { return localize('arc.ins export function instanceUpdated(name: string): string { return localize('arc.instanceUpdated', "Instance '{0}' updated", name); } export function copiedToClipboard(name: string): string { return localize('arc.copiedToClipboard', "{0} copied to clipboard", name); } export function clickTheTroubleshootButton(resourceType: string): string { return localize('arc.clickTheTroubleshootButton', "Click the troubleshoot button to open the Azure Arc {0} troubleshooting notebook.", resourceType); } +export function dataStorage(value: string): string { return localize('arc.dataStorage', "{0} data", value); } +export function logStorage(value: string): string { return localize('arc.logStorage', "{0} log", value); } +export function backupsStorage(value: string): string { return localize('arc.backupsStorage', "{0} backups", value); } export function numVCores(vCores: string | undefined): string { if (vCores && +vCores > 0) { if (+vCores === 1) { diff --git a/extensions/arc/src/models/postgresModel.ts b/extensions/arc/src/models/postgresModel.ts index e79e4a9ea7..8c6973dd11 100644 --- a/extensions/arc/src/models/postgresModel.ts +++ b/extensions/arc/src/models/postgresModel.ts @@ -76,7 +76,9 @@ export class PostgresModel extends ResourceModel { const ramLimit = this._config.spec.scheduling?.default?.resources?.limits?.memory; const cpuRequest = this._config.spec.scheduling?.default?.resources?.requests?.cpu; const ramRequest = this._config.spec.scheduling?.default?.resources?.requests?.memory; - const storage = this._config.spec.storage?.data?.size; + const dataStorage = this._config.spec.storage?.data?.size; + const logStorage = this._config.spec.storage?.logs?.size; + const backupsStorage = this._config.spec.storage?.backups?.size; // scale.shards was renamed to scale.workers. Check both for backwards compatibility. const scale = this._config.spec.scale; @@ -94,8 +96,19 @@ export class PostgresModel extends ResourceModel { configuration.push(`${ramLimit ?? ramRequest!} ${loc.ram}`); } - if (storage) { - configuration.push(`${storage} ${loc.storagePerNode}`); + let storage: string[] = []; + if (dataStorage) { + storage.push(loc.dataStorage(dataStorage)); + } + if (logStorage) { + storage.push(loc.logStorage(logStorage)); + } + if (backupsStorage) { + storage.push(loc.backupsStorage(backupsStorage)); + } + if (dataStorage || logStorage || backupsStorage) { + storage.push(`${loc.storagePerNode}`); + configuration.push(storage.join(' ')); } return configuration.join(', ');