Explorar o código

fix helm release input data

Alexander Belanger %!s(int64=3) %!d(string=hai) anos
pai
achega
e19236bad2
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      internal/opa/opa.go

+ 4 - 2
internal/opa/opa.go

@@ -211,8 +211,10 @@ func (runner *KubernetesOPARunner) runHelmReleaseQueries(name string, collection
 			results, err := query.Eval(
 				context.Background(),
 				rego.EvalInput(map[string]interface{}{
-					"version": helmRelease.Chart.Metadata.Version,
-					"values":  helmRelease.Config,
+					"version":   helmRelease.Chart.Metadata.Version,
+					"values":    helmRelease.Config,
+					"name":      helmRelease.Name,
+					"namespace": helmRelease.Namespace,
 				}),
 			)