mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 12:32:34 +02:00
handle endpoint deprecation (#141)
This commit is contained in:
parent
b5043b3b75
commit
56bee8655c
1 changed files with 25 additions and 6 deletions
|
@ -62,7 +62,10 @@ var Versions = map[string]release{
|
||||||
status: deprecated,
|
status: deprecated,
|
||||||
action: removeOption,
|
action: removeOption,
|
||||||
},
|
},
|
||||||
"endpoint": {},
|
"endpoint": {
|
||||||
|
status: deprecated,
|
||||||
|
action: removeExtraEndpoints,
|
||||||
|
},
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"kubeconfig": {},
|
"kubeconfig": {},
|
||||||
"namespaces": {},
|
"namespaces": {},
|
||||||
|
@ -115,8 +118,11 @@ var Versions = map[string]release{
|
||||||
"autopath": {},
|
"autopath": {},
|
||||||
"kubernetes": {
|
"kubernetes": {
|
||||||
options: map[string]option{
|
options: map[string]option{
|
||||||
"resyncperiod": {},
|
"resyncperiod": {},
|
||||||
"endpoint": {}, // TODO: Multiple endpoint deprecation
|
"endpoint": {
|
||||||
|
status: deprecated,
|
||||||
|
action: removeExtraEndpoints,
|
||||||
|
},
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"kubeconfig": {},
|
"kubeconfig": {},
|
||||||
"namespaces": {},
|
"namespaces": {},
|
||||||
|
@ -189,8 +195,11 @@ var Versions = map[string]release{
|
||||||
"autopath": {},
|
"autopath": {},
|
||||||
"kubernetes": {
|
"kubernetes": {
|
||||||
options: map[string]option{
|
options: map[string]option{
|
||||||
"resyncperiod": {},
|
"resyncperiod": {},
|
||||||
"endpoint": {}, // TODO: Multiple endpoint deprecation
|
"endpoint": {
|
||||||
|
status: deprecated,
|
||||||
|
action: removeExtraEndpoints,
|
||||||
|
},
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"kubeconfig": {},
|
"kubeconfig": {},
|
||||||
"namespaces": {},
|
"namespaces": {},
|
||||||
|
@ -255,4 +264,14 @@ var proxyToForwardOptionsMigrations = map[string]option{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var proxyToForwardPluginAction = func(p *corefile.Plugin) (*corefile.Plugin, error) { return renamePlugin(p, "forward") }
|
var proxyToForwardPluginAction = func(p *corefile.Plugin) (*corefile.Plugin, error) {
|
||||||
|
return renamePlugin(p, "forward")
|
||||||
|
}
|
||||||
|
|
||||||
|
var removeExtraEndpoints = func(o *corefile.Option) (*corefile.Option, error) {
|
||||||
|
if len(o.Args) > 1 {
|
||||||
|
o.Args = o.Args[:1]
|
||||||
|
return o, nil
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue