From 1ee476b197476062f03a0ad6e0fba14c6bf7bf9c Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 1 Apr 2019 14:24:31 -0500 Subject: [PATCH] Elasticsearch: Allow override of job back off limits and deadlines this updates the Elasticsearch cluster wait and snapshot repo jobs to include values overrides for the job backoff limits and the active deadline seconds field. This allows for tweaking beyond the standard defaults for kubernetes jobs Change-Id: I1f95a635ab4dfdb3718d5d4fa668c64a9095e899 Signed-off-by: Steve Wilkerson --- elasticsearch/templates/job-es-cluster-wait.yaml | 2 ++ .../templates/job-register-snapshot-repository.yaml | 2 ++ elasticsearch/values.yaml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/elasticsearch/templates/job-es-cluster-wait.yaml b/elasticsearch/templates/job-es-cluster-wait.yaml index ae4e7e369..235b3bdef 100644 --- a/elasticsearch/templates/job-es-cluster-wait.yaml +++ b/elasticsearch/templates/job-es-cluster-wait.yaml @@ -29,6 +29,7 @@ metadata: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: + backoffLimit: {{ .Values.jobs.es_cluster_wait.backoffLimit }} template: metadata: labels: @@ -36,6 +37,7 @@ spec: spec: {{ dict "envAll" $envAll "application" "es_cluster_wait" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} + activeDeadlineSeconds: {{ .Values.jobs.es_cluster_wait.activeDeadlineSeconds }} restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value | quote }} diff --git a/elasticsearch/templates/job-register-snapshot-repository.yaml b/elasticsearch/templates/job-register-snapshot-repository.yaml index 272c83f3d..6472fe861 100644 --- a/elasticsearch/templates/job-register-snapshot-repository.yaml +++ b/elasticsearch/templates/job-register-snapshot-repository.yaml @@ -30,6 +30,7 @@ metadata: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: + backoffLimit: {{ .Values.jobs.snapshot_repository.backoffLimit }} template: metadata: labels: @@ -37,6 +38,7 @@ spec: spec: {{ dict "envAll" $envAll "application" "snapshot_repository" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} + activeDeadlineSeconds: {{ .Values.jobs.snapshot_repository.activeDeadlineSeconds }} restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value | quote }} diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 8bc9e819b..61ef7730d 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -364,6 +364,12 @@ jobs: history: success: 3 failed: 1 + es_cluster_wait: + backoffLimit: 6 + activeDeadlineSeconds: 600 + snapshot_repository: + backoffLimit: 6 + activeDeadlineSeconds: 600 conf: httpd: |