From 3d8d14a4f1c30e0258297b97c45f29816656be98 Mon Sep 17 00:00:00 2001 From: Claes Mogren Date: Sun, 14 Jun 2020 22:37:10 -0700 Subject: [PATCH] Update probe settings * Reduce readiness probe startup delay * Increase liveness polling period * Reduce shutdown grace period to 10 seconds --- config/master/aws-k8s-cni-cn.yaml | 4 +++- config/master/aws-k8s-cni-us-gov-east-1.yaml | 4 +++- config/master/aws-k8s-cni-us-gov-west-1.yaml | 4 +++- config/master/aws-k8s-cni.yaml | 4 +++- config/master/manifests.jsonnet | 9 ++++++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/config/master/aws-k8s-cni-cn.yaml b/config/master/aws-k8s-cni-cn.yaml index ec2c9e14ef9..62aface3dd6 100644 --- a/config/master/aws-k8s-cni-cn.yaml +++ b/config/master/aws-k8s-cni-cn.yaml @@ -112,6 +112,7 @@ - "/app/grpc-health-probe" - "-addr=:50051" "initialDelaySeconds": 35 + "periodSeconds": 60 "name": "aws-node" "ports": - "containerPort": 61678 @@ -121,7 +122,7 @@ "command": - "/app/grpc-health-probe" - "-addr=:50051" - "initialDelaySeconds": 35 + "initialDelaySeconds": 10 "resources": "requests": "cpu": "10m" @@ -154,6 +155,7 @@ "name": "cni-bin-dir" "priorityClassName": "system-node-critical" "serviceAccountName": "aws-node" + "terminationGracePeriodSeconds": 10 "tolerations": - "operator": "Exists" "volumes": diff --git a/config/master/aws-k8s-cni-us-gov-east-1.yaml b/config/master/aws-k8s-cni-us-gov-east-1.yaml index 26386d68f58..862d37a133b 100644 --- a/config/master/aws-k8s-cni-us-gov-east-1.yaml +++ b/config/master/aws-k8s-cni-us-gov-east-1.yaml @@ -112,6 +112,7 @@ - "/app/grpc-health-probe" - "-addr=:50051" "initialDelaySeconds": 35 + "periodSeconds": 60 "name": "aws-node" "ports": - "containerPort": 61678 @@ -121,7 +122,7 @@ "command": - "/app/grpc-health-probe" - "-addr=:50051" - "initialDelaySeconds": 35 + "initialDelaySeconds": 10 "resources": "requests": "cpu": "10m" @@ -154,6 +155,7 @@ "name": "cni-bin-dir" "priorityClassName": "system-node-critical" "serviceAccountName": "aws-node" + "terminationGracePeriodSeconds": 10 "tolerations": - "operator": "Exists" "volumes": diff --git a/config/master/aws-k8s-cni-us-gov-west-1.yaml b/config/master/aws-k8s-cni-us-gov-west-1.yaml index 9a8cd99c596..4eccde11e7f 100644 --- a/config/master/aws-k8s-cni-us-gov-west-1.yaml +++ b/config/master/aws-k8s-cni-us-gov-west-1.yaml @@ -112,6 +112,7 @@ - "/app/grpc-health-probe" - "-addr=:50051" "initialDelaySeconds": 35 + "periodSeconds": 60 "name": "aws-node" "ports": - "containerPort": 61678 @@ -121,7 +122,7 @@ "command": - "/app/grpc-health-probe" - "-addr=:50051" - "initialDelaySeconds": 35 + "initialDelaySeconds": 10 "resources": "requests": "cpu": "10m" @@ -154,6 +155,7 @@ "name": "cni-bin-dir" "priorityClassName": "system-node-critical" "serviceAccountName": "aws-node" + "terminationGracePeriodSeconds": 10 "tolerations": - "operator": "Exists" "volumes": diff --git a/config/master/aws-k8s-cni.yaml b/config/master/aws-k8s-cni.yaml index a4af8724b95..2292a99bf0e 100644 --- a/config/master/aws-k8s-cni.yaml +++ b/config/master/aws-k8s-cni.yaml @@ -112,6 +112,7 @@ - "/app/grpc-health-probe" - "-addr=:50051" "initialDelaySeconds": 35 + "periodSeconds": 60 "name": "aws-node" "ports": - "containerPort": 61678 @@ -121,7 +122,7 @@ "command": - "/app/grpc-health-probe" - "-addr=:50051" - "initialDelaySeconds": 35 + "initialDelaySeconds": 10 "resources": "requests": "cpu": "10m" @@ -154,6 +155,7 @@ "name": "cni-bin-dir" "priorityClassName": "system-node-critical" "serviceAccountName": "aws-node" + "terminationGracePeriodSeconds": 10 "tolerations": - "operator": "Exists" "volumes": diff --git a/config/master/manifests.jsonnet b/config/master/manifests.jsonnet index 9a24843ffcf..b09e7e9f9b2 100644 --- a/config/master/manifests.jsonnet +++ b/config/master/manifests.jsonnet @@ -95,6 +95,7 @@ local awsnode = { }, spec: { priorityClassName: "system-node-critical", + terminationGracePeriodSeconds: 10, affinity: { nodeAffinity: { requiredDuringSchedulingIgnoredDuringExecution: { @@ -135,12 +136,18 @@ local awsnode = { }], name: "aws-node", readinessProbe: { + exec: { + command: ["/app/grpc-health-probe", "-addr=:50051"], + }, + initialDelaySeconds: 10, + }, + livenessProbe: { exec: { command: ["/app/grpc-health-probe", "-addr=:50051"], }, initialDelaySeconds: 35, + periodSeconds: 60, }, - livenessProbe: self.readinessProbe, env_:: { AWS_VPC_ENI_MTU: "9001", AWS_VPC_K8S_CNI_CONFIGURE_RPFILTER: "false",