You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring boot version: 2.4.1
Tested on Kubernetes v1.18.8 and locally reproduced on Windows file system
Kubernetes volume projection can be used to aggregate many secrets or configmaps under the same root folder to facilitate configuration usage and filtering.
This problem arises when subpaths are used to project the value. Since the first directory level is a symbolic link, Spring does not follow it, and no properties are loaded past it.
Spring will not load any values past the my directory and will eventually throw an exception when the property is referenced.
As a workaround we added two other levels to the projection path and added it to the configtree option forcing Spring to read past the symlink directory.
The two directory levels were necessary because the a directory itself is a symlink. Since b is a regular folder the properties past it will be loaded successfully.
I suspect the problem could be in the method call Files.findhere where it does not use the java.nio.file.FileVisitOption.FOLLOW_LINKS option.
The text was updated successfully, but these errors were encountered:
Spring boot version: 2.4.1
Tested on Kubernetes v1.18.8 and locally reproduced on Windows file system
Kubernetes volume projection can be used to aggregate many secrets or configmaps under the same root folder to facilitate configuration usage and filtering.
This problem arises when subpaths are used to project the value. Since the first directory level is a symbolic link, Spring does not follow it, and no properties are loaded past it.
For example, following pod:
Will generate this directory tree:
Using the following application.yaml
Spring will not load any values past the my directory and will eventually throw an exception when the property is referenced.
As a workaround we added two other levels to the projection path and added it to the configtree option forcing Spring to read past the symlink directory.
For example, following pod:
Will generate this directory tree:
Using the following application.yaml
The two directory levels were necessary because the a directory itself is a symlink. Since b is a regular folder the properties past it will be loaded successfully.
I suspect the problem could be in the method call Files.find here where it does not use the java.nio.file.FileVisitOption.FOLLOW_LINKS option.
The text was updated successfully, but these errors were encountered: