Closed dmotte closed 1 month ago
@dmotte thanks! Could you provide also unit tests that cover this "new" behavior so I could also try them on the main branch and see what doesn't work? This would be a great improvement to this PR.
@FxKu done :slightly_smiling_face: I hope it's ok
Seems to me that only the schema validation needs to change. It's still good though to add a "0" example to the unit test.
@FxKu yeah, I think I got your point and you are right :)
Just to double check, correct me if I'm wrong: util.IsSmallerQuantity(somePositiveQuantity, "0")
returns false
, so isSmaller
ends up being false
and the limit is not enforced.
Thank you! Fixed in 24df591
Thanks. Can you also update these files with the new validation pattern:
@FxKu I think you meant manifests/operatorconfiguration.crd.yaml
instead of manifests/postgresql.crd.yaml
, so I updated that one instead. Done in 107fe9b :wink: let me know if it's OK or you have other requests
:+1:
👍
The documentation about
postgres_pod_resources
says that you can disable the defaults by setting them to zero OR empty string:Source: https://github.com/zalando/postgres-operator/blob/2582b934bfb5bfaba9e5d7116ef270e507c5d6a2/docs/reference/operator_parameters.md#L570-L604
But it's not currently possible to set them to empty string, due to the regular expressions in
charts/postgres-operator/crds/operatorconfigurations.yaml
.Also, the
enforceMinResourceLimits
function currently supports only the empty string case, which is impossible to use due to the aforementioned regexes.This PR aims to fix these two issues 🙂