Merge pull request #5332 from aledbf/chart

Add lifecycle hook and option to enable mimalloc
This commit is contained in:
Kubernetes Prow Robot 2020-04-06 10:39:47 -07:00 committed by GitHub
commit 83dacebfb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 7 deletions

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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: ""

View file

@ -326,6 +326,11 @@ spec:
- name: controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
args:
- /nginx-ingress-controller
- --publish-service=ingress-nginx/ingress-nginx-controller
@ -391,7 +396,7 @@ spec:
cpu: 100m
memory: 90Mi
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 300
volumes:
- name: webhook-cert
secret:

View file

@ -322,6 +322,11 @@ spec:
- name: controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
args:
- /nginx-ingress-controller
- --publish-service=ingress-nginx/ingress-nginx-controller
@ -387,7 +392,7 @@ spec:
cpu: 100m
memory: 90Mi
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 300
volumes:
- name: webhook-cert
secret:

View file

@ -316,6 +316,11 @@ spec:
- name: controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
args:
- /nginx-ingress-controller
- --election-id=ingress-controller-leader
@ -380,7 +385,7 @@ spec:
cpu: 100m
memory: 90Mi
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 300
volumes:
- name: webhook-cert
secret:

View file

@ -317,6 +317,11 @@ spec:
- name: controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
args:
- /nginx-ingress-controller
- --publish-service=ingress-nginx/ingress-nginx-controller
@ -382,7 +387,7 @@ spec:
cpu: 100m
memory: 90Mi
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 300
volumes:
- name: webhook-cert
secret: