mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-03-14 14:16:16 +01: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,
|
||||
action: removeOption,
|
||||
},
|
||||
"endpoint": {},
|
||||
"endpoint": {
|
||||
status: deprecated,
|
||||
action: removeExtraEndpoints,
|
||||
},
|
||||
"tls": {},
|
||||
"kubeconfig": {},
|
||||
"namespaces": {},
|
||||
|
@ -115,8 +118,11 @@ var Versions = map[string]release{
|
|||
"autopath": {},
|
||||
"kubernetes": {
|
||||
options: map[string]option{
|
||||
"resyncperiod": {},
|
||||
"endpoint": {}, // TODO: Multiple endpoint deprecation
|
||||
"resyncperiod": {},
|
||||
"endpoint": {
|
||||
status: deprecated,
|
||||
action: removeExtraEndpoints,
|
||||
},
|
||||
"tls": {},
|
||||
"kubeconfig": {},
|
||||
"namespaces": {},
|
||||
|
@ -189,8 +195,11 @@ var Versions = map[string]release{
|
|||
"autopath": {},
|
||||
"kubernetes": {
|
||||
options: map[string]option{
|
||||
"resyncperiod": {},
|
||||
"endpoint": {}, // TODO: Multiple endpoint deprecation
|
||||
"resyncperiod": {},
|
||||
"endpoint": {
|
||||
status: deprecated,
|
||||
action: removeExtraEndpoints,
|
||||
},
|
||||
"tls": {},
|
||||
"kubeconfig": {},
|
||||
"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…
Reference in a new issue