Skip to content

Commit 701c6f0

Browse files
committed
fix impl
1 parent 694fd48 commit 701c6f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/validator/pdb_hpa_validator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ func pdbMinAvailableGreaterThanHPAMinReplicas(test schemaTestCase) (bool, []json
6969
}
7070
}
7171

72-
if attachedHPA.Spec.MinReplicas != nil && pdbMinAvailable >= int(*attachedHPA.Spec.MinReplicas) {
72+
if attachedHPA.Spec.MinReplicas != nil && pdbMinAvailable > int(*attachedHPA.Spec.MinReplicas) {
7373
return false, []jsonschema.ValError{
7474
{
7575
PropertyPath: "spec.minAvailable",
7676
InvalidValue: pdbMinAvailable,
77-
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),
77+
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),
7878
},
7979
}, nil
8080
}

0 commit comments

Comments
 (0)