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

feat: allow to set default ingressclass #992

Merged

Conversation

Jasstkn
Copy link
Contributor

@Jasstkn Jasstkn commented Oct 15, 2023

Description

allows to set default ingress class. useful in case of multiple nginx ingress controllers.
fixes #983

Motivation and Context

  • I have raised an issue to propose this change, which has been given a label of design/approved by a maintainer (required)

How Has This Been Tested?

If updating or adding a new CLI to arkade get, run:

$ ./arkade install nginx-ingress
...

$ k describe ingressclass nginx
Name:         nginx
Labels:       app.kubernetes.io/component=controller
              app.kubernetes.io/instance=ingress-nginx
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=ingress-nginx
              app.kubernetes.io/part-of=ingress-nginx
              app.kubernetes.io/version=1.9.3
              helm.sh/chart=ingress-nginx-4.8.2
Annotations:  ingressclass.kubernetes.io/is-default-class: true
              meta.helm.sh/release-name: ingress-nginx
              meta.helm.sh/release-namespace: default
Controller:   k8s.io/ingress-nginx
Events:       <none>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Documentation

  • I have updated the list of tools in README.md if (required) with ./arkade get --format markdown
  • I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have tested this on arm, or have added code to prevent deployment

Signed-off-by: Mariia Kotliarevskaia <jasstkn.051@gmail.com>
@@ -28,6 +28,7 @@ flag and the ingress-nginx docs for more info`,
nginx.Flags().StringP("namespace", "n", "default", "The namespace used for installation")
nginx.Flags().Bool("update-repo", true, "Update the helm repo")
nginx.Flags().Bool("host-mode", false, "If we should install ingress-nginx in host mode.")
nginx.Flags().Bool("default-ingress", true, "Is this the default ingressClass for the cluster?")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set this as default isn't this a backward incompatible change?

I think it would be better with default false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but what's the point for it being false? i thought that idea is to preconfigure application to be up&fully functional for development/testing purposes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, your approach makes more sense, if we have no promise for backward compatibility (which afaik we doesn't) you are right, it is better this way then.

@alexellis alexellis merged commit 1208cd8 into alexellis:master Feb 24, 2024
2 checks passed
@alexellis
Copy link
Owner

Thanks both

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 this pull request may close these issues.

Add easy option to "arkade install ingress-nginx" to set default IngressClass
3 participants