You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way helm values work, if a particular value (or sub-value at any level) is an array, you can't modify it, only overwrite it. This makes modifying the default server and its plugins very difficult, your only option is to basically re-create the entire servers value with what you want.
One solution that's been employed elsewhere is to use a dict rather than an array. The keys may or may not actually be used but that allows the contents to be modified, added to, or removed.
Maybe plugins could be indexed by their name? The CoreDNS docs are clear that the order of plugins does not matter, although it's not immediately clear to me whether certain plugins can be used more than once in the same server (most don't seems to support or expect this though).
It might also be possible to do this in a backwards-compatible way although I haven't really thought through all the details there.
The way helm values work, if a particular value (or sub-value at any level) is an array, you can't modify it, only overwrite it. This makes modifying the default server and its plugins very difficult, your only option is to basically re-create the entire
servers
value with what you want.One solution that's been employed elsewhere is to use a dict rather than an array. The keys may or may not actually be used but that allows the contents to be modified, added to, or removed.
Maybe plugins could be indexed by their name? The CoreDNS docs are clear that the order of plugins does not matter, although it's not immediately clear to me whether certain plugins can be used more than once in the same server (most don't seems to support or expect this though).
It might also be possible to do this in a backwards-compatible way although I haven't really thought through all the details there.
Related to #75
An example of the default config rewritten in this format might look like this:
The text was updated successfully, but these errors were encountered: