Skip to content

Commit 68bbb0f

Browse files
authored
support coredns v1.12.1 (#89)
* support coredns v1.12.1 Signed-off-by: yashsingh74 <[email protected]> * added option failfast_all_unhealthy_upstreams to return servfail Signed-off-by: yashsingh74 <[email protected]> --------- Signed-off-by: yashsingh74 <[email protected]>
1 parent b95c427 commit 68bbb0f

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

corefile-tool/cmd/validversions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestNewValidVersionsCmd(t *testing.T) {
1515
{
1616
name: "Works without error",
1717
expectedOutput: `The following are valid CoreDNS versions:
18-
1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.9, 1.7.0, 1.7.1, 1.8.0, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10.0, 1.10.1, 1.11.0, 1.11.1, 1.11.3, 1.11.4, 1.12.0
18+
1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.9, 1.7.0, 1.7.1, 1.8.0, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10.0, 1.10.1, 1.11.0, 1.11.1, 1.11.3, 1.11.4, 1.12.0, 1.12.1
1919
`,
2020
expectedError: false,
2121
},

migration/plugins.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,24 @@ var plugins = map[string]map[string]plugin{
441441
"policy": {},
442442
"health_check": {},
443443
"max_concurrent": {},
444-
"next": {}, // new option
444+
"next": {},
445+
"fail_fast": {}, // new option
446+
},
447+
},
448+
"v5": plugin{
449+
namedOptions: map[string]option{
450+
"except": {},
451+
"force_tcp": {},
452+
"prefer_udp": {},
453+
"expire": {},
454+
"max_fails": {},
455+
"tls": {},
456+
"tls_servername": {},
457+
"policy": {},
458+
"health_check": {},
459+
"max_concurrent": {},
460+
"next": {},
461+
"failfast_all_unhealthy_upstreams": {}, // new option
445462
},
446463
},
447464
},

migration/versions.go

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@ type release struct {
3030

3131
// Versions holds a map of plugin/option migrations per CoreDNS release (since 1.1.4)
3232
var Versions = map[string]release{
33+
"1.12.1": {
34+
priorVersion: "1.12.0",
35+
dockerImageSHA: "e8c262566636e6bc340ece6473b0eed193cad045384401529721ddbe6463d31c",
36+
plugins: plugins_1_12_0,
37+
},
3338
"1.12.0": {
39+
nextVersion: "1.12.1",
3440
priorVersion: "1.11.4",
3541
dockerImageSHA: "40384aa1f5ea6bfdc77997d243aec73da05f27aed0c5e9d65bfa98933c519d97",
36-
plugins: plugins_1_11_4,
42+
plugins: plugins_1_12_0,
3743
},
3844
"1.11.4": {
3945
nextVersion: "1.12.0",
@@ -775,6 +781,25 @@ var Versions = map[string]release{
775781
}`},
776782
}
777783

784+
var plugins_1_12_0 = map[string]plugin{
785+
"errors": plugins["errors"]["v3"],
786+
"log": plugins["log"]["v1"],
787+
"health": plugins["health"]["v1"],
788+
"ready": {},
789+
"autopath": {},
790+
"kubernetes": plugins["kubernetes"]["v8"],
791+
"k8s_external": plugins["k8s_external"]["v2"],
792+
"prometheus": {},
793+
"forward": plugins["forward"]["v5"], // add failfast_all_unhealthy_upstreams option
794+
"cache": plugins["cache"]["v4"],
795+
"loop": {},
796+
"reload": {},
797+
"loadbalance": {},
798+
"hosts": plugins["hosts"]["v1"],
799+
"rewrite": plugins["rewrite"]["v3"],
800+
"transfer": plugins["transfer"]["v1"],
801+
}
802+
778803
var plugins_1_11_4 = map[string]plugin{
779804
"errors": plugins["errors"]["v3"],
780805
"log": plugins["log"]["v1"],

0 commit comments

Comments
 (0)