From c477c67d1e8c24af0b36915ecfafffe4b5e53dc9 Mon Sep 17 00:00:00 2001 From: Brandon Wagner Date: Fri, 28 May 2021 10:51:05 -0500 Subject: [PATCH] make queue-processor mode replicas configurable (#443) --- config/helm/aws-node-termination-handler/README.md | 2 ++ .../aws-node-termination-handler/templates/deployment.yaml | 2 +- config/helm/aws-node-termination-handler/values.yaml | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/helm/aws-node-termination-handler/README.md b/config/helm/aws-node-termination-handler/README.md index d07ca3c3..36902194 100644 --- a/config/helm/aws-node-termination-handler/README.md +++ b/config/helm/aws-node-termination-handler/README.md @@ -98,6 +98,8 @@ Parameter | Description | Default `checkASGTagBeforeDraining` | If true, check that the instance is tagged with "aws-node-termination-handler/managed" as the key before draining the node | `true` `managedAsgTag` | The tag to ensure is on a node if checkASGTagBeforeDraining is true | `aws-node-termination-handler/managed` `workers` | The maximum amount of parallel event processors | `10` +`replicas` | The number of replicas in the NTH deployment when using queue-processor mode (NOTE: increasing replicas may cause duplicate webhooks since NTH pods are stateless) + | `1` ### AWS Node Termination Handler - IMDS Mode Configuration diff --git a/config/helm/aws-node-termination-handler/templates/deployment.yaml b/config/helm/aws-node-termination-handler/templates/deployment.yaml index aa617579..e9262647 100644 --- a/config/helm/aws-node-termination-handler/templates/deployment.yaml +++ b/config/helm/aws-node-termination-handler/templates/deployment.yaml @@ -7,7 +7,7 @@ metadata: labels: {{ include "aws-node-termination-handler.labels" . | indent 4 }} spec: - replicas: 1 + replicas: {{ .Values.replicas }} selector: matchLabels: app.kubernetes.io/name: {{ include "aws-node-termination-handler.name" . }} diff --git a/config/helm/aws-node-termination-handler/values.yaml b/config/helm/aws-node-termination-handler/values.yaml index 6063e3cb..91c4ca33 100644 --- a/config/helm/aws-node-termination-handler/values.yaml +++ b/config/helm/aws-node-termination-handler/values.yaml @@ -216,3 +216,6 @@ useHostNetwork: true # The maximal amount of parallel event processors to handle concurrent events workers: 10 + +# The number of replicas in the NTH deployment when using queue-processor mode (NOTE: increasing this may cause duplicate webhooks since NTH pods are stateless) +replicas: 1 \ No newline at end of file