Browse Source

Set ingress-nginx default terminationGracePeriodSeconds to 5 min (#8252)

* set ingress-nginx default terminationGracePeriodSeconds to 5 min for the drain of connection

* Add ingress_nginx_termination_grace_period_seconds at sample inventory
pull/8263/head
zhengtianbao 2 years ago
committed by GitHub
parent
commit
785324827c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions
  1. 1
      inventory/sample/group_vars/k8s_cluster/addons.yml
  2. 1
      roles/kubernetes-apps/ingress_controller/ingress_nginx/defaults/main.yml
  3. 1
      roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2

1
inventory/sample/group_vars/k8s_cluster/addons.yml

@ -116,6 +116,7 @@ ingress_publish_status_address: ""
# 53: "kube-system/coredns:53"
# ingress_nginx_extra_args:
# - --default-ssl-certificate=default/foo-tls
# ingress_nginx_termination_grace_period_seconds: 300
# ingress_nginx_class: nginx
# ALB ingress controller deployment

1
roles/kubernetes-apps/ingress_controller/ingress_nginx/defaults/main.yml

@ -12,4 +12,5 @@ ingress_nginx_configmap: {}
ingress_nginx_configmap_tcp_services: {}
ingress_nginx_configmap_udp_services: {}
ingress_nginx_extra_args: []
ingress_nginx_termination_grace_period_seconds: 300
# ingress_nginx_class: nginx

1
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2

@ -22,6 +22,7 @@ spec:
prometheus.io/scrape: "true"
spec:
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: {{ ingress_nginx_termination_grace_period_seconds }}
{% if ingress_nginx_host_network %}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet

Loading…
Cancel
Save