Modifying TrueNAS SCALE App config files

amlamarra

Explorer
Joined
Feb 24, 2017
Messages
51
I'm a sys admin with a little Docker experience and zero Kubernetes experience. How would I go about permanently modifying configuration files (e.g. in /etc) for running apps?

I know that TrueNAS SCALE uses Kubernetes and not docker. But I know I can't just open a shell from the TrueNAS web gui, make changes to files (some of these apps don't even have an editor installed), and be done with it. With docker, you have to commit the changes to an image if you want those changes to persist. Is there something similar for Kubernetes?
 

inman.turbo

Contributor
Joined
Aug 27, 2019
Messages
149
You would have to find the source code for the container, fork it, make your changes and push your new image to a registry. For actual apps you would also have to create your own catalog and fork the chart.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The typical answer is to mount a path/file into the container from storage on the host.

That way, anytime a pod/container is redeployed the same storage (from the host) is there in the fresh container filesystem.

Depending on the changes needed and where they are, this can be easy... like just redirecting /etc/app1 to /mnt/apps/app1 on the host (where the config is a subdirectory containing one or more files).

If it's something a little more complex, like one or more individual files in a standard directory... like /etc/app1.conf and /etc/app1.json or something like that, you may be bale to get to it via individual persistent storage options if you're using TrueCharts (since their options allow for that), otherwise, maybe you'll need to consider the container restructure as mentioned above.
 

gskular

Cadet
Joined
Feb 16, 2021
Messages
3
Ok. I upgraded to the newest version, and it's still limited to 1GB.

To make it work, stop the container and edit a configuration file directly on truenas filesystem in the ix-applications.
My pod name is 'webdav' and file you want to edit is:

ix-applications/releases/webdav/charts/1.0.10/templates/_helper.tpl

Add LimitXMLRequestBody and LimitRequestBody lines here:

... {{/* WebDav Core Config */}} {{- define "webdav.core.config" -}} DavLockDB "/usr/local/apache2/var/DavLock" <Directory /> {{- if ne .Values.webdavConfig.authType "none" }} {{- include "webdav.auth.config" $ | nindent 2 }} {{- end }} Dav On IndexOptions Charset=utf-8 AddDefaultCharset UTF-8 AllowOverride None Order allow,deny Allow from all Options Indexes FollowSymLinks LimitXMLRequestBody 2147483647 LimitRequestBody 2147483647 </Directory> {{- range .Values.webdavStorage.shares }} {{- if .enabled }} ...

Restart the pod container and enjoy.
Of course, if you update the container, check if those two lines are still here...
 
Top