-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize pihole-FTL.conf with FTLCONF_ prefixed environment variables. #944
Conversation
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
I've not tested this functionally, yet, but I like the idea a lot. I am wondering (out loud) if we can do something similar for I also need to check a few things, but we might be able to keep the |
Yes, implementing something similar for Let me know of your thoughts, I'm happy to discuss and make amendments per your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a
…recated variables. Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
Description
Parse all environment variables starting with the
FTLCONF_
prefix and setup the variable's suffix as apihole-FTL.conf
customized setting. For example, setting theFTLCONF_REPLY_ADDR4=10.1.2.3
environment variable would result in apihole-FTL.conf
setting ofREPLY_ADDR4=10.1.2.3
.This PR is marked as having a breaking change since the yet undocumentedServerIP
andServerIPv6
variables have been deprecated in favor of provisioning them asFTLCONF_REPLY_ADDR4
andFTLCONF_REPLY_ADDR6
respectively.Motivation and Context
Addresses #922 and #919
There were use cases where
pihole-FTL.conf
could be supplied through a read-only filesystem i.e.: a Kubernetes ConfigMap, and calling thechangeFTLsetting
function on such a read-only file would cause the container to crash loop. This PR is meant to provide the pi-hole administrator all the flexibility that was previously associated with volume-mounting a customizedpihole-FTL.conf
, but now by using environment variables.How Has This Been Tested?
docker run -it -e FTLCONF_REPLY_ADDR4=10.1.2.3 -e FTLCONF_MAXDBDAYS=7 issue922
Types of changes
Checklist: