HeaderMatchType(s) too restrictive? #2576
Replies: 3 comments 7 replies
-
Since the regular expression can mimic the prefix and contains way, what's your concern about using the regular expression? Performance? |
Beta Was this translation helpful? Give feedback.
-
With every match type we add, we try to ensure there's a path to portability. For example, if a majority of envoy, haproxy, and nginx could support a match type and there was some kind of evidence of widespread usage of those features, that would be a good signal towards inclusion in the API. I haven't looked into these specific match types, but if they meet the criteria I mentioned above, I'd say it would be worth a small GEP to add these to the API. |
Beta Was this translation helpful? Give feedback.
-
I agree that it would be better to make this more extensible - but if we're going to allow other values, I think we should use the domain-prefixed string pattern, and reserve barewords for Gateway API reserved words. So, All other barewords would be reserved for future expansion - with the intent that |
Beta Was this translation helpful? Give feedback.
-
Intro
Description for context https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HeaderMatchType
Problem
Should we relax validation on HeaderMatchType? I think Exact and RegularExpression is reasonable baseline. But at the same time implementation might provide more options beyond these 2.
We are implementing Gateway-API for AWS Lattice, and lattice supports Contains and Prefix options for HeaderTypes (ref). So now we have a dilemma how to approach this. Either create a very limited RegularExpression that will mimic Prefix and Contains, or CRDs. Both do not sound right.
Are there other options?
My thinking is that HeaderMatchType should not be restricted to these 2 options. The rule should be "At Least Exact and RegularExpression", but not "Only Exact and RegularExpression". Which also fits into second part of the documentation, we should anticipate new and Unknown types:
Beta Was this translation helpful? Give feedback.
All reactions