Autodevops ingress doesn't work when external-dns deployed in the cluster

Summary

When using the ingress installed from the Kubernetes Integration in GitLab, and using the auto-dev-ops chart, the ingress resources are being assigned the wrong external IP. Instead of the load-balancer IP, they are getting assigned their node's IP.

This results in errors with using something like external-dns, which relies on those ingress IPs for the DNS entries it creates.

If you have external-dns deployed in your cluster, it will be creating DNS entries for the audo-dev-ops app, and those entries will take priority over any wildcard you may have specified for the auto-deploy apps.

Steps to reproduce

  • Connect an auto-dev-ops project to a cluster with the external-dns chart installed/configured (I was using it configured to use Google Cloud DNS)
  • Attempt a deploy to production

Results of GitLab environment info

GitLab 11.11.0, deployed on Kubernetes 1.12

Possible fixes

This issue has come up several times for the nginx-ingress upstream repo:

It looks like we need to enable the publishService, but I'm not familiar with the impact of doing so