Commit c3705ec6 authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

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

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

Fixes #851
parent be551f21
This diff is collapsed.
...@@ -3,6 +3,7 @@ package kubernetes ...@@ -3,6 +3,7 @@ package kubernetes
import ( import (
"errors" "errors"
"fmt" "fmt"
"log"
"net" "net"
"strconv" "strconv"
"strings" "strings"
...@@ -95,6 +96,10 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) { ...@@ -95,6 +96,10 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
for c.NextBlock() { for c.NextBlock() {
switch c.Val() { switch c.Val() {
case "cidrs": 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() args := c.RemainingArgs()
if len(args) > 0 { if len(args) > 0 {
for _, cidrStr := range args { for _, cidrStr := range args {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment