We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f22ea6e commit b1c1d70Copy full SHA for b1c1d70
1 file changed
templates/resource-policy.yaml
@@ -8,15 +8,17 @@ metadata:
8
data:
9
policy.rego: |
10
package policy
11
+ import rego.v1
12
+
13
default allow = false
14
15
allow if {
- input.submods.cpu0["ear.status"] == "affirming"
- gpu0_ok
16
+ not any_not_affirming
17
+ count(input.submods) > 0
18
19
}
- gpu0_ok if {
- not input.submods.gpu0
- }
20
21
- input.submods.gpu0["ear.status"] == "affirming"
+ any_not_affirming if {
22
+ some _, submod in input.submods
23
+ submod["ear.status"] != "affirming"
24
0 commit comments