Add lifecycle hook and option to enable mimalloc
This commit is contained in:
parent
42fcc076b9
commit
f86b0cdbba
3 changed files with 27 additions and 3 deletions
|
@ -110,6 +110,10 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.controller.enableMimalloc }}
|
||||
- name: LD_PRELOAD
|
||||
value: /usr/local/lib/libmimalloc.so
|
||||
{{- end }}
|
||||
{{- if .Values.controller.extraEnvs }}
|
||||
{{- toYaml .Values.controller.extraEnvs | nindent 12 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -113,6 +113,10 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.controller.enableMimalloc }}
|
||||
- name: LD_PRELOAD
|
||||
value: /usr/local/lib/libmimalloc.so
|
||||
{{- end }}
|
||||
{{- if .Values.controller.extraEnvs }}
|
||||
{{- toYaml .Values.controller.extraEnvs | nindent 12 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -188,8 +188,9 @@ controller:
|
|||
# topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
## terminationGracePeriodSeconds
|
||||
## wait up to five minutes for the drain of connections
|
||||
##
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 300
|
||||
|
||||
## Node labels for controller pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
|
@ -245,6 +246,11 @@ controller:
|
|||
targetCPUUtilizationPercentage: 50
|
||||
targetMemoryUtilizationPercentage: 50
|
||||
|
||||
## Enable mimalloc as a drop-in replacement for malloc.
|
||||
## ref: https://github.com/microsoft/mimalloc
|
||||
##
|
||||
enableMimalloc: false
|
||||
|
||||
## Override NGINX template
|
||||
customTemplate:
|
||||
configMapName: ""
|
||||
|
@ -427,8 +433,18 @@ controller:
|
|||
# description: Too many 4XXs
|
||||
# summary: More than 5% of the all requests did return 4XX, this require your attention
|
||||
|
||||
|
||||
lifecycle: {}
|
||||
## Improve connection draining when ingress controller pod is deleted using a lifecycle hook:
|
||||
## With this new hook, we increased the default terminationGracePeriodSeconds from 30 seconds
|
||||
## to 300, allowing the draining of connections up to five minutes.
|
||||
## If the active connections end before that, the pod will terminate gracefully at that time.
|
||||
## To efectively take advantage of this feature, the Configmap feature
|
||||
## worker-shutdown-timeout new value is 240s instead of 10s.
|
||||
##
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /wait-shutdown
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue