opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
835 stars 623 forks source link

www/caddy: Change "check_interval" and "ttl" to seconds, add "update_only" option #4038

Closed Monviech closed 3 months ago

Monviech commented 3 months ago

This PR improves the Dynamic DNS section:

This change makes use of the default migration by changing the field name for TTL and Check Interval.

The default of the old field was 1 hour, which is way too high for dynamic dns. I doubt anybody would choose a higher value than 1 hour.

So, this PR changes the field names to new ones, making it empty with the defaults.

This change fixes the problem with minimal breakage for existing users, without having to use a custom migration, keeping the code clean.

Fixes: https://github.com/opnsense/plugins/issues/4037 Fixes: https://github.com/opnsense/plugins/issues/4036 - (At least on my end, the other issue is upstream)

Monviech commented 3 months ago

Thinking about giving the "check interval" the same treatment for consistency as it also does not have to be defined to use defaults, and can also be seconds.

Monviech commented 3 months ago

Adjusted "check interval" to follow the same logic as "ttl".

Added new field "Update Only" which might help: https://github.com/opnsense/plugins/issues/4036

Monviech commented 3 months ago

@fichtner Ready to merge.

Tested the (default) migration, the new fields, and that dynamic dns continues to work seamlessly with the new default values after an update.

fichtner commented 3 months ago

Merged, thanks!