Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add easy option to "arkade install ingress-nginx" to set default IngressClass #983

Closed
afentoe opened this issue Oct 5, 2023 · 5 comments · Fixed by #992
Closed

Add easy option to "arkade install ingress-nginx" to set default IngressClass #983

afentoe opened this issue Oct 5, 2023 · 5 comments · Fixed by #992

Comments

@afentoe
Copy link

afentoe commented Oct 5, 2023

Expected Behaviour

Add an easy option to arkade install ingress-nginx to set it as the default IngressClass.

More info about the use of default ingress class:
https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class

Current Behaviour

When using arkade to install ingress-nginx, the added IngressClass is not set as the default ingress class.

Next, when creating a new Ingress defintion, if ingressClassName (or the deprecated annotation 'kubernetes.io/ingress.class: nginx') is omitted , the ingress is added without any error or warning, but it will not work.
The ingress controller pod logs something like: error="ingress does not contain a valid IngressClass",

To set the IngressClass as the default when using arkade install ingress-nginx, a user would need to run the following command:
arkade install ingress-nginx -n ingress-nginx --set controller.ingressClassResource.default=true

Possible Solutions

Add an easy to use flag for arkade install ingress-nginx, similar to --host-mode.
So something like: arkade install ingress-nginx --set-as-default

Add flag to the help text:

Examples:
  arkade install ingress-nginx --namespace default --set-as-default

Another solution would be to just add this as an example for the --set flags in the help text for install ingress-nginx -h:

      --set stringArray    Use custom flags or override existing flags
                           (example: --set image=org/repo:tag)
                           (example to set as default Ingress Class: --set controller.ingressClassResource.default=true)

But this way, this important setting, is a bit hidden.

Your Environment

  • What Kubernetes distribution are you using?
Client Version: v1.27.6
Kustomize Version: v5.0.1
Server Version: v1.27.6+k3s1
  • Operating System and version (e.g. Linux, Windows, MacOS):
Debian Bookworm
  • What arkade version is this?
Version: 0.10.13
@alexellis
Copy link
Owner

alexellis commented Oct 6, 2023

Hi thanks for the suggestion.

Perhaps should should be on by default, then you can override it to off if you need two ingress controllers.

--default-ingress=true/false

Do you want to work on a PR and we'll take a look?

@afentoe
Copy link
Author

afentoe commented Oct 6, 2023

I think creating a PR will be a bit of a challenge for me, but I can give it a try.

I'll start with the contributing guide and work from there.

@alexellis
Copy link
Owner

@Jasstkn can you take this instead?

@Jasstkn
Copy link
Contributor

Jasstkn commented Oct 10, 2023

@Jasstkn can you take this instead?

Sure, I will take care of it.

@Jasstkn
Copy link
Contributor

Jasstkn commented Oct 15, 2023

wired a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants