Replies: 10 comments 17 replies
-
We could introduce a PolicyBinding resource that every implementation of Policy Attachment would be responsible for publishing. Every time a policy attachment was implemented, the implementation would also publish a PolicyBinding resource that described the following:
This would enable anyone to run |
Beta Was this translation helpful? Give feedback.
-
We could put more effort into tools to visualize the full Gateway API resource graph present in a cluster, including attached policies. For example, https://github.com/michaelvl/gateway-api-lens provides a great example of this kind of approach. |
Beta Was this translation helpful? Give feedback.
-
We could develop a kubectl plugin that could do at least some of the following:
|
Beta Was this translation helpful? Give feedback.
-
We could introduce a standard section to status of all Gateway API resources that shows which policies have been applied to the resource or section of that resource. At least for Routes, this would need to be namespaced by at least controller name/parentRef in the same way the rest of Route status is. |
Beta Was this translation helpful? Give feedback.
-
We could introduce a new element in GatewayClass status that could be used to publish the kinds of policies supported by a GatewayClass. |
Beta Was this translation helpful? Give feedback.
-
Related to #2012 (comment) and #2012 (comment) would be a new field on GatewayClass/Gateway/*Route resources that would allow the resource owner to specify what policies are allowed to be bound to a particular resource, similar in concept to Gateway Listener allowedRoutes This could be combined with the linked ideas and may alleviate some of the concerns from #2015 |
Beta Was this translation helpful? Give feedback.
-
Already linked to the above comments, but shameless plug for my earlier discussion which relates to this one: #1531 Particularly I'm fond of proposing the idea of adding |
Beta Was this translation helpful? Give feedback.
-
Take a look at the PR @kflynn recently posted which is relevant: I know this topic is going to be at least a little controversial because it suggests a significant pivot, but I personally find this juxtaposition very persuasive and compelling: what if we can solve the problem by partially not having the problem? I would definitely encourage people to chime in there as I think it's a very worthwhile discussion. |
Beta Was this translation helpful? Give feedback.
-
A couple of other ideas I thought of recently: We could mandate that implementations that support any Policy objects have a Validating Admission Webhook that will return a message (warning maybe?) when an applied object is affected by some Policy, which may be an inherited or indirect one. Pro:
Cons:
This is less of a good idea (too many cons), but for completeness: We could also suggest that, for Policies that affect fields inside an object, they include a Mutating Admission controller that would update the applied object with the settings generated by the resultant set of policy. Pro:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
With the Policy that we have had in our Ingress CRDs for the past few years we handle the attach at the equivalent of the Route level. The business problem is that the Policy author needs a way to attest to their Policy being applied. In our case we use Policy as a way to handle WAF rules, AuthN / AuthZ, mTLS, etc. |
Beta Was this translation helpful? Give feedback.
-
The Gateway API policy attachment model is the primary extension mechanism of the API. Unfortunately we have not yet provided a good way for users to discover policies that are available or applicable to their Gateway API resources or a good way for implementations to communicate that. Starting a discussion to gather ideas for how we can improve this. I'll start it off with a few ideas we've already talked about, but please don't hesitate to add your own ideas here.
Beta Was this translation helpful? Give feedback.
All reactions