traefik / mesh

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

Support CoreDNS daemonsets, too #776

Closed der-eismann closed 1 year ago

der-eismann commented 3 years ago

Feature Request

Proposal

I'd like traefik mesh to also support CoreDNS when used as a daemonset instead of a deployment.

Background

We use one dns pod per worker to achieve a lower latency, however in the code it explicitly looks for a deployment which must be named coredns. A bit more flexibility on that part would be great.

Workarounds

None that I know of.

colearendt commented 3 years ago

Similarly, if you deploy coredns via a helm chart, you end up with a deployment named something like coredns-coredns (or RELEASE-NAME-coredns). This also bypasses the check here, and so makes traefik-mesh not functional.

https://github.com/traefik/mesh/blob/e53767daee443f55338a4ffcf07e66b39afb630f/pkg/dns/client.go#L85

Further, it makes mitigating #787 require deploying coredns directly (i.e. not using helm)

https://github.com/coredns/helm/blob/3bac534c105e6b72e74ea5d9e829b47159b284ff/stable/coredns/templates/_helpers.tpl#L18

Maybe at a minimum making this configurable via an env var / etc. (and then exposing as a value in your helm chart) would give us a workaround to point at deployments / deamonsets, other names, etc.

spurti-chopra commented 3 years ago

Is there anyway to bypass this check ? I am on a managed kubernetes cluster and the image name tag used for coredns deployment is a custom tag without containing exact version string that code is looking for parts := strings.Split(container.Image, ":") Would it be possible to provide a way to consciously avoid this check is such cases ?

der-eismann commented 1 year ago

Closing because it's been 2 years now and we don't use this anyway