-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
agent: move magic concurrency equation to injector #32928
Conversation
ab37cb6
to
3f48f18
Compare
@@ -190,9 +190,9 @@ spec: | |||
{{- if .Values.global.logAsJson }} | |||
- --log_as_json | |||
{{- end }} | |||
{{- if gt .ProxyConfig.Concurrency.GetValue 0 }} | |||
{{- if gt .EstimatedConcurrency 0 }} |
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 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
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 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?
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.
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
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.
Not an expert, but the general suggestion is to use map instead of struct, precisely because of this issue.
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 can backport a dummy variable in a follow up.
/retest |
1 similar comment
/retest |
No description provided.