mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
6398df6069
Thought about it some more, and I think this is how it is less
surprising:
```rego
# METADATA
# labels:
# app: foo
package foo
# METADATA
# labels:
# id: allow-01
allow if { ... }
```
Evaluating `data.foo.allow` successfully will yield a single entry in
`rule_labels`:
```json
{
"app": "foo",
"id": "allow-01"
}
```
Labels are merged along their annotations chain.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>