diff --git a/pkg/policy/validate.go b/pkg/policy/validate.go index cb7af29a62..8ebc09cb9e 100644 --- a/pkg/policy/validate.go +++ b/pkg/policy/validate.go @@ -32,7 +32,7 @@ func Validate(p kyverno.ClusterPolicy) error { // policy.spec.background -> "true" // - cannot use variables with request.userInfo // - cannot define userInfo(roles, cluserRoles, subjects) for filtering (match & exclude) - return fmt.Errorf("userInfo not allowed in background policy mode. Failure path %s", err) + return fmt.Errorf("userInfo is not allowed in match or exclude when backgroud policy mode is true. Set spec.background=false to disable background mode for this policy rule. Failure path %s ", err) } }