You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using spec.ingressType to select an Ingress class, we should use the default annotation kubernetes.io/ingress.class, since #7 was implemented.
Current Behaviour
In the version 0.4.0, by the docs, we need to define the Ingress class using the spec.ingressType configuration.
BUT
After merging #7 we actually don't need that. I tested two cases:
Empty annotation and spec.ingressType
Deploying the following FunctionIngress without spec.ingressType and without kubernetes.io/ingress.class annotation defaults the Ingress class to nginxand works. I believe this should be considered a bug and specifying an Ingress class should be mandatory.
Deploying the following FunctionIngress without spec.ingressTypebut using the kubernetes.io/ingress.class works like a charm. I believe this should be the default way of doing things.
I usually prefer one and only one way of doing things, if possible, since it leads to less confusion.
In the currency scenario, we already have two ways of picking the class. And even a third way, which is not defining anything (and the class by default is nginx).
It depends also on what is the intended design for the FunctionIngress. Was it made to be as close as possible to an Ingress (since it actually creates one) or to have its own different structure?
Personally, as a user, when I saw the FunctionIngress for the first time, I was expecting it to behave as an Ingress as much as possible.
(I'm loving these discussions btw, thinking about DX is so nice!)
Expected Behaviour
Instead of using
spec.ingressType
to select an Ingress class, we should use the default annotationkubernetes.io/ingress.class
, since #7 was implemented.Current Behaviour
In the version
0.4.0
, by the docs, we need to define the Ingress class using thespec.ingressType
configuration.BUT
After merging #7 we actually don't need that. I tested two cases:
Empty annotation and spec.ingressType
Deploying the following
FunctionIngress
withoutspec.ingressType
and withoutkubernetes.io/ingress.class
annotation defaults theIngress
class tonginx
and works. I believe this should be considered a bug and specifying an Ingress class should be mandatory.Use kubernetes.io/ingress.class annotation
Deploying the following
FunctionIngress
withoutspec.ingressType
but using thekubernetes.io/ingress.class
works like a charm. I believe this should be the default way of doing things.Possible Solution
function.Spec.IngressType
.Context
Using the default K8S annotation to select an Ingress class requires lower learning curve and it's more a standard across other K8S controllers.
The text was updated successfully, but these errors were encountered: