mw/kubernetes: warn about deprecating cidr (#858)

Add log statement pointing to replacement.
remove cidr from README and use replacement syntax.

Fixes #851
This commit is contained in:
Miek Gieben 2017-08-08 05:05:34 -07:00 committed by GitHub
parent be551f21a0
commit c3705ec68c
2 changed files with 66 additions and 70 deletions

View file

@ -3,6 +3,7 @@ package kubernetes
import (
"errors"
"fmt"
"log"
"net"
"strconv"
"strings"
@ -95,6 +96,10 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
for c.NextBlock() {
switch c.Val() {
case "cidrs":
// DEPRECATION WARNING
log.Printf("[WARNING] \"cidrs\" will be removed for CoreDNS soon. See https://coredns.io/2017/07/23/corefile-explained#reverse-zones for the replacement")
args := c.RemainingArgs()
if len(args) > 0 {
for _, cidrStr := range args {