ori-edge / k8s_gateway

A CoreDNS plugin to resolve all types of external Kubernetes resources
Apache License 2.0
316 stars 65 forks source link

Multiple domains don't work on in helm chart #53

Open btrepp opened 3 years ago

btrepp commented 3 years ago

This is an amazing plugin. Incredibly useful.

I think the template substitution may cause grief in the helm chart when specifying multiple domains.

        domain:
          mydomain.com

works fine

        domain:
          mydomain.com myseconddomain.com

causes both to fail.

I believe it is because the configmap is generated like so

k8s_gateway "mydomain.com" {
      apex k8s-gateway.infra-system
      ttl 300
    }

and

k8s_gateway "mydomain.com myseconddomain.com" {
      apex k8s-gateway.infra-system
      ttl 300
    }

Workaround: editing the configmap in the second case to not have quotes. E.g.

k8s_gateway mydomain.com myseconddomain.com {
      apex k8s-gateway.infra-system
      ttl 300
    }

works perfectly, but does mean it needs to be edited by hand after the helm deploy :).

Note: I'm deploying this using argocd, so unsure if that is maybe interfering as well. I would think not, but worth mentioning.

networkop commented 3 years ago

could be it just a matter of removing " in this line? https://github.com/ori-edge/k8s_gateway/blob/aaa1863e2df9b08aee0eb5a4a8d59e7b48b01faa/charts/k8s-gateway/templates/configmap.yaml#L23

@btrepp do you want to test to see if it works?

btrepp commented 3 years ago

Bit of a noob on this but will do when I get a chance :)

Oznup commented 2 years ago

Hello, I have the same need, so this "simple" evolution could really be cool :)