From 83b961f05a92a0cc76da55a60b8bbf0cf674128c Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Tue, 31 Oct 2023 09:37:20 +0000 Subject: [PATCH] HPCC-30704 Prevent scale down evict It is generally not safe for HPCC pods to be evicted based on scale down events because most are stateful (particularly those that have been dynamically launched as jobs). For now, prevent all pods from being deemed suitable for eviction by k8s on scale-down. We may later allow some that have replicas and aren't stateful or 'cheap' to evict and move and handle graceful termination to be safe, but it will then be better to use PodDisruptionBudget's Signed-off-by: Jake Smith --- helm/hpcc/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 36d1038f92d..14b26f4b0b8 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -2533,7 +2533,7 @@ A template to generate component annotations, merges static default annotations Pass in dict with .root, .me */}} {{- define "hpcc.generateAnnotations" -}} -{{- $annotations := dict -}} +{{- $annotations := dict "cluster-autoscaler.kubernetes.io/safe-to-evict" false -}} {{- if hasKey .root.Values.global "componentAnnotations" -}}{{- $annotations = merge $annotations .root.Values.global.componentAnnotations -}}{{- end -}} {{- if hasKey .me "annotations" -}}{{- $annotations = merge $annotations .me.annotations -}}{{- end -}} {{- range $key, $value := $annotations }}