Deny production runs of example.org trust domains (#229)

This commit is contained in:
kfox1111
2023-09-25 12:06:48 -07:00
committed by GitHub
parent 712a0f6fbe
commit 50825d9fc9
16 changed files with 101 additions and 19 deletions
+15
View File
@@ -107,3 +107,18 @@ rules:
{{- end }}
{{- include "spire-lib.image" $root }}
{{- end }}
{{/*
Take in an array of, '.', a failure string to display, and boolean to to display it,
if strictMode is enabled and the boolean is true
*/}}
{{- define "spire-lib.check-strict-mode" }}
{{ $root := index . 0 }}
{{ $message := index . 1 }}
{{ $condition := index . 2 }}
{{- if (dig "spire" "strictMode" false $root.Values.global) }}
{{- if $condition }}
{{- fail $message }}
{{- end }}
{{- end }}
{{- end }}