Skip to content

Commit

Permalink
Adding Gomemlimit to fix slow memory leak (#136)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben <[email protected]>
  • Loading branch information
slashben authored Jan 8, 2024
1 parent 2c64616 commit 35c419f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 5 additions & 1 deletion chart/kubecop/templates/deamonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.kubecop.resources | nindent 12 }}
env:
{{- if .Values.kubecop.gomemlimit.enabled }}
- name: GOMEMLIMIT
value: "{{ .Values.kubecop.gomemlimit.limit }}"
{{- end }}
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down
21 changes: 13 additions & 8 deletions chart/kubecop/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ nameOverride: ""
fullnameOverride: "kubecop"

kubecop:
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
gomemlimit:
enabled: true
# It is recommended to set this value to 3/4 of the memory limit
limit: 384Mi
recording:
samplingInterval: 60s
finalizationDuration: 900s
Expand Down Expand Up @@ -49,7 +60,7 @@ clamAV:
resources:
limits:
cpu: 300m
memory: 400Mi
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
Expand All @@ -76,13 +87,7 @@ securityContext:

securityContextNormal: {}

resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 256Mi



nodeSelector: {}
Expand Down

0 comments on commit 35c419f

Please sign in to comment.