Use App On Scale That Needs SysCtl Value Set

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
I need to use a docker container based application on TrueNAS Scale that needs the following setting when running on a vanilla Docker setup:

sysctl="net.ipv4.conf.all.src_valid_mark=1"

How would I translate this to Kubernetes which TrueNAS Scale uses and set it up either via the GUI or via the REST API?

Thanks,
Harry
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
If you run sysctl net.ipv4.conf.all.src_valid_mark=1 in the shell, does it do the job?

To make that survive a reboot, you would create a tunable under System Settings | Advanced | Sysctl (Add)
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
If you run sysctl net.ipv4.conf.all.src_valid_mark=1 in the shell, does it do the job?

To make that survive a reboot, you would create a tunable under System Settings | Advanced | Sysctl (Add)
This is a setting that needs to be set "inside" the docker container. Usually it's passed to the docker run command. Setting it on the host would not have the wanted effect. You can read more about it at the bottom of this page: https://docs.docker.com/engine/reference/commandline/run/.

Thanks,
Harry
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
In a lot of cases these do not actually have to be set on kubernetes.
Remember you're using kubernetes, not standard docker.

Just because a standard docker resource explains you need to do something, doesn't make it true.

Though this is badly documented, we came accross the same requirement for our VPN addon and have seen no issues at all without it.
 

goofball

Cadet
Joined
Sep 14, 2022
Messages
1
In a lot of cases these do not actually have to be set on kubernetes.
Remember you're using kubernetes, not standard docker.

Just because a standard docker resource explains you need to do something, doesn't make it true.

Though this is badly documented, we came accross the same requirement for our VPN addon and have seen no issues at all without it.
My qbittorrent instance was unable to download torrents and was erroring with a message like "skipping tracker announce unreachable".

Added the setting and everything works great.
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
My qbittorrent instance was unable to download torrents and was erroring with a message like "skipping tracker announce unreachable".

Added the setting and everything works great.
How did you add the setting in the container?

Thanks,
Harry
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
How did you add the setting in the container?

Thanks,
Harry

Its a kernel parameter so should be set on the host as far as we're aware.
Containers should inherit the host kernel parameters
 
Top