Skip to content

Update memory and add cpu requests to deployment configs#1920

Draft
juliawu wants to merge 2 commits into
datacommonsorg:masterfrom
juliawu:mixer-deployment-testing
Draft

Update memory and add cpu requests to deployment configs#1920
juliawu wants to merge 2 commits into
datacommonsorg:masterfrom
juliawu:mixer-deployment-testing

Conversation

@juliawu
Copy link
Copy Markdown
Contributor

@juliawu juliawu commented Jun 4, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the mixer Helm chart to support dynamic configuration of ESP container resources (CPU and memory) globally or per service group, standardizes memory units to "Gi", and adds CPU requests across several service groups. Feedback suggests simplifying the ESP resource assignment logic in deployment.yaml by removing redundant conditional checks, as $.Values.esp is already guaranteed to be defined.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +354 to +369
{{- $espResources := $group.espResources | default dict }}
{{- $espGlobalResources := dict }}
{{- if $.Values.esp }}
{{- $espGlobalResources = $.Values.esp.resources | default dict }}
{{- end }}
resources:
limits:
memory: "300M"
memory: {{ $espResources.memoryLimit | default $espGlobalResources.memoryLimit | default "300M" | quote }}
{{- if or $espResources.cpuLimit $espGlobalResources.cpuLimit }}
cpu: {{ $espResources.cpuLimit | default $espGlobalResources.cpuLimit | quote }}
{{- end }}
requests:
memory: "300M"
memory: {{ $espResources.memoryRequest | default $espGlobalResources.memoryRequest | default "300M" | quote }}
{{- if or $espResources.cpuRequest $espGlobalResources.cpuRequest }}
cpu: {{ $espResources.cpuRequest | default $espGlobalResources.cpuRequest | quote }}
{{- end }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

We can simplify the ESP resources assignment and ensure consistency with the memory units.

  1. Simplify template logic: Since $.Values.esp is guaranteed to be a map (as its nested fields like $.Values.esp.image.repository are accessed directly on line 352 without guards), we can safely access $.Values.esp.resources directly without the conditional if block and variable reassignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant