mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-25 01:35:18 -06:00
8d321f0856
These built-ins will allow policies to more easily make comparisons on semantic version strings. I am doing this because I recently needed to write policy concerning versions of installed software in Kubernetes environments. I feel this is a better solution than implementing such a feature in Rego: https://gist.github.com/charlieegan3/76dbec05c65164ac98dfec74b1381c5a is_valid is to allow users to gate access to the compare function which fails if the input is not a valid version string. The semver functionality is vendored from the coreos package based on the discussion here: https://github.com/open-policy-agent/opa/pull/2538#pullrequestreview-448422711 Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>