From c905d9fdca85fda87d948431e383e715e0ab7ee1 Mon Sep 17 00:00:00 2001 From: Sridhar Gaddam Date: Mon, 8 Jun 2020 12:15:30 +0530 Subject: [PATCH] Fix terminationGracePeriodSeconds in Submariner Pods In K8s the default termination grace period for a Pod is 30 secs. However, for Submariner Pods, we were configuring this as 0 secs, because of which, cleanup was not happening in a consistent manner and we are seeing failures in CI jobs. This PR modifies the terminationGracePeriodSeconds to 10 secs. Along with this change, it also uses the proper namespace of submariner in the excluded namespaces. Fixes issue: https://github.com/submariner-io/submariner-charts/issues/39 Signed-off-by: Sridhar Gaddam --- submariner/templates/engine-deploy.yaml | 2 +- submariner/templates/globalnet.yaml | 3 ++- submariner/templates/route-agent-ds.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/submariner/templates/engine-deploy.yaml b/submariner/templates/engine-deploy.yaml index 0039709..5450dab 100644 --- a/submariner/templates/engine-deploy.yaml +++ b/submariner/templates/engine-deploy.yaml @@ -130,5 +130,5 @@ spec: restartPolicy: Always schedulerName: default-scheduler securityContext: {} - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 10 serviceAccountName: {{ template "submariner.engineServiceAccountName" . }} diff --git a/submariner/templates/globalnet.yaml b/submariner/templates/globalnet.yaml index a1d894a..5774757 100644 --- a/submariner/templates/globalnet.yaml +++ b/submariner/templates/globalnet.yaml @@ -21,6 +21,7 @@ spec: hostNetwork: true serviceAccountName: submariner-globalnet serviceAccount: submariner-globalnet + terminationGracePeriodSeconds: 10 nodeSelector: submariner.io/gateway: 'true' containers: @@ -31,7 +32,7 @@ spec: - name: SUBMARINER_CLUSTERID value: '{{ .Values.submariner.clusterId }}' - name: SUBMARINER_EXCLUDENS - value: 'submariner,kube-system,operators' + value: 'submariner-operator,kube-system,operators' - name: SUBMARINER_NAMESPACE value: '{{ .Release.Namespace }}' securityContext: diff --git a/submariner/templates/route-agent-ds.yaml b/submariner/templates/route-agent-ds.yaml index 1473300..860ad93 100644 --- a/submariner/templates/route-agent-ds.yaml +++ b/submariner/templates/route-agent-ds.yaml @@ -22,7 +22,7 @@ spec: component: routeagent spec: serviceAccountName: {{ template "submariner.routeAgentServiceAccountName" . }} - terminationGracePeriodSeconds: 0 + terminationGracePeriodSeconds: 10 hostNetwork: true containers: - name: routeagent