From 82c98a2b63742500d585a92e3cb2e440c8e23059 Mon Sep 17 00:00:00 2001 From: Roee Hershko Date: Sun, 22 Dec 2024 16:06:46 +0200 Subject: [PATCH 1/2] use healthcehck in liveness probe instead of init Signed-off-by: Roee Hershko --- pkg/controller/vault/vault_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/vault/vault_controller.go b/pkg/controller/vault/vault_controller.go index 5cd3077e..d8bca672 100644 --- a/pkg/controller/vault/vault_controller.go +++ b/pkg/controller/vault/vault_controller.go @@ -22,6 +22,7 @@ import ( "crypto/x509" "errors" "fmt" + "github.com/blang/semver/v4" "net/http" "path/filepath" "reflect" @@ -29,7 +30,6 @@ import ( "strings" "time" - "github.com/Masterminds/semver/v3" vaultv1alpha1 "github.com/bank-vaults/vault-operator/pkg/apis/vault/v1alpha1" bvtls "github.com/bank-vaults/vault-sdk/tls" "github.com/bank-vaults/vault-sdk/vault" @@ -1214,13 +1214,13 @@ func statefulSetForVault(v *vaultv1alpha1.Vault, externalSecretsToWatchItems []c FailureThreshold: 18, }, // This probe makes sure Vault is responsive in a HTTPS manner - // See: https://www.vaultproject.io/api/system/init.html + // See: https://www.vaultproject.io/api/system/health.html LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ Scheme: getVaultURIScheme(v), Port: intstr.FromString(v.Spec.GetAPIPortName()), - Path: "/v1/sys/init", + Path: "/v1/sys/health?standbyok=true", }, }, }, From effe0f759cfda215ddbfc03950e057fcdf860569 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Sun, 5 Jan 2025 12:11:14 +0100 Subject: [PATCH 2/2] chore: fix mistaken import change Signed-off-by: Bence Csati --- pkg/controller/vault/vault_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/vault/vault_controller.go b/pkg/controller/vault/vault_controller.go index d8bca672..337a88c4 100644 --- a/pkg/controller/vault/vault_controller.go +++ b/pkg/controller/vault/vault_controller.go @@ -22,7 +22,6 @@ import ( "crypto/x509" "errors" "fmt" - "github.com/blang/semver/v4" "net/http" "path/filepath" "reflect" @@ -30,6 +29,7 @@ import ( "strings" "time" + "github.com/Masterminds/semver/v3" vaultv1alpha1 "github.com/bank-vaults/vault-operator/pkg/apis/vault/v1alpha1" bvtls "github.com/bank-vaults/vault-sdk/tls" "github.com/bank-vaults/vault-sdk/vault"