Hello. We also use Karaf on Kubernetes. Our DevOps tools mount two PVC for "$KARAF_HOME/etc" and for "$KARAF_HOME/data" (thus including subfolders like "log"). Our custom image contains a start script that detects the first run to copy the default "etc" and "data" folders. Then the PVC volumes are used in RW mode as any folders. This allows persistence of logs, etc configurations files, deployment state and do on, while the pod can be stopped and start as needed...
I hope this could help you... Regards. Le mar. 28 mai 2024 à 13:05, Bernd Eckenfels <[email protected]> a écrit : > > Matthias Leinweber wrote on 28.05.2024 12:15 (GMT +02:00): > > > > Hello Karaf Users, > > > > > > how do you handle the problem when you you have a read only log > > configuration file: like when mounting it via config maps on kubernetes. > > > > Log:display + Log:tail are throwing exceptions because they can not change > > the file. ( set log level on sshd logger) > > > > We solved the config-map problem by having it mount to a custom > subdirectory. This has the additional advantage that the maps > only need to contain changes to existing config files. > > But this does not solve the read-only root problem. > > We use felix.fileinstall.subdir.mode = skip together > with a startup script which merges the etc/custom-config overwrites with the > etc/ directory. > > In our case its an extra step since that is used for setting > the system anyway, but it probably could also be an early boot > bundle doing that. > > BTW: why does log:tail change the loglevel? > (and also can log:set be made by default not persist the level?) > > Gruss > Bernd >
