Skip to content
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

pre-populate default unbound configuration when providing a volume mount #171

Open
jhomen368 opened this issue Feb 27, 2024 · 1 comment

Comments

@jhomen368
Copy link

jhomen368 commented Feb 27, 2024

Is your feature request related to a problem? Please describe.
When starting the unbound container with an empty volume mount to /opt/unbound/etc/unbound the container will refuse to start with the errors:

/opt/unbound/etc/unbound/unbound.conf:339: error: cannot open include file '/opt/unbound/etc/unbound/a-records.conf': No such file or directory
/opt/unbound/etc/unbound/unbound.conf:340: error: cannot open include file '/opt/unbound/etc/unbound/srv-records.conf': No such file or directory
/opt/unbound/etc/unbound/unbound.conf:346: error: cannot open include file '/opt/unbound/etc/unbound/forward-records.conf': No such file or directory
read /opt/unbound/etc/unbound/unbound.conf failed: 3 errors in configuration file
[1709013939] unbound[1:0] fatal error: Could not read config file: /opt/unbound/etc/unbound/unbound.conf. Maybe try unbound -dd, it stays on the commandline to see more errors, or unbound-checkconf

Describe the solution you'd like

Populate the default configuration files into /opt/unbound/etc/unbound when a volume is mounted to /opt/unbound/etc/unbound to allow the container to start up. This would behave similar to other containers like transmission, sabnzbd and many others which you mount /config to a volume but it pre-populates them with a working configuration so that the container can spin up prior to the user having to create files.

Describe alternatives you've considered

Creating a configMap per https://github.com/MatthewVance/unbound-docker/blob/master/k8s/deployment.yml

Additional context
I am specifically trying to implement unbound into a Kubernetes cluster with volumes that get dynamically attached but because there are no default values I cannot enter the working container to put in the correct values.

@aikooo7
Copy link

aikooo7 commented Apr 17, 2024

Could this be looked in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants