Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ keywords:
- confidential-containers
name: trustee
# DO NOT EDIT VERSION HERE, IT IS AUTO-GENERATED BY SEMANTIC-RELEASE
version: 0.3.3
version: 0.3.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trustee

![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square)
![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square)

A Helm chart to provide an opinionated deployment of Trustee in a validated pattern

Expand Down
18 changes: 8 additions & 10 deletions templates/resource-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ metadata:
data:
policy.rego: |
package policy

import rego.v1

default allow := false
{{- if not .Values.kbs.gpu.enabled }}
default allow = false

allow if {
input["submods"]["cpu0"]["ear.status"] == "affirming"
}
{{- else }}
not any_not_affirming
count(input.submods) > 0

allow if {
input["submods"]["cpu0"]["ear.status"] == "affirming"
input["submods"]["gpu0"]["ear.status"] == "affirming"
}
{{- end }}

any_not_affirming if {
some _, submod in input.submods
submod["ear.status"] != "affirming"
}