My traefik ingress is in certain namespace and I need it to point to a service in a different namespace.
However, I don’t find the right syntax or the right way to tell terraform that that service is in another namespace. The service I am trying to point to is anchore-engine, which is in a namespace called anchore.
When I tried:
service_name = "anchore-engine.anchore" I received the following error:
Error: Failed to update Ingress traefik because: Ingress.extensions "traefik" is invalid: spec.rules.http.backend.serviceName: Invalid value: "anchore-engine.anchore": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
I guess that it is taking “anchore-engine.anchore” as the name of the service, instead of interpretating it as service.namespace, as K8S does.
How can I do this? Could you give me a hand? Thank you so much!