diff --git a/pkg/operator/ceph/spec/spec.go b/pkg/operator/ceph/spec/spec.go index ce930e302..97a78c4ae 100644 --- a/pkg/operator/ceph/spec/spec.go +++ b/pkg/operator/ceph/spec/spec.go @@ -173,12 +173,12 @@ func CheckPodMemory(resources v1.ResourceRequirements, cephPodMinimumMemory uint // This means LIMIT < REQUEST // Kubernetes will refuse to schedule that pod however it's still valuable to indicate that user's input was incorrect - if uint64(podMemoryLimit.Value()) < display.MbTob(cephPodMinimumMemory) { + if uint64(podMemoryLimit.Value()) < uint64(podMemoryRequest.Value()) { extraErrorLine := `\n - User has specified a pod memory limit below the pod memory request in the cluster CRD.\n + User has specified a pod memory limit %dmb below the pod memory request %dmb in the cluster CR.\n Rook will create pods that are expected to fail to serve as a more apparent error indicator to the user.` - return fmt.Errorf(errorMessage+extraErrorLine, display.BToMb(uint64(podMemoryLimit.Value())), cephPodMinimumMemory) + return fmt.Errorf(extraErrorLine, display.BToMb(uint64(podMemoryLimit.Value())), display.BToMb(uint64(podMemoryRequest.Value()))) } return nil