In kubernetes environment I placed all liquibase changelog files in ConfigMap which than referenced to volumeMount as follows:
...
volumeMounts:
- name: my-vol
mountPath: /liquibase
...
volumes:
- name: my-vol
configMap:
name: my-cm
I defined main-changelog.xml with liquibase variable on start and get following error:
Unexpected error running Liquibase: Error Reading Changelog File: Found 2 files that match /liquibase/main-changelog.xml: file:/liquibase/..2023_06_19_03_58_35.3720542680/main-changelog.xml, file:/liquibase/main-changelog.xml
In filesystem of kubernetes pods it looks as follows:
drwxr-xr-x 1 root root 4096 Jun 19 08:16 ..
drwxrwxrwx 3 root root 4096 Jun 19 08:16 .
drwxr-xr-x 2 root root 4096 Jun 19 08:16 ..2023_06_19_08_16_53.3878877458
lrwxrwxrwx 1 root root 32 Jun 19 08:16 ..data -> ..2023_06_19_08_16_53.3878877458
lrwxrwxrwx 1 root root 32 Jun 19 08:16 main-changelog.xml -> ..data/main-changelog.xml
As it can be seen kubernetes creates internally a symlink of files and references with ConfigMap, which I assume liquibase has the problem with. Is there any suggestions to fix this problem?