Validate DLE config
Goal
Validate DLE config to prevent significant error without running retrieval
TODO / How to implement
Validate config before running retrieval jobs. It will be great if the validator is available for use without depending on the Retrieval service
YAML Syntax
The content of yaml file matches the Config structure without error
DLE config logic
-
server:
-
port
is a number from 0 to 65535
-
-
embeddedUI:
-
dockerImage
exists or available to download -
port
is a number from 0 to 65535, no conflict with DLE port
-
-
global:
-
engine
equals "postgres" - if
telemetry
is enabled,url
is valid
-
-
poolManager:
-
mountDir
exists
-
-
databaseContainer:
-
dockerImage
exists or available to download
-
-
provision:
-
portPool
:from
andto
are numbers. Thefrom
value must be less thanto
.
-
-
retrieval:
- if
refresh
is defined,timetable
contains a valid crontab string -
jobs
- the jobs section must not contain physical and logical restore jobs simultaneously -
spec.logicalDump
andspec.logicalRestore
:dumpLocation
exists and empty -
spec.logicalDump
: check ifsource.type
is one of "local", "remote", or "rdsIam" -
spec.logicalDump
:-
connection
containsdbname
andusername
fields in all cases -
connection
containshost
andport
if the source type isremote
-
connection
containsrdsIam
(with non-emptyawsRegion
,dbInstanceIdentifier
,sslRootCert
)
-
-
spec.logicalDump
:parallelJobs
cannot be more than 1 ifimmediateRestore
is enabled - if
spec.logicalDump.immediateRestore
is enabled,logicalRestore
must be not presented in thejobs
list -
spec.logicalSnapshot
andspec.physicalSnapshot
:preprocessingScript
exists -
spec.logicalSnapshot
andspec.physicalSnapshot
:queryPath
is empty or exists ifqueryPreprocessing
is defined -
spec.physicalRestore
:tool
is one of "customTool", "walg", "pgbackrest" and there is a corresponding field in theoptions
section -
spec.physicalSnapshot
:timetable
fields contain valid crontab strings forscheduler.snapshot
andscheduler.retention
- if
Acceptance criteria
Any DLE configuration can be checked for compliance before starting the application
Edited by Artyom Kartasov