diff --git a/corefile-tool/cmd/validversions_test.go b/corefile-tool/cmd/validversions_test.go index c6d329f..250da5a 100644 --- a/corefile-tool/cmd/validversions_test.go +++ b/corefile-tool/cmd/validversions_test.go @@ -15,7 +15,7 @@ func TestNewValidVersionsCmd(t *testing.T) { { name: "Works without error", expectedOutput: `The following are valid CoreDNS versions: -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.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 `, expectedError: false, }, diff --git a/migration/versions.go b/migration/versions.go index d8a8146..c31cddb 100644 --- a/migration/versions.go +++ b/migration/versions.go @@ -30,165 +30,52 @@ type release struct { // Versions holds a map of plugin/option migrations per CoreDNS release (since 1.1.4) var Versions = map[string]release{ + "1.9.2": { + priorVersion: "1.9.1", + dockerImageSHA: "27340bfb3d563684973da8222bfed30c8b38e211d39e6dc2e632d0beef4cdca0", + plugins: plugins_1_8_3, + }, "1.9.1": { + nextVersion: "1.9.2", priorVersion: "1.9.0", dockerImageSHA: "d5a7db9ab4cb3efc22a08707385c54c328db3df32841d6c4a8ae78f102f1f49a", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.9.0": { nextVersion: "1.9.1", priorVersion: "1.8.7", dockerImageSHA: "0f101fabf4b63883d4529435f75b1e8816dcc8915e8fa7d28aa6e50a15e9ea6a", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.7": { nextVersion: "1.9.0", priorVersion: "1.8.6", dockerImageSHA: "58508c172b14716350dc5185baefd78265a703514281d309d1d54aa1b721ad68", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.6": { nextVersion: "1.8.7", priorVersion: "1.8.5", dockerImageSHA: "5b6ec0d6de9baaf3e92d0f66cd96a25b9edbce8716f5f15dcd1a616b3abd590e", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.5": { nextVersion: "1.8.6", priorVersion: "1.8.4", dockerImageSHA: "43a9f52f5dce39bf1816afe6141724cc2d08811e466dd46e6628c925e2419bdc", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.4": { nextVersion: "1.8.5", priorVersion: "1.8.3", dockerImageSHA: "6e5a02c21641597998b4be7cb5eb1e7b02c0d8d23cce4dd09f4682d463798890", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.3": { nextVersion: "1.8.4", priorVersion: "1.8.0", // CoreDNS 1.8.2 is not a valid version and 1.8.1 docker images were never released. dockerImageSHA: "642ff9910da6ea9a8624b0234eef52af9ca75ecbec474c5507cb096bdfbae4e5", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v8"], - "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"], - }, + plugins: plugins_1_8_3, }, "1.8.0": { nextVersion: "1.8.3", // CoreDNS 1.8.2 is not a valid version and 1.8.1 docker images were never released. @@ -410,45 +297,13 @@ var Versions = map[string]release{ nextVersion: "1.6.5", priorVersion: "1.6.3", dockerImageSHA: "493ee88e1a92abebac67cbd4b5658b4730e0f33512461442d8d9214ea6734a9b", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v6"], - "k8s_external": plugins["k8s_external"]["v1"], - "prometheus": {}, - "forward": plugins["forward"]["v2"], - "cache": plugins["cache"]["v1"], - "loop": {}, - "reload": {}, - "loadbalance": {}, - "hosts": plugins["hosts"]["v1"], - "rewrite": plugins["rewrite"]["v2"], - }, + plugins: plugins_1_6_0, }, "1.6.3": { nextVersion: "1.6.4", priorVersion: "1.6.2", dockerImageSHA: "cfa7236dab4e3860881fdf755880ff8361e42f6cba2e3775ae48e2d46d22f7ba", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v6"], - "k8s_external": plugins["k8s_external"]["v1"], - "prometheus": {}, - "forward": plugins["forward"]["v2"], - "cache": plugins["cache"]["v1"], - "loop": {}, - "reload": {}, - "loadbalance": {}, - "hosts": plugins["hosts"]["v1"], - "rewrite": plugins["rewrite"]["v2"], - }, + plugins: plugins_1_6_0, }, "1.6.2": { nextVersion: "1.6.3", @@ -471,67 +326,19 @@ var Versions = map[string]release{ reload loadbalance }`, - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v6"], - "k8s_external": plugins["k8s_external"]["v1"], - "prometheus": {}, - "forward": plugins["forward"]["v2"], - "cache": plugins["cache"]["v1"], - "loop": {}, - "reload": {}, - "loadbalance": {}, - "hosts": plugins["hosts"]["v1"], - "rewrite": plugins["rewrite"]["v2"], - }, + plugins: plugins_1_6_0, }, "1.6.1": { nextVersion: "1.6.2", priorVersion: "1.6.0", dockerImageSHA: "9ae3b6fcac4ee821362277de6bd8fd2236fa7d3e19af2ef0406d80b595620a7a", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v6"], - "k8s_external": plugins["k8s_external"]["v1"], - "prometheus": {}, - "forward": plugins["forward"]["v2"], - "cache": plugins["cache"]["v1"], - "loop": {}, - "reload": {}, - "loadbalance": {}, - "hosts": plugins["hosts"]["v1"], - "rewrite": plugins["rewrite"]["v2"], - }, + plugins: plugins_1_6_0, }, "1.6.0": { nextVersion: "1.6.1", priorVersion: "1.5.2", dockerImageSHA: "263d03f2b889a75a0b91e035c2a14d45d7c1559c53444c5f7abf3a76014b779d", - plugins: map[string]plugin{ - "errors": plugins["errors"]["v2"], - "log": plugins["log"]["v1"], - "health": plugins["health"]["v1"], - "ready": {}, - "autopath": {}, - "kubernetes": plugins["kubernetes"]["v6"], - "k8s_external": plugins["k8s_external"]["v1"], - "prometheus": {}, - "forward": plugins["forward"]["v2"], - "cache": plugins["cache"]["v1"], - "loop": {}, - "reload": {}, - "loadbalance": {}, - "hosts": plugins["hosts"]["v1"], - "rewrite": plugins["rewrite"]["v2"], - }, + plugins: plugins_1_6_0, }, "1.5.2": { nextVersion: "1.6.0", @@ -913,3 +720,40 @@ var Versions = map[string]release{ reload }`}, } + +var plugins_1_8_3 = map[string]plugin{ + "errors": plugins["errors"]["v2"], + "log": plugins["log"]["v1"], + "health": plugins["health"]["v1"], + "ready": {}, + "autopath": {}, + "kubernetes": plugins["kubernetes"]["v8"], + "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"], +} + +var plugins_1_6_0 = map[string]plugin{ + "errors": plugins["errors"]["v2"], + "log": plugins["log"]["v1"], + "health": plugins["health"]["v1"], + "ready": {}, + "autopath": {}, + "kubernetes": plugins["kubernetes"]["v6"], + "k8s_external": plugins["k8s_external"]["v1"], + "prometheus": {}, + "forward": plugins["forward"]["v2"], + "cache": plugins["cache"]["v1"], + "loop": {}, + "reload": {}, + "loadbalance": {}, + "hosts": plugins["hosts"]["v1"], + "rewrite": plugins["rewrite"]["v2"], +}