Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
genpolicy-msft: add namespace-flexible rule variant
We would like to have a coordinator policy that is portable across namespaces. This is not possible with the upstream rules.rego, because the namespace annotation on the OCI spec is checked against the original namespace in the resource definition, or a default. It turns out that this check is not necessary for our coordinator, though: 1. The namespace check guarantees a specific pattern of the log path. As there's only one container in the VM, we don't care about potential conflicts and only need to ensure that we're not writing into a totally unrelated directory. 2. The namespace check guarantees that the Kubernetes downward API is resolved correctly. We're not using that, so we don't need the check. A minimally invasive change that still addresses (1) is to relax the check so that it only guarantees namespace validity [1]. [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns
- Loading branch information