runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Ingress: Detect and deal with missing ingress controller

Open ibuildthecloud opened this issue 3 years ago • 12 comments

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.

ibuildthecloud avatar Aug 07 '22 02:08 ibuildthecloud

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 on endpoints needs better debug info in general

cjellick avatar Aug 07 '22 03:08 cjellick

We could preemptively create one (for the cluster domain maybe?) as a canary and during init

vincent99 avatar Aug 07 '22 03:08 vincent99

Related issue: https://github.com/acorn-io/acorn/issues/471

cjellick avatar Aug 07 '22 03:08 cjellick

@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

fsdaniel avatar Aug 07 '22 21:08 fsdaniel

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?

cjellick avatar Aug 09 '22 15:08 cjellick

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?).

cjellick avatar Aug 12 '22 22:08 cjellick

If the ingress test fails, don't fail the install, let the install continue, just warn at the end

cjellick avatar Aug 12 '22 22:08 cjellick

@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.

cjellick avatar Aug 12 '22 22:08 cjellick

Install now checks that ingress can successfully deploy

cjellick avatar Sep 01 '22 23:09 cjellick

@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?

iwilltry42 avatar Sep 02 '22 06:09 iwilltry42

@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?

cjellick avatar Sep 02 '22 20:09 cjellick

I suspect the install isnt really one-size-fits-all, so maybe better to not get into that?

cjellick avatar Sep 02 '22 20:09 cjellick

We've added a check for ingress to the install process, but the last two questions need answered

cjellick avatar Oct 05 '22 16:10 cjellick

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.

cjellick avatar Oct 06 '22 19:10 cjellick