-
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
Add WorkloadSelector definition in a common directory. #1032
Conversation
|
||
##################### | ||
# Generation Rules | ||
##################### | ||
|
||
generate: \ | ||
generate-type \ |
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 think this needs to be tab instead of whitespaces.
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.
Done.
|
||
option go_package="istio.io/api/type/v1beta1"; | ||
|
||
// WorkloadSelector specifies the criteria used to determine if a policy can be applied |
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 you want to hide the doc, I think you also need $hide_from_docs here.
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.
Done.
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.
Can you also update the EnvoyFilter to use this workload selector [and update the comments in envoyfilter accordingly] ? The workloadSelector there has not been released yet.
There is a workloadSelector in the Sidecar.proto.. Please remove it and make the sidecar refer to this. Since the sidecar uses workloadSelector.labels, i suggest you add a labels field in this proto and mark it as deprecated.
In the implementation, its as simple as copying the value from the existing labels field into the new matchLabels field.
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 will do EnvoyFilter/Sidecar proto change in a separate PR.
cue.yaml
Outdated
@@ -7,6 +7,8 @@ openapi: | |||
fieldFilter: "min.*|max.*" | |||
|
|||
directories: | |||
type/v1beta1: | |||
- mode: all |
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 think it's better to use perFile
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.
Done.
Do we have a plan to migrate the other selectors to this ? Is it identical
with any of the in-use selectors ? Did the TOC agree to deprecate the
3 selector APIs and switch to this one ( or to have 4 selector methods ) ?
I would really like to see an official TOC review and decision on the
deprecation or migration to new selector.
…On Fri, Aug 9, 2019 at 5:19 PM Limin Wang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Makefile.core.mk
<#1032 (comment)>:
>
#####################
# Generation Rules
#####################
generate: \
+ generate-type \
Done.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1032?email_source=notifications&email_token=AAAUR2TN3MLZ47TBKCCYBULQDYCQRA5CNFSM4IKYBHK2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCBF4KLQ#discussion_r312681088>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAUR2SEYFDNBSVRPSJX7SDQDYCQRANCNFSM4IKYBHKQ>
.
|
@costinm I think there is consensus we need a common "selector" definition. This PR just added one following Istio Config Model. In sidecar
In Gateway,
As @rshriram commented in this PR, if we choose consistency, some form of deprecation cannot be avoided. I don't care too much about the exact naming, as long as there is consensus. Since we are introducing beta API now, I think it is important to make sure API stability and consistency. @louiscryan Any recommendation? |
type/v1beta1/selector.proto
Outdated
|
||
option go_package="istio.io/api/type/v1beta1"; | ||
|
||
// $hide_from_docs |
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.
no hide from docs if this is going to be used by Sidecar/envoyfilter etc.
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.
Done.
No description provided.