From 3fc1bb3ce98b33c744672704bbee1dc9b72a08b0 Mon Sep 17 00:00:00 2001 From: Michal Koziorowski Date: Thu, 12 Mar 2020 12:20:37 +0100 Subject: [PATCH] Made terminationGracePeriodSeconds configurable (#21385) Signed-off-by: Michal Koziorowski Co-authored-by: Michal Koziorowski --- incubator/haproxy-ingress/Chart.yaml | 2 +- incubator/haproxy-ingress/README.md | 1 + incubator/haproxy-ingress/templates/controller-daemonset.yaml | 2 +- incubator/haproxy-ingress/templates/controller-deployment.yaml | 2 +- incubator/haproxy-ingress/values.yaml | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/incubator/haproxy-ingress/Chart.yaml b/incubator/haproxy-ingress/Chart.yaml index 6c6a8bb7551b..448bc01d1e5f 100644 --- a/incubator/haproxy-ingress/Chart.yaml +++ b/incubator/haproxy-ingress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: haproxy-ingress -version: 0.0.22 +version: 0.0.23 appVersion: 0.7.2 home: https://github.com/jcmoraisjr/haproxy-ingress description: Ingress controller implementation for haproxy loadbalancer. diff --git a/incubator/haproxy-ingress/README.md b/incubator/haproxy-ingress/README.md index ae3ffa76c0e3..52a74110169a 100755 --- a/incubator/haproxy-ingress/README.md +++ b/incubator/haproxy-ingress/README.md @@ -73,6 +73,7 @@ Parameter | Description | Default `controller.config` | additional haproxy-ingress [ConfigMap entries](https://github.com/jcmoraisjr/haproxy-ingress/blob/v0.6/README.md#configmap) | `{}` `controller.hostNetwork` | Optionally set to true when using CNI based kubernetes installations | `false` `controller.dnsPolicy` | Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true' | `ClusterFirst` +`controller.terminationGracePeriodSeconds` | How much to wait before terminating a pod (in seconds) | `60` `controller.kind` | Type of deployment, DaemonSet or Deployment | `Deployment` `controller.tcp` | TCP [service ConfigMap](https://github.com/jcmoraisjr/haproxy-ingress/blob/v0.6/README.md#tcp-services-configmap): `: /:[:[][:]]` | `{}` `controller.enableStaticPorts` | Set to `false` to only rely on ports from `controller.tcp` | `true` diff --git a/incubator/haproxy-ingress/templates/controller-daemonset.yaml b/incubator/haproxy-ingress/templates/controller-daemonset.yaml index 36cc1fa7bcd5..a5be71028adb 100644 --- a/incubator/haproxy-ingress/templates/controller-daemonset.yaml +++ b/incubator/haproxy-ingress/templates/controller-daemonset.yaml @@ -177,7 +177,7 @@ spec: configMap: name: {{ template "haproxy-ingress.controller.fullname" . }}-template {{- end }} - terminationGracePeriodSeconds: 60 + terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} dnsPolicy: {{ .Values.controller.dnsPolicy }} hostNetwork: {{ .Values.controller.hostNetwork }} {{- if .Values.controller.nodeSelector }} diff --git a/incubator/haproxy-ingress/templates/controller-deployment.yaml b/incubator/haproxy-ingress/templates/controller-deployment.yaml index 8cd9451c77fc..96316e5bbfed 100644 --- a/incubator/haproxy-ingress/templates/controller-deployment.yaml +++ b/incubator/haproxy-ingress/templates/controller-deployment.yaml @@ -171,7 +171,7 @@ spec: configMap: name: {{ template "haproxy-ingress.controller.fullname" . }}-template {{- end }} - terminationGracePeriodSeconds: 60 + terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} dnsPolicy: {{ .Values.controller.dnsPolicy }} hostNetwork: {{ .Values.controller.hostNetwork }} {{- if .Values.controller.nodeSelector }} diff --git a/incubator/haproxy-ingress/values.yaml b/incubator/haproxy-ingress/values.yaml index 78c8e8543a0e..f46470a88323 100644 --- a/incubator/haproxy-ingress/values.yaml +++ b/incubator/haproxy-ingress/values.yaml @@ -111,6 +111,9 @@ controller: # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. dnsPolicy: ClusterFirst + # How many seconds to wait before terminating a pod. + terminationGracePeriodSeconds: 60 + ## DaemonSet or Deployment ## kind: Deployment