mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
update corefile-migration library dep to 1.0.11 which supports up to coredns v1.8.0
This commit is contained in:
parent
40862c3b60
commit
b42b335bfa
4
go.mod
4
go.mod
@ -29,7 +29,7 @@ require (
|
|||||||
github.com/codegangsta/negroni v1.0.0 // indirect
|
github.com/codegangsta/negroni v1.0.0 // indirect
|
||||||
github.com/container-storage-interface/spec v1.2.0
|
github.com/container-storage-interface/spec v1.2.0
|
||||||
github.com/containernetworking/cni v0.8.0
|
github.com/containernetworking/cni v0.8.0
|
||||||
github.com/coredns/corefile-migration v1.0.10
|
github.com/coredns/corefile-migration v1.0.11
|
||||||
github.com/coreos/go-oidc v2.1.0+incompatible
|
github.com/coreos/go-oidc v2.1.0+incompatible
|
||||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
|
||||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
|
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
|
||||||
@ -213,7 +213,7 @@ replace (
|
|||||||
github.com/containerd/ttrpc => github.com/containerd/ttrpc v1.0.0
|
github.com/containerd/ttrpc => github.com/containerd/ttrpc v1.0.0
|
||||||
github.com/containerd/typeurl => github.com/containerd/typeurl v1.0.0
|
github.com/containerd/typeurl => github.com/containerd/typeurl v1.0.0
|
||||||
github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.0
|
github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.0
|
||||||
github.com/coredns/corefile-migration => github.com/coredns/corefile-migration v1.0.10
|
github.com/coredns/corefile-migration => github.com/coredns/corefile-migration v1.0.11
|
||||||
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.2
|
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.2
|
||||||
github.com/coreos/etcd => github.com/coreos/etcd v3.3.13+incompatible
|
github.com/coreos/etcd => github.com/coreos/etcd v3.3.13+incompatible
|
||||||
github.com/coreos/go-oidc => github.com/coreos/go-oidc v2.1.0+incompatible
|
github.com/coreos/go-oidc => github.com/coreos/go-oidc v2.1.0+incompatible
|
||||||
|
4
go.sum
4
go.sum
@ -113,8 +113,8 @@ github.com/containerd/typeurl v1.0.0 h1:7LMH7LfEmpWeCkGcIputvd4P0Rnd0LrIv1Jk2s5o
|
|||||||
github.com/containerd/typeurl v1.0.0/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
github.com/containerd/typeurl v1.0.0/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
||||||
github.com/containernetworking/cni v0.8.0 h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI=
|
github.com/containernetworking/cni v0.8.0 h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI=
|
||||||
github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||||
github.com/coredns/corefile-migration v1.0.10 h1:7HI4r5S5Fne749a+JDxUZppqBpYoZK8Q53ZVK9cn3aM=
|
github.com/coredns/corefile-migration v1.0.11 h1:ptBYGW2ADXIB7ZEBPrhhTvNwJLQfxE3Q9IUMBhJCEeI=
|
||||||
github.com/coredns/corefile-migration v1.0.10/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI=
|
github.com/coredns/corefile-migration v1.0.11/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI=
|
||||||
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
|
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
|
||||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||||
|
9
vendor/github.com/coredns/corefile-migration/migration/migrate.go
generated
vendored
9
vendor/github.com/coredns/corefile-migration/migration/migrate.go
generated
vendored
@ -140,6 +140,15 @@ func Migrate(fromCoreDNSVersion, toCoreDNSVersion, corefileStr string, deprecati
|
|||||||
v := fromCoreDNSVersion
|
v := fromCoreDNSVersion
|
||||||
for {
|
for {
|
||||||
v = Versions[v].nextVersion
|
v = Versions[v].nextVersion
|
||||||
|
|
||||||
|
// apply any global corefile level pre-processing
|
||||||
|
if Versions[v].preProcess != nil {
|
||||||
|
cf, err = Versions[v].preProcess(cf)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
newSrvs := []*corefile.Server{}
|
newSrvs := []*corefile.Server{}
|
||||||
for _, s := range cf.Servers {
|
for _, s := range cf.Servers {
|
||||||
newPlugs := []*corefile.Plugin{}
|
newPlugs := []*corefile.Plugin{}
|
||||||
|
92
vendor/github.com/coredns/corefile-migration/migration/plugins.go
generated
vendored
92
vendor/github.com/coredns/corefile-migration/migration/plugins.go
generated
vendored
@ -198,6 +198,46 @@ var plugins = map[string]map[string]plugin{
|
|||||||
"ignore": {},
|
"ignore": {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"v8 remove transfer option": plugin{
|
||||||
|
namedOptions: map[string]option{
|
||||||
|
"endpoint": {
|
||||||
|
status: ignored,
|
||||||
|
action: useFirstArgumentOnly,
|
||||||
|
},
|
||||||
|
"tls": {},
|
||||||
|
"kubeconfig": {},
|
||||||
|
"namespaces": {},
|
||||||
|
"labels": {},
|
||||||
|
"pods": {},
|
||||||
|
"endpoint_pod_names": {},
|
||||||
|
"ttl": {},
|
||||||
|
"noendpoints": {},
|
||||||
|
"transfer": {
|
||||||
|
status: removed,
|
||||||
|
action: removeOption,
|
||||||
|
},
|
||||||
|
"fallthrough": {},
|
||||||
|
"ignore": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"v8": plugin{
|
||||||
|
namedOptions: map[string]option{
|
||||||
|
"endpoint": {
|
||||||
|
status: ignored,
|
||||||
|
action: useFirstArgumentOnly,
|
||||||
|
},
|
||||||
|
"tls": {},
|
||||||
|
"kubeconfig": {},
|
||||||
|
"namespaces": {},
|
||||||
|
"labels": {},
|
||||||
|
"pods": {},
|
||||||
|
"endpoint_pod_names": {},
|
||||||
|
"ttl": {},
|
||||||
|
"noendpoints": {},
|
||||||
|
"fallthrough": {},
|
||||||
|
"ignore": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
"errors": {
|
"errors": {
|
||||||
@ -318,6 +358,20 @@ var plugins = map[string]map[string]plugin{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"v3": plugin{
|
"v3": plugin{
|
||||||
|
namedOptions: map[string]option{
|
||||||
|
"except": {},
|
||||||
|
"force_tcp": {},
|
||||||
|
"prefer_udp": {},
|
||||||
|
"expire": {},
|
||||||
|
"max_fails": {},
|
||||||
|
"tls": {},
|
||||||
|
"tls_servername": {},
|
||||||
|
"policy": {},
|
||||||
|
"health_check": {},
|
||||||
|
"max_concurrent": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"v3 add max_concurrent": plugin{
|
||||||
namedOptions: map[string]option{
|
namedOptions: map[string]option{
|
||||||
"except": {},
|
"except": {},
|
||||||
"force_tcp": {},
|
"force_tcp": {},
|
||||||
@ -390,6 +444,14 @@ var plugins = map[string]map[string]plugin{
|
|||||||
namedOptions: proxyToForwardOptionsMigrations,
|
namedOptions: proxyToForwardOptionsMigrations,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"transfer": {
|
||||||
|
"v1": plugin{
|
||||||
|
namedOptions: map[string]option{
|
||||||
|
"to": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func removePlugin(*corefile.Plugin) (*corefile.Plugin, error) { return nil, nil }
|
func removePlugin(*corefile.Plugin) (*corefile.Plugin, error) { return nil, nil }
|
||||||
@ -418,6 +480,36 @@ func addToServerBlockWithPlugins(sb *corefile.Server, newPlugin *corefile.Plugin
|
|||||||
return sb, nil
|
return sb, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func copyKubernetesTransferOptToPlugin(cf *corefile.Corefile) (*corefile.Corefile, error) {
|
||||||
|
for _, s := range cf.Servers {
|
||||||
|
var (
|
||||||
|
to []string
|
||||||
|
zone string
|
||||||
|
)
|
||||||
|
for _, p := range s.Plugins {
|
||||||
|
if p.Name != "kubernetes" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
zone = p.Args[0]
|
||||||
|
for _, o := range p.Options {
|
||||||
|
if o.Name != "transfer" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
to = o.Args
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(to) < 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
s.Plugins = append(s.Plugins, &corefile.Plugin{
|
||||||
|
Name: "transfer",
|
||||||
|
Args: []string{zone},
|
||||||
|
Options: []*corefile.Option{{Name: "to", Args: to[1:]}},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return cf, nil
|
||||||
|
}
|
||||||
|
|
||||||
func addToKubernetesServerBlocks(sb *corefile.Server, newPlugin *corefile.Plugin) (*corefile.Server, error) {
|
func addToKubernetesServerBlocks(sb *corefile.Server, newPlugin *corefile.Plugin) (*corefile.Server, error) {
|
||||||
return addToServerBlockWithPlugins(sb, newPlugin, []string{"kubernetes"})
|
return addToServerBlockWithPlugins(sb, newPlugin, []string{"kubernetes"})
|
||||||
}
|
}
|
||||||
|
53
vendor/github.com/coredns/corefile-migration/migration/versions.go
generated
vendored
53
vendor/github.com/coredns/corefile-migration/migration/versions.go
generated
vendored
@ -12,10 +12,11 @@ type release struct {
|
|||||||
dockerImageSHA string // the docker image SHA for this release
|
dockerImageSHA string // the docker image SHA for this release
|
||||||
plugins map[string]plugin // map of plugins with deprecation status and migration actions for this release
|
plugins map[string]plugin // map of plugins with deprecation status and migration actions for this release
|
||||||
|
|
||||||
// postProcess is a post processing action to take on the corefile as a whole. Used for complex migration
|
// pre/postProcess are processing actions to take on the corefile as a whole. Used for complex migration
|
||||||
// tasks that dont fit well into the modular plugin/option migration framework. For example, when the
|
// tasks that dont fit well into the modular plugin/option migration framework. For example, when the
|
||||||
// action on a plugin would need to extend beyond the scope of that plugin (affecting other plugins, or
|
// action on a plugin would need to extend beyond the scope of that plugin (affecting other plugins, or
|
||||||
// server blocks, etc). e.g. Splitting plugins out into separate server blocks.
|
// server blocks, etc). e.g. Splitting plugins out into separate server blocks.
|
||||||
|
preProcess corefileAction
|
||||||
postProcess corefileAction
|
postProcess corefileAction
|
||||||
|
|
||||||
// defaultConf holds the default Corefile template packaged with the corresponding k8sReleases.
|
// defaultConf holds the default Corefile template packaged with the corresponding k8sReleases.
|
||||||
@ -29,7 +30,53 @@ type release struct {
|
|||||||
|
|
||||||
// Versions holds a map of plugin/option migrations per CoreDNS release (since 1.1.4)
|
// Versions holds a map of plugin/option migrations per CoreDNS release (since 1.1.4)
|
||||||
var Versions = map[string]release{
|
var Versions = map[string]release{
|
||||||
|
"1.8.0": {
|
||||||
|
priorVersion: "1.7.1",
|
||||||
|
dockerImageSHA: "TBD",
|
||||||
|
plugins: map[string]plugin{
|
||||||
|
"errors": plugins["errors"]["v2"],
|
||||||
|
"log": plugins["log"]["v1"],
|
||||||
|
"health": plugins["health"]["v1"],
|
||||||
|
"ready": {},
|
||||||
|
"autopath": {},
|
||||||
|
"kubernetes": plugins["kubernetes"]["v8 remove transfer option"],
|
||||||
|
"k8s_external": plugins["k8s_external"]["v1"],
|
||||||
|
"prometheus": {},
|
||||||
|
"forward": plugins["forward"]["v3"],
|
||||||
|
"cache": plugins["cache"]["v1"],
|
||||||
|
"loop": {},
|
||||||
|
"reload": {},
|
||||||
|
"loadbalance": {},
|
||||||
|
"hosts": plugins["hosts"]["v1"],
|
||||||
|
"rewrite": plugins["rewrite"]["v2"],
|
||||||
|
"transfer": plugins["transfer"]["v1"],
|
||||||
|
},
|
||||||
|
preProcess: copyKubernetesTransferOptToPlugin,
|
||||||
|
},
|
||||||
|
"1.7.1": {
|
||||||
|
nextVersion: "1.8.0",
|
||||||
|
priorVersion: "1.7.0",
|
||||||
|
dockerImageSHA: "4a6e0769130686518325b21b0c1d0688b54e7c79244d48e1b15634e98e40c6ef",
|
||||||
|
plugins: map[string]plugin{
|
||||||
|
"errors": plugins["errors"]["v2"],
|
||||||
|
"log": plugins["log"]["v1"],
|
||||||
|
"health": plugins["health"]["v1"],
|
||||||
|
"ready": {},
|
||||||
|
"autopath": {},
|
||||||
|
"kubernetes": plugins["kubernetes"]["v7"],
|
||||||
|
"k8s_external": plugins["k8s_external"]["v1"],
|
||||||
|
"prometheus": {},
|
||||||
|
"forward": plugins["forward"]["v3"],
|
||||||
|
"cache": plugins["cache"]["v1"],
|
||||||
|
"loop": {},
|
||||||
|
"reload": {},
|
||||||
|
"loadbalance": {},
|
||||||
|
"hosts": plugins["hosts"]["v1"],
|
||||||
|
"rewrite": plugins["rewrite"]["v2"],
|
||||||
|
},
|
||||||
|
},
|
||||||
"1.7.0": {
|
"1.7.0": {
|
||||||
|
nextVersion: "1.7.1",
|
||||||
priorVersion: "1.6.9",
|
priorVersion: "1.6.9",
|
||||||
k8sReleases: []string{"1.19"},
|
k8sReleases: []string{"1.19"},
|
||||||
dockerImageSHA: "73ca82b4ce829766d4f1f10947c3a338888f876fbed0540dc849c89ff256e90c",
|
dockerImageSHA: "73ca82b4ce829766d4f1f10947c3a338888f876fbed0540dc849c89ff256e90c",
|
||||||
@ -62,7 +109,7 @@ var Versions = map[string]release{
|
|||||||
"kubernetes": plugins["kubernetes"]["v7"],
|
"kubernetes": plugins["kubernetes"]["v7"],
|
||||||
"k8s_external": plugins["k8s_external"]["v1"],
|
"k8s_external": plugins["k8s_external"]["v1"],
|
||||||
"prometheus": {},
|
"prometheus": {},
|
||||||
"forward": plugins["forward"]["v3"],
|
"forward": plugins["forward"]["v3 add max_concurrent"],
|
||||||
"cache": plugins["cache"]["v1"],
|
"cache": plugins["cache"]["v1"],
|
||||||
"loop": {},
|
"loop": {},
|
||||||
"reload": {},
|
"reload": {},
|
||||||
@ -84,7 +131,7 @@ var Versions = map[string]release{
|
|||||||
"kubernetes": plugins["kubernetes"]["v6"],
|
"kubernetes": plugins["kubernetes"]["v6"],
|
||||||
"k8s_external": plugins["k8s_external"]["v1"],
|
"k8s_external": plugins["k8s_external"]["v1"],
|
||||||
"prometheus": {},
|
"prometheus": {},
|
||||||
"forward": plugins["forward"]["v2"],
|
"forward": plugins["forward"]["v3"],
|
||||||
"cache": plugins["cache"]["v2"],
|
"cache": plugins["cache"]["v2"],
|
||||||
"loop": {},
|
"loop": {},
|
||||||
"reload": {},
|
"reload": {},
|
||||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@ -266,9 +266,9 @@ github.com/containernetworking/cni/pkg/types/020
|
|||||||
github.com/containernetworking/cni/pkg/types/current
|
github.com/containernetworking/cni/pkg/types/current
|
||||||
github.com/containernetworking/cni/pkg/utils
|
github.com/containernetworking/cni/pkg/utils
|
||||||
github.com/containernetworking/cni/pkg/version
|
github.com/containernetworking/cni/pkg/version
|
||||||
# github.com/coredns/corefile-migration v1.0.10 => github.com/coredns/corefile-migration v1.0.10
|
# github.com/coredns/corefile-migration v1.0.11 => github.com/coredns/corefile-migration v1.0.11
|
||||||
## explicit
|
## explicit
|
||||||
# github.com/coredns/corefile-migration => github.com/coredns/corefile-migration v1.0.10
|
# github.com/coredns/corefile-migration => github.com/coredns/corefile-migration v1.0.11
|
||||||
github.com/coredns/corefile-migration/migration
|
github.com/coredns/corefile-migration/migration
|
||||||
github.com/coredns/corefile-migration/migration/corefile
|
github.com/coredns/corefile-migration/migration/corefile
|
||||||
# github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.2
|
# github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user