diff --git a/Chart.yaml b/Chart.yaml index 8f6cb49..188abf2 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 diff --git a/README.md b/README.md index 83b21de..14423a3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/templates/resource-policy.yaml b/templates/resource-policy.yaml index 56d8a47..47c7f2a 100644 --- a/templates/resource-policy.yaml +++ b/templates/resource-policy.yaml @@ -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 }} \ No newline at end of file + + any_not_affirming if { + some _, submod in input.submods + submod["ear.status"] != "affirming" + } \ No newline at end of file