Skip to content

[Addon] velaux allow a custom ingress class name - #741

Open
oanasc wants to merge 1 commit into
kubevela:masterfrom
oanasc:test
Open

oanasc wants to merge 1 commit into
kubevela:masterfrom
oanasc:test

Conversation

@oanasc

@oanasc oanasc commented Nov 24, 2023 •

Copy link
Copy Markdown
Contributor

Description of your changes

Fixes ##739

How has this code been tested?

Enabled the modified addon locally and ensured I can specify the gatewayDriver with a custom name and that is correctly used in the ingressClass annotation the ingress works.

Checklist

I have:

  • Title of the PR starts with type (e.g. [Addon] , [example] or [Doc]).
  • Updated/Added any relevant documentation and examples.
  • New addon should be put in experimental.
  • Update addon should modify the version in metadata.yaml to generate a new version.

Verified Addon promotion rules

If this pr wants to promote an experimental addon to verified, you must check whether meet these conditions too:

  • This addon must be tested by addon's e2e-test to guarantee this addon can be enabled successfully.
  • This addon must have some basic but necessary information.
    • An accessible icon url and source url defined in addon's metadata.yaml.
    • A detail introduction include a basic example about how to use and what's the benefit of this addon in README.md.
    • Also provide an introduction in KubeVela documentation.
    • It's more likely to be accepted if useful examples provided in example dir.

@oanasc
oanasc requested a review from barnettZQG as a code owner November 24, 2023 14:46
Comment thread addons/velaux/resources/server.cue Outdated
"/": 8000
}
class: "nginx"
class: parameter["ingressClass"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe you can reuse the gatewayDriver field.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Noted, updated to use gatewayDriver and works on my cluser. The e2e test however is timing out, seeing why

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tests are failing because the version of the addon is also used for the image tag, do you prefer creating a new tag v1.9.4 or parameterising the image tag and allow for addons upgrades independently from velaux

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@charlie0129 what do you think. I get is nice for the tag/version of addon to map but in reality there can be addon changes with not image release

@oanasc oanasc changed the title velaux ingress expose ingress class name parameter [Addon] velaux allow a custom ingress class name Jan 15, 2024
@oanasc
oanasc requested a review from wonderflow January 15, 2024 18:16
Comment thread addons/velaux/resources/server.cue Outdated

_nginxTrait: *[
if parameter["domain"] != _|_ && parameter["gatewayDriver"] == "nginx" {
if parameter["domain"] != _|_ && parameter["gatewayDriver"] != "traefik" {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why != traefik go the logic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The addon chart allows for gatewayDriver nginx or traefik and assumes that is going to be the name of the className, for nginx it then adds the annotation kubernetes.io/ingress.class. In a cluster with several ingress controllers however we need a way to set the value for the IngressClass name.
If that's not acceptable I can add a new parameter for ingress class name.

@briankane briankane mentioned this pull request Nov 22, 2026
1 of 3 tasks
@briankane briankane added type/feature New feature or request area/velaux VelaUX addon labels Nov 22, 2026
The nginx gateway trait always used the "nginx" ingress class. A new
ingressClassName parameter overrides it, in velaux and velaux-prerelease.

Fixes kubevela#739

Signed-off-by: Brian Kane <briankane1@gmail.com>
@briankane

Copy link
Copy Markdown
Member

Thanks @oanasc, and apologies, you answered everything and then heard nothing. I've picked this up on your branch: squashed and rebased onto master (#788 had moved the trait list), and rather than opening up gatewayDriver I added an ingressClassName parameter, so the gateway driver dropdown in VelaUX stays as it was. No version bump (it's the image tag, as you said). You're still the author on the commit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/velaux VelaUX addon type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants