Skip to content
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

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

howardjohn
Copy link
Member

No description provided.

@howardjohn howardjohn added the release-notes-none Indicates a PR that does not require release notes. label Jun 11, 2024
@howardjohn howardjohn requested a review from a team as a code owner June 11, 2024 22:30
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 11, 2024
@howardjohn howardjohn added do-not-merge/hold Block automatic merging of a PR. and removed do-not-merge/hold Block automatic merging of a PR. labels Jun 11, 2024
@@ -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
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

@nrjpoddar nrjpoddar left a 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
Copy link
Member

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.

Copy link
Member

@linsun linsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@istio-testing istio-testing merged commit b960de3 into istio:master Jul 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants