-
Notifications
You must be signed in to change notification settings - Fork 13
Description
The importer-chart`s README states that:
On startup, the Sophora Importer assumes that all directories you defined in your application.yaml under importer.instances[].folders already exist. These directories will be created automatically by Helm for all paths that don't start with s3://. All paths starting with /import-local/ are persisted and contained data will be kept after a restart.
This is not the case. Consider the following importer-configuration:
sophora:
importer:
configuration:
importer:
instances:
- folders:
success: "/import-local/successful"
failure: "/import-local/failure"
watch: "/import-local/incoming"
temp: "/import-local/temp"
Then the Importer fails to start with:
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'importer' to com.subshell.sophora.importer.configuration.ImporterConfiguration$$EnhancerBySpringCGLIB$$f20081b1 failed:
Property: importer.instances[0].folders.failure
Value: "com.subshell.sophora.importer.properties.PathPattern@33478a2f"
Origin: URL [file:application.yml] - 11:16
Reason: The folder '/import-local/default/failure' does not exist
So the directories are not automatically created by Helm (which it can not do as that would have to happen at runtime), only a volume is created and mounted at /import-local. But the Importer insists that the directories exists, so that sentence is correct ;-)
I am unsure whether this is a problem of the chart or just the README as using sub-directories is useless anyways if not using pvcs or s3 as no access is possible in most production scenarios.
I think you should either update the README or extend the templating of the StatefulSet so that all folders of all instances are iterated and the corresponding volumes/volumeMounts are created in some way (this seems quite complicated ;))
I'd prefer some way to either disable writing of files completely and having instances[].folders.watch optional as the importer will be either using a bucket to watch for files or be restricted to the SOAP-API. And for instances[].folders.temp the StatefulSet could use either a separate volume/volumeMount by default (e.g. /tmp/importer)