mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 20:42:33 +02:00
kubernetes/migration: Add new default plugins/options (#155)
* add new defaults * i think this works better
This commit is contained in:
parent
d26b5fbfcb
commit
2821bdd6c4
4 changed files with 136 additions and 24 deletions
|
@ -15,6 +15,9 @@ func TestMigrate(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
name: "Remove invalid proxy option",
|
||||
fromVersion: "1.1.3",
|
||||
toVersion: "1.2.6",
|
||||
deprecations: true,
|
||||
startCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
|
@ -34,11 +37,6 @@ func TestMigrate(t *testing.T) {
|
|||
loadbalance
|
||||
}
|
||||
`,
|
||||
|
||||
fromVersion: "1.1.3",
|
||||
toVersion: "1.2.6",
|
||||
deprecations: true,
|
||||
|
||||
expectedCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
|
@ -59,6 +57,9 @@ func TestMigrate(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "Migrate from proxy to forward and handle Kubernetes deprecations",
|
||||
fromVersion: "1.3.1",
|
||||
toVersion: "1.5.0",
|
||||
deprecations: true,
|
||||
startCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
|
@ -76,11 +77,6 @@ func TestMigrate(t *testing.T) {
|
|||
loadbalance
|
||||
}
|
||||
`,
|
||||
|
||||
fromVersion: "1.3.1",
|
||||
toVersion: "1.5.0",
|
||||
deprecations: true,
|
||||
|
||||
expectedCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
|
@ -95,9 +91,48 @@ func TestMigrate(t *testing.T) {
|
|||
loop
|
||||
reload
|
||||
loadbalance
|
||||
ready
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "add missing loop and ready plugins",
|
||||
fromVersion: "1.1.3",
|
||||
toVersion: "1.5.0",
|
||||
deprecations: true,
|
||||
startCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
upstream
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
prometheus :9153
|
||||
proxy . /etc/resolv.conf
|
||||
cache 30
|
||||
reload
|
||||
loadbalance
|
||||
}
|
||||
`,
|
||||
expectedCorefile: `.:53 {
|
||||
errors
|
||||
health
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
prometheus :9153
|
||||
forward . /etc/resolv.conf
|
||||
cache 30
|
||||
reload
|
||||
loadbalance
|
||||
loop
|
||||
ready
|
||||
}
|
||||
`,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue