traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.02k stars 141 forks source link

Allow CoreDNS version strings to contain sufixes #774

Closed 0rax closed 3 years ago

0rax commented 3 years ago

What does this PR do?

This PR fixes an issue where the traefik-mesh-controller/traefik-mesh-prepare script would fail if the version of CoreDNS deployed in your environment contains a prefix. This has been seen on AWS EKS, where a build version is present (i.e: v1.6.6-eksbuild.1).

As described in the #773 issue, this is due to the way hashicorp/go-version handles version string when verified using goversion.NewConstraint(">= 1.3, < 1.8") as it considers any -suffix to be a pre-release version instead of a metadata (expecting a +suffix instead). This can be fixed by using the form version.GreaterThanOrEqual("1.3") && version.LessThan("1.8").

Fixes #773

How to test it

The specific use-case describe in the original issue has also been added as a test case in pkg/dns/dns_test.go for future reference.

Additional Notes

This has been tested on an AWS EKS v1.17-eks.3 cluster with the default CNI removed and replaced by Calico.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

carlosescura commented 3 years ago

Is there any information about the release date for this fix?

kevinpollet commented 3 years ago

Hello @carlosescura,

We will do a bugfix release in the coming days.

Thanks for your interest in Traefik Mesh!

carlosescura commented 3 years ago

Thanks a lot!! 🥇