mirror of
https://github.com/coredns/coredns.git
synced 2025-11-26 05:34:13 -05:00
plugin/template: support metadata (#2958)
* Enable use of metadata in templates * Update README * Don't stash away ctx, instead use a new func
This commit is contained in:
@@ -48,6 +48,8 @@ Each resource record is a full-featured [Go template](https://golang.org/pkg/tex
|
||||
* `.Group` a map of the named capture groups.
|
||||
* `.Message` the complete incoming DNS message.
|
||||
* `.Question` the matched question section.
|
||||
* `.Meta` a function that takes a metadata name and returns the value, if the
|
||||
metadata plugin is enabled. For example, `.Meta "kubernetes/client-namespace"`
|
||||
|
||||
The output of the template must be a [RFC 1035](https://tools.ietf.org/html/rfc1035) style resource record (commonly referred to as a "zone file").
|
||||
|
||||
|
||||
Reference in New Issue
Block a user