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

do not treat kong as a special class #731

Closed
hbagdi opened this issue Jun 15, 2020 · 3 comments
Closed

do not treat kong as a special class #731

hbagdi opened this issue Jun 15, 2020 · 3 comments
Assignees
Milestone

Comments

@hbagdi
Copy link
Member

hbagdi commented Jun 15, 2020

The current behavior treats “kong” as a special ingress.class: if controller is configured with ingress class as “kong”, it will also satisfy all ingress resources which don’t have an Ingress class defined. If an ingress class is not specified in the controller and an ingress resource has “kong” as its ingress class, then the controller takes control of the resource.

The scope of the work:

  • remove the special treatment
  • set the class to kong be default.
  • this should be an effect automatically based on the above two changes, but if not, then: controller should ignore all ingress v1beta1 resources which do not have an ingress.class annotation set to "kong".

For more details see the doc in #690.

@rainest
Copy link
Contributor

rainest commented Aug 19, 2020

AFAIK implementing #732 does this. kong is already the default per https://github.com/Kong/kubernetes-ingress-controller/blob/0.9.1/internal/ingress/annotations/annotations.go#L49 (which is then used in flags.go), and I don't think we have special treatment other than allowing classless ingresses when kong was the controller class.

With the addition of fb3ab86 to #767 that's the case.

To try and check this, I changed instances of kong in

{"", false, "", true},
{"", false, "kong", true},
{"", true, "kong", false},
{"kong", false, "kong", true},
{"kong", true, "kong", true},
{"custom", false, "custom", true},
{"", false, "killer", false},
{"custom", false, "kong", false},
{"custom", true, "kong", false},
{"", true, "custom", false},
to some other string, and didn't see any change in test results. We can stick a few extra non-kong expected success cases in there if we like.

@rainest
Copy link
Contributor

rainest commented Aug 20, 2020

ListKnativeIngresses is one exception because it uses a special validKnativeIngressClass function that hard-codes lazy/allow empty matching if using the default class, which I think does violate the spirit of #731 if not the letter (who cares if we change the default class and it's special behavior for for "mycoolnewdefault" instead of "kong"?), so that probably needs to change.

Do we care if that's controlled with a flag and/or preserves the default behavior (always allow empty if using the default class)? I'd like to use annotations validity function and the value of the Ingress matching flag, i.e. if you set --process-classless-ingress-v1beta1 it applies to both Ingress and KNative "ingresses", but I think that breaks down because the flags are versioned, and ingresses.networking.internal.knative.dev doesn't track Ingress.

@rainest
Copy link
Contributor

rainest commented Aug 31, 2020

Closing per #815 and #767

@rainest rainest closed this as completed Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants