From 17cb7ecccaa19539b28d36f9b611adaf20c8f6a2 Mon Sep 17 00:00:00 2001 From: Brian Dunnigan Date: Thu, 9 Mar 2023 22:22:14 -0500 Subject: [PATCH 1/2] #850 Make Vault server readiness probe exec command configurable Signed-off-by: Brian Dunnigan --- templates/server-statefulset.yaml | 7 +------ values.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/templates/server-statefulset.yaml b/templates/server-statefulset.yaml index d7a34acb6..5b2479524 100644 --- a/templates/server-statefulset.yaml +++ b/templates/server-statefulset.yaml @@ -159,13 +159,8 @@ spec: port: 8200 scheme: {{ include "vault.scheme" . | upper }} {{- else }} - # Check status; unsealed vault servers return 0 - # The exit code reflects the seal status: - # 0 - unsealed - # 1 - error - # 2 - sealed exec: - command: ["/bin/sh", "-ec", "vault status -tls-skip-verify"] + command: {{- toYaml .Values.server.readinessProbe.exec.command | nindent 14 }} {{- end }} failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }} initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }} diff --git a/values.yaml b/values.yaml index 08e9f21f0..4e294ec12 100644 --- a/values.yaml +++ b/values.yaml @@ -465,6 +465,15 @@ server: # Used to define custom readinessProbe settings readinessProbe: enabled: true + + # Check status; unsealed vault servers return 0 + # The exit code reflects the seal status: + # 0 - unsealed + # 1 - error + # 2 - sealed + exec: + command: ["/bin/sh", "-ec", "vault status -tls-skip-verify"] + # If you need to use a http path instead of the default exec # path: /v1/sys/health?standbyok=true From 851bf3ee903f3610b73fa9989f46a5a77dce254e Mon Sep 17 00:00:00 2001 From: Brian Dunnigan Date: Fri, 17 Mar 2023 12:28:45 -0400 Subject: [PATCH 2/2] Updated config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4344171d..95eebc064 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 + version: 2.1 orbs: slack: circleci/slack@3.4.2