From b73ea7f18da0b4a58e2976eaf67f15d0c922ebba Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Fri, 22 Dec 2023 10:57:43 +0100 Subject: [PATCH] fix(GUI): fixup postgresql backup gui and options Signed-off-by: Kjeld Schouten --- .../questions/postgresql/postgresql.yaml | 73 +++++++++---------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/templates/questions/postgresql/postgresql.yaml b/templates/questions/postgresql/postgresql.yaml index b9812da48e2..8f947a3061f 100644 --- a/templates/questions/postgresql/postgresql.yaml +++ b/templates/questions/postgresql/postgresql.yaml @@ -17,6 +17,19 @@ schema: type: boolean default: false + - variable: mode + label: Mode + description: 'Cluster mode of operation. Available modes: standalone - default mode. Creates new or updates an existing CNPG cluster. recovery - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup replica - Creates a replica cluster from an existing CNPG cluster. # TODO.' + schema: + type: string + default: "standalone" + enum: + - value: standalone + description: standalone + - value: replica + description: replica + - value: recovery + description: recovery - variable: cluster label: "Cluster Settings" schema: @@ -123,128 +136,118 @@ type: string show_if: [["enabled", "=", true]] default: "s3" + enum: + - value: s3 + description: S3 + - value: azure + description: Azure + - value: google + description: Google - variable: s3 label: "s3" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "s3"], ["enabled", "=", true]] + show_if: [["provider", "=", "s3"]] attrs: - variable: region label: "region" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: bucket label: "bucket" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: accessKey label: "accessKey" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: secretKey label: "secretKey" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: azure label: "azure (EXTREMELY EXPERIMENTAL)" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "azure"], ["enabled", "=", true]] + show_if: [["provider", "=", "azure"]] attrs: - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: connectionString label: "connectionString" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: storageAccount label: "storageAccount" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: storageKey label: "storageKey" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: storageSasToken label: "storageSasToken" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: containerName label: "containerName" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: serviceName label: "serviceName" schema: type: string - show_if: [["enabled", "=", true]] default: "blob" - variable: inheritFromAzureAD label: "inheritFromAzureAD" schema: type: boolean - show_if: [["enabled", "=", true]] default: false - variable: google label: "google (EXTREMELY EXPERIMENTAL)" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "google"], ["enabled", "=", true]] + show_if: [["provider", "=", "google"]] attrs: - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: bucket label: "bucket" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: gkeEnvironment label: "gkeEnvironment" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: applicationCredentials label: "applicationCredentials" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: backups label: "Backup Settings (Experimental)" @@ -281,67 +284,66 @@ type: string show_if: [["enabled", "=", true]] default: "s3" + enum: + - value: s3 + description: S3 + - value: azure + description: Azure + - value: google + description: Google - variable: s3 label: "s3" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "s3"], ["enabled", "=", true]] + show_if: [["provider", "=", "s3"]] attrs: - variable: region label: "region" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: bucket label: "bucket" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: accessKey label: "accessKey" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: secretKey label: "secretKey" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: azure label: "azure (EXTREMELY EXPERIMENTAL)" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "azure"], ["enabled", "=", true]] + show_if: [["provider", "=", "azure"]] attrs: - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: connectionString label: "connectionString" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: storageAccount label: "storageAccount" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: storageKey label: "storageKey" @@ -353,63 +355,54 @@ label: "storageSasToken" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: containerName label: "containerName" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: serviceName label: "serviceName" schema: type: string - show_if: [["enabled", "=", true]] default: "blob" - variable: inheritFromAzureAD label: "inheritFromAzureAD" schema: type: boolean - show_if: [["enabled", "=", true]] default: false - variable: google label: "google (EXTREMELY EXPERIMENTAL)" schema: additional_attrs: true type: dict - show_if: [["provider", "=", "google"], ["enabled", "=", true]] + show_if: [["provider", "=", "google"]] attrs: - variable: path label: "path" schema: type: string - show_if: [["enabled", "=", true]] default: "/" - variable: bucket label: "bucket" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: gkeEnvironment label: "gkeEnvironment" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: applicationCredentials label: "applicationCredentials" schema: type: string - show_if: [["enabled", "=", true]] default: "" - variable: scheduledBackups label: ScheduledBackups schema: type: list default: [] - show_if: [["enabled", "=", true]] items: - variable: backupschedule label: BackupSchedule