-
Notifications
You must be signed in to change notification settings - Fork 573
Add targetRef field to Istio CRDs that use workloadSelector #2885
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
Comments
I would not put it under |
@howardjohn How do we version |
It's basically meaningless. Top level types (like AuthorizationPolicy) need to be identical (in yaml) across all versions. Internal types like workload selector has no relevance for version and probably shouldn't have one at all (but does due to backwards compatible) |
Wanna to know what target do we need to support? If i read correctly from other doc, the target is how could targetref coexist with workload selector if we need to apply a policy both to a workload and service or someother object |
Hey @hzxuzhonghu, I'm not sure I fully understand both of your questions but I'm going to try. Are you referring to the following lines from the doc?
It seems like the main question is "How can targetref coexist with workload selector if we need to also apply policy to a workload and service or other objects"? The document addresses this I believe:
So I think that if NO targetRef is specified, then we'll default to workload selector. BUT if there is a targetRef specified then we'll use that instead. That's how they could co-exist initially. After some number of releases we'll want to switch over to only using targetRef and ignoring label selectors. cc/ @keithmattix (please fill in any details, or correct me if any of this doesn't make sense) |
Uh oh!
There was an error while loading. Please reload this page.
These tasks can be done in one PR or in multiple PRs. Only caveat is that the targetRef proto definition needs to exist first before being added as a field to the different places we want to update, so we'll need to add that as a first step.
add it to istio/api/gateway. Gateway directory will be a new directory[UPDATE] it should be added to istio/api/types. The proto definition should look like what's defined in the gateway api spec for PolicyTargetReference: GEP-713: Metaresources and Policy Attachment_metaresource_ - Kubernetes Gateway API (k8s.io)add targetRef field to ProxyConfig CRD via proto definition, add any necessary docs within the proto fileUPDATE: Decided not to do this, see comment here.Note: Be sure to run make gen-proto locally after a proto update to ensure the necessary protobuf related files are generated. Documentation in the proto is also referenced by some automation in place which will generate docs off of it. Look at some examples like the PR for jwt.proto to see how documentation within the proto can look. Last but not least, be sure to include release notes.
The text was updated successfully, but these errors were encountered: