1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
kyverno/pkg/engine/api/rulestatus.go
Charles-Edouard Brétéché 892b8f921d
refactor: clean engine api package (#6156)
* refactor: introduce engine api package

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* status

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* refactor: clean engine api package

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* cleanup

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-01-30 14:49:44 +00:00

21 lines
1.1 KiB
Go

package api
// RuleStatus represents the status of rule execution
type RuleStatus string
const (
// RuleStatusPass indicates that the resources meets the policy rule requirements
RuleStatusPass RuleStatus = "pass"
// RuleStatusFail indicates that the resource does not meet the policy rule requirements
RuleStatusFail RuleStatus = "fail"
// RuleStatusWarn indicates that the resource does not meet the policy rule requirements, but the policy is not scored
RuleStatusWarn RuleStatus = "warning"
// RuleStatusError indicates that the policy rule could not be evaluated due to a processing error, for
// example when a variable cannot be resolved in the policy rule definition. Note that variables
// that cannot be resolved in preconditions are replaced with empty values to allow existence
// checks.
RuleStatusError RuleStatus = "error"
// RuleStatusSkip indicates that the policy rule was not selected based on user inputs or applicability, for example
// when preconditions are not met, or when conditional or global anchors are not satistied.
RuleStatusSkip RuleStatus = "skip"
)