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

agent: move magic concurrency equation to injector #32928

Merged
merged 5 commits into from
May 19, 2021

Conversation

kyessenov
Copy link
Contributor

No description provided.

@kyessenov kyessenov requested review from a team as code owners May 18, 2021 23:06
@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label May 18, 2021
@istio-testing istio-testing added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 18, 2021
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov force-pushed the injector_remove_requests_limits branch from ab37cb6 to 3f48f18 Compare May 18, 2021 23:08
@kyessenov kyessenov added the release-notes-none Indicates a PR that does not require release notes. label May 18, 2021
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@@ -190,9 +190,9 @@ spec:
{{- if .Values.global.logAsJson }}
- --log_as_json
{{- end }}
{{- if gt .ProxyConfig.Concurrency.GetValue 0 }}
{{- if gt .EstimatedConcurrency 0 }}
Copy link
Member

Choose a reason for hiding this comment

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

Can we check it actually exists? otherwise you may end up with errors like Error creating: admission webhook "namespace.sidecar-injector.istio.io" denied the request: failed to run injection template: template: inject:193:12: executing "inject" at <.EstimatedConcurrency>: can't evaluate field EstimatedConcurrency in type *inject.SidecarTemplateData if injector configmap != istiod version.

In theory it shouldn't happen but it always gets a few users

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's possible since we can't add another function either and structs don't have presence checks in golang. Do you have any suggestion?

Copy link
Member

Choose a reason for hiding this comment

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

Wow that is pretty annoying, I thought you could. Maybe we can just backport the new field to 1.10.1 to make it less likely to occur. this is probably fine - in theory they should be in sync anyhow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not an expert, but the general suggestion is to use map instead of struct, precisely because of this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can backport a dummy variable in a follow up.

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Contributor Author

/retest

1 similar comment
@kyessenov
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. release-notes-none Indicates a PR that does not require release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants