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

[YUNIKORN-3000] Add support for setting GOGC / GOMEMLIMIT in Helm chart #185

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions helm-charts/yunikorn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ The following table lists the configurable parameters of the YuniKorn chart and
| `admissionController.resources.requests.memory` | Admission controller memory resource requests | `500Mi` |
| `admissionController.resources.limits.cpu` | Admission controller CPU resource limit | `500m` |
| `admissionController.resources.limits.memory` | Admission controller memory resource limit | `500Mi` |
| `admissionController.goMemoryLimit` | Admission controller memory limit (GOMEMLIMIT) | `200MiB` |
| `admissionController.goGC` | Admission controller GC threshold (GOGC) | `100` |
| `admissionController.nodeSelector` | Admission controller deployment nodeSelector(s) | `{}` |
| `admissionController.tolerations` | Admission controller deployment tolerations | `[]` |
| `admissionController.affinity` | Admission controller deployment affinity | `{}` |
Expand All @@ -99,13 +101,17 @@ The following table lists the configurable parameters of the YuniKorn chart and
| `resources.requests.memory` | Memory resource requests | `1Gi` |
| `resources.limits.cpu` | CPU resource limit | `4` |
| `resources.limits.memory` | Memory resource limit | `2Gi` |
| `goMemoryLimit` | Memory limit (GOMEMLIMIT) | `1536MiB` |
| `goGC` | GC threshold (GOGC) | `100` |
| `web.image.repository` | Web app image repository | `apache/yunikorn` |
| `web.image.tag` | Web app image tag | `web-latest` |
| `web.image.pullPolicy` | Web app image pull policy | `Always` |
| `web.resources.requests.cpu` | Web app CPU resource requests | `100m` |
| `web.resources.requests.memory` | Web app memory resource requests | `100Mi` |
| `web.resources.limits.cpu` | Web app CPU resource limit | `200m` |
| `web.resources.limits.memory` | Web app memory resource limit | `500Mi` |
| `web.goMemoryLimit` | Web app memory limit (GOMEMLIMIT) | `200MiB` |
| `web.goGC` | Web app GC threshold (GOGC) | `100` |
| `embedAdmissionController` | Flag for enabling/disabling the admission controller | `true` |
| `enableSchedulerPlugin` | Flag for enabling/disabling scheduler plugin mode | `false` |
| `enableWebService` | Flag for enabling/disabling web service | `true` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: GOMEMLIMIT
value: "{{ .Values.admissionController.goMemoryLimit }}"
- name: GOGC
value: "{{ .Values.admissionController.goGC }}"
ports:
- containerPort: 9089
name: webhook-api
Expand Down
9 changes: 9 additions & 0 deletions helm-charts/yunikorn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: GOMEMLIMIT
value: "{{ .Values.goMemoryLimit }}"
- name: GOGC
value: "{{ .Values.goGC }}"
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.schedulerSecurityContext }}
Expand All @@ -111,6 +115,11 @@ spec:
- name: http2
containerPort: {{ .Values.service.portWeb }}
protocol: TCP
env:
- name: GOMEMLIMIT
value: "{{ .Values.web.goMemoryLimit }}"
- name: GOGC
value: "{{ .Values.web.goGC }}"
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- with .Values.webSecurityContext }}
Expand Down
12 changes: 12 additions & 0 deletions helm-charts/yunikorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ admissionController:
limits:
cpu: 500m
memory: 500Mi
goMemoryLimit: 200MiB
goGC: 100
nodeSelector: {}
tolerations: []
affinity: {}
Expand All @@ -81,6 +83,8 @@ web:
limits:
cpu: 200m
memory: 500Mi
goMemoryLimit: 200MiB
goGC: 100

service:
type: ClusterIP
Expand All @@ -105,6 +109,14 @@ resources:
cpu: 4
memory: 2Gi

# Go memory limit (GOMEMLIMIT) for the scheduler. This should be updated in tandem with
# resources.limits.memory to avoid OOMKilled scenarios.
goMemoryLimit: 1536MiB

# Go garbage-collection threshold (GOGC) as a percentage of freshly allocated data to
# live data remaining after the previous GC.
goGC: 100

# Bootstrap configuration for YuniKorn - will be rendered into yunikorn-defaults ConfigMap.
# Any valid options for YuniKorn may be specified here.
# Example:
Expand Down
Loading