-
Notifications
You must be signed in to change notification settings - Fork 561
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
Validation: remove CEL for PolicyTargetRef to allow vendor extensions #3414
base: master
Are you sure you want to change the base?
Conversation
…api GatewayClass Signed-off-by: Ian Rudie <[email protected]>
Signed-off-by: Ian Rudie <[email protected]>
Signed-off-by: Ian Rudie <[email protected]>
type/v1beta1/selector.proto
Outdated
// | ||
// When binding to a GatewayClass resource using PolicyTargetReference, your policy must be in the root namespace. | ||
// | ||
// Supported kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway, and gateway.networking.k8s.io/GatewayClass |
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.
This is documented on the individual usages. Like
networking/v1alpha3/envoy_filter.proto
871: repeated istio.type.v1beta1.PolicyTargetReference targetRefs = 6;
We should update those. We might want to only include it there, in case there are per-policy supported types? If we know all will be the same then here is probably good
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.
Good shout. Actually, looking at this more closely it's probably most clear now with no CEL to simply not mention supported group/kind of the PolicyTargetRef message at all. Support likely varies by where it is used and should be mentioned where this message is used going forward.
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.
Would we want to allow binding resources which are not Authorization Policy to a GatewayClass?
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.
I moved supported group/kind from being centralized on the message to being in our higher lever resources where the PolicyTargetRef is used. TBH, after the move I'm feeling less certain about doing it this way but it is an improvement over having inconsistent group/kind information in different contexts.
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.
Overall LGTM
- https://github.com/istio/istio/issues/54696 | ||
releaseNotes: | ||
- | | ||
**Removed** CEL validation of group/kind for PolicyTargetReference to enable vendor extensions |
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.
If we're removing the CEL validation, should we add this to the OSS ValidatingWebhook?
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.
Maybe status, "you tried to bind to a beep.boop.bop.io/beepboop and Istiod has not honored this"
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.
Yeah that would work; just some indication since CEL isn't going to be enforcing it now
…sed in resources Signed-off-by: Ian Rudie <[email protected]>
This PR removes CEL validation from PolicyTargetRef for two primary reasons: