mirror of
https://github.com/coredns/coredns.git
synced 2026-10-08 19:45:21 -04:00
plugin: use Zones.Contains when any match suffices (#8505)
This commit is contained in:
@@ -31,10 +31,7 @@ func (k *Kubernetes) Metadata(ctx context.Context, state request.Request) contex
|
||||
if zone == "" {
|
||||
return ctx
|
||||
}
|
||||
multicluster := false
|
||||
if z := plugin.Zones(k.opts.multiclusterZones).Matches(state.Zone); z != "" {
|
||||
multicluster = true
|
||||
}
|
||||
multicluster := plugin.Zones(k.opts.multiclusterZones).Contains(state.Zone)
|
||||
// possible optimization: cache r so it doesn't need to be calculated again in ServeDNS
|
||||
r, err := parseRequest(state.Name(), zone, multicluster, k.opts.zonal)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user