Ingress: Detect and deal with missing ingress controller
We need to inform the user that their cluster is not "Ingress" capable. The unfortunate this is that a lack of a IngressClass resource does not mean that there are no ingress controllers. In k3s we have ingress, but there is no IngressClass.
I wonder how often that is the case. If k3s is the outlier, maybe detecting an ingressClass is a good enough check?
I think the whole
We could preemptively create one (for the cluster domain maybe?) as a canary and during init
Related issue: https://github.com/acorn-io/acorn/issues/471
@cjellick I think the default helm install of the ingress-nginx install will add an ingress controller but no watches for objects without ingressClass and doesnt set it as default.
https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L75 https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L113
Yes, with ingress-nginx, you would need to add --ingres-class-name nginx to acorn install to tell us to use it.
@ibuildthecloud Think we could look for ingress classes and if we find exactly one, use it, even if it isn't marked as the default?
So @iwilltry42, during the install process, we want to deploy an ingress in the acron-system namespace and wait to see that its status gets populated with and IP or hostname.
The install output should say something like "Testing ingress capability" and you'll eventually have to timeout (1 or 2 minutes?).
If the ingress test fails, don't fail the install, let the install continue, just warn at the end
@iwilltry42 of all the install testing related issues, this is the most important because it is the one tripping up the most users. please do this one first. Want to make sure this one gets done. Might even ship a patch release for it specifically.
Install now checks that ingress can successfully deploy
@cjellick as a follow up for this: we didn't handle the "deal with it" part of this issue. Should we have an (opt-out) install of traefik during installation if the ingress check failed?
@ibuildthecloud do you want to take ingress a step further and if we detect ingress missing, interactively ask the user if they want us to install traefik for them?
I suspect the install isnt really one-size-fits-all, so maybe better to not get into that?
We've added a check for ingress to the install process, but the last two questions need answered
New thing that has come up recently: if the ingress check fails, @ibuildthecloud wants the cli to direct the user to an article in our help. I tried to knock this out for v0.3.0, but it became unclear to me what he and wanted in the docs beyond what is in https://docs.acorn.io/installation/installing#ingress-and-service-loadbalancers
Then I ran out of time before the release. So, I also need to circle back with Darren on this and see what he's thinking.