-
Notifications
You must be signed in to change notification settings - Fork 163
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
Ingress Hostname and Path collision at Tenant level #366
Conversation
ec8b798
to
09f183e
Compare
Hi Dario! Thanks a lot for the great work - this ability to check also for path in collisions is what we are looking for! The only thing I want to mention, so we won't forget it when this will be merged - we had to update https://github.com/clastix/capsule-proxy/tree/master/internal/modules/ingressclass, as tenant spec changed |
Thanks @MaxFedotov, I totally forgot it: should be easy to achieve, BTW. Going to open an issue on proxy side referencing your comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
09f183e
to
a19493c
Compare
1ec5eaf
to
9b098b4
Compare
9b098b4
to
2cb4abf
Compare
2cb4abf
to
24dce6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prometherion
noted that when collision is detected, the error message does not return the colliding ingress, "STDIN"
is reported instead.
Error from server (hostname web.uno.fastcloud.it is already used across the cluster: please, reach out to the system administrators): error when creating "STDIN": admission webhook "ingress.capsule.clastix.io" denied the request: hostname web.uno.fastcloud.it is already used across the cluster: please, reach out to the system administrators
Also the collision events are not recorded in kubectl describe tnt <tenant>
24dce6e
to
bdf5e0b
Compare
We had a bug in the Event recording, fixed with last commit. |
Events are now emitted and collected
|
Unfortunately, still see the Ingress referenced as
|
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prometherion LGTM, great work!
Closes #358.
On
CapsuleConfiguration
API side, the collision flags have been removed since this is going to be managed at Tenant level, also for the Tenant allowed hostnames.Now the collision check is taking care also of the path, allowing creating several Ingress but with different path since it's a quite common pattern due to some limitations of specific Ingress Controller.
Last but not least, on
v1beta
a newIngressOptions
struct has been implemented, grouping allowed IngressClass, allowed hostnames, and the new scope feature (backported tov1alpha1
too with the annotationingress.capsule.clastix.io/hostname-collision-scope
accepting one of the enum valuesCluster
,Tenant
,Namespace
,Disabled
, this latter one the default).