-
Notifications
You must be signed in to change notification settings - Fork 558
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: add CEL validation to workload entry #3235
Conversation
eb8ecaf
to
b06e569
Compare
@@ -554,6 +554,7 @@ message ServiceEntry { | |||
|
|||
// One or more endpoints associated with the service. Only one of | |||
// `endpoints` or `workloadSelector` can be specified. | |||
// +kubebuilder:validation:MaxItems=4096 |
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 allow 4096 endpoints, then the workloadEntry must exceed the max size limit of a object from etcdm, which is likely 1.5MB
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.
right now we allow infinity. So this is only making it more restrictive, not less
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 know, could we strict limit it. In real scenario, can limit to 128. If more endpoints associated, we should encourage to use workloadentry separately
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 I was building today I would just do not want to break existing users if they have a lot?
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.
LGTM
@@ -554,6 +554,7 @@ message ServiceEntry { | |||
|
|||
// One or more endpoints associated with the service. Only one of | |||
// `endpoints` or `workloadSelector` can be specified. | |||
// +kubebuilder:validation:MaxItems=4096 |
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.
We should add documentation around it too. I don't expect folks to have so many entries but we should document our limits clearly.
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.
LGTM
No description provided.