we validate objects with and without namespaces and I always want to print what the current namespace is ... but fallback to "" or some other default value when no namespace is set.
using the naive input.review.object.metadata.namespace
directly fails the rule, so I resorted to
namespace := [input.review.object.metadata.namespace | ""]
which prints an array, kinda ugly but it works ... is there a better solution ?