Skip to content

Commit f22ea6e

Browse files
committed
fix: recommended changes
Signed-off-by: Chris Butler <chris.butler@redhat.com>
1 parent 6f853e9 commit f22ea6e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

templates/resource-policy.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ data:
99
policy.rego: |
1010
package policy
1111
default allow = false
12-
allow {
13-
input["submods"]["cpu0"]["ear.status"] == "affirming"
12+
allow if {
13+
input.submods.cpu0["ear.status"] == "affirming"
1414
gpu0_ok
1515
}
16+
gpu0_ok if {
17+
not input.submods.gpu0
18+
}
1619
17-
gpu0_ok {
18-
not input["submods"]["gpu0"]
19-
}
20-
21-
gpu0_ok {
22-
input["submods"]["gpu0"]["ear.status"] == "affirming"
20+
gpu0_ok if {
21+
input.submods.gpu0["ear.status"] == "affirming"
2322
}

0 commit comments

Comments
 (0)