Skip to content

Merge identical nodes instead of ignoring some, clarify handling in docs #579

@eugenesvk

Description

@eugenesvk

Suppose, for purely config organizational purposes, I wanted to have a config with identical domains defined multiple times:

 // set up TLS for various domains first
domain.com  {auto_tls_challenge "dns-01" provider="X" api_key="Y"}
example.com {auto_tls_challenge "dns-01" provider="X" api_key="Y"}

// more configs

// set up "cleaner" actual connections
domain.com  {proxy "http://localhost:8080"}
example.com {proxy "http://localhost:9090"}

How does Ferron handle those? Does it consolidate the configs or overwrite them, letting the last one win? Ignoring the last one?

Seems like the last method is used, but why? I think it'd be better if you had the flexibility described above and the nodes were merged instead, with only identical elements being overwritten (so, last one wins) as it seems more 'logical' following the document flow

Also would be nice to document explicitly how duplicate nodes are handled

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions