-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(helm): default proxy-init resource requests to proxy values #12741
Conversation
Default values for `linkerd-init` (resources allocated) are not always the right fit. We offer default values to ensure proxy-init does not get in the way of QOS Guaranteed (`linkerd-init` resource limits and requests cannot be configured in any other way). Instead of using default values that can be overridden, we can re-use the proxy's configuration values. For the pod to be QOS Guaranteed, the values for the proxy have to be set any way. If we re-use the same values for proxy-init we can ensure we'll always request the same amount of CPU and memory as needed. * `linkerd-init` now defaults to the proxy's values * when the proxy has an annotation configuration for resource requests, it also impacts `linkerd-init` * Helm chart and docs have been updated to reflect the missing values. * tests now no longer use `ProxyInit.Resources` UPGRADE NOTE: - Deprecates `proxyInit.resources` field in the Helm values. - It will be a no-op if specified (no hard failures) Signed-off-by: Matei David <matei@buoyant.io>
Signed-off-by: Matei David <matei@buoyant.io>
Signed-off-by: Matei David <matei@buoyant.io>
…ntainer-resources
Signed-off-by: Matei David <matei@buoyant.io>
{{- if not (empty .Values.destinationProxyResources) }} | ||
{{- $c := dig "cores" .Values.proxy.cores .Values.destinationProxyResources }} | ||
{{- $_ := set $tree.Values.proxy "cores" $c }} | ||
{{- $r := merge .Values.destinationProxyResources .Values.proxy.resources }} | ||
{{- $_ := set $tree.Values.proxy "resources" $r }} | ||
{{- end }} |
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.
IIUC, although this move wasn't strictly necessary it's cleaner to have these on a more global "scope" given it applies to both the proxy and linkerd-init, right? If so, why not doing the same for the identity workload?
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.
The simple answer is...I forgot 😅 good spot! fixed now.
Signed-off-by: Matei David <matei@buoyant.io>
…ntainer-resources
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.
Thanks for the detailed instructions; this looks good to me! 👍
Default values for
linkerd-init
(resources allocated) are not always the right fit. We offer default values to ensure proxy-init does not get in the way of QOS Guaranteed (linkerd-init
resource limits and requests cannot be configured in any other way).Instead of using default values that can be overridden, we can re-use the proxy's configuration values. For the pod to be QOS Guaranteed, the values for the proxy have to be set any way. If we re-use the same values for proxy-init we can ensure we'll always request the same amount of CPU and memory as needed.
linkerd-init
now defaults to the proxy's valueslinkerd-init
ProxyInit.Resources
UPGRADE NOTE:
proxyInit.resources
field in the Helm values.Closes #11320
Notes to reviewers:
You can test by building and then installing Linkerd:
Test cases
We expect to see:
Now, if we update and set proxy resources we should see other deployments inherit it:
We expect:
10m
cpu requests and limits for proxy and proxy-initAnd finally, we can override this with an annotation. We expect to see: