From 701c6f0b0cdf7e7a1ebe3b28f3191707f7335642 Mon Sep 17 00:00:00 2001 From: YuMuuu Date: Fri, 4 Oct 2024 09:56:26 +0900 Subject: [PATCH] fix impl --- pkg/validator/pdb_hpa_validator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/validator/pdb_hpa_validator.go b/pkg/validator/pdb_hpa_validator.go index 4f1ecb3a3..dcebe7193 100644 --- a/pkg/validator/pdb_hpa_validator.go +++ b/pkg/validator/pdb_hpa_validator.go @@ -69,12 +69,12 @@ func pdbMinAvailableGreaterThanHPAMinReplicas(test schemaTestCase) (bool, []json } } - if attachedHPA.Spec.MinReplicas != nil && pdbMinAvailable >= int(*attachedHPA.Spec.MinReplicas) { + if attachedHPA.Spec.MinReplicas != nil && pdbMinAvailable > int(*attachedHPA.Spec.MinReplicas) { return false, []jsonschema.ValError{ { PropertyPath: "spec.minAvailable", InvalidValue: pdbMinAvailable, - Message: fmt.Sprintf("The minAvailable value in the PodDisruptionBudget(%s) is %d, which is greater or equal than the minReplicas value in the HorizontalPodAutoscaler(%s) (%d)", attachedPDB.Name, pdbMinAvailable, attachedHPA.Name, *attachedHPA.Spec.MinReplicas), + Message: fmt.Sprintf("The minAvailable value in the PodDisruptionBudget(%s) is %d, which is greater than the minReplicas value in the HorizontalPodAutoscaler(%s) (%d)", attachedPDB.Name, pdbMinAvailable, attachedHPA.Name, *attachedHPA.Spec.MinReplicas), }, }, nil }