mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix:Add Missing Severity Cases in SeverityFromString Function (#7974)
Signed-off-by: lichanghao.orange <lichanghao.orange@bytedance.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
41b46159f0
commit
7415c1a3d4
1 changed files with 4 additions and 0 deletions
|
@ -71,12 +71,16 @@ func toPolicyResult(status engineapi.RuleStatus) policyreportv1alpha2.PolicyResu
|
||||||
|
|
||||||
func SeverityFromString(severity string) policyreportv1alpha2.PolicySeverity {
|
func SeverityFromString(severity string) policyreportv1alpha2.PolicySeverity {
|
||||||
switch severity {
|
switch severity {
|
||||||
|
case policyreportv1alpha2.SeverityCritical:
|
||||||
|
return policyreportv1alpha2.SeverityCritical
|
||||||
case policyreportv1alpha2.SeverityHigh:
|
case policyreportv1alpha2.SeverityHigh:
|
||||||
return policyreportv1alpha2.SeverityHigh
|
return policyreportv1alpha2.SeverityHigh
|
||||||
case policyreportv1alpha2.SeverityMedium:
|
case policyreportv1alpha2.SeverityMedium:
|
||||||
return policyreportv1alpha2.SeverityMedium
|
return policyreportv1alpha2.SeverityMedium
|
||||||
case policyreportv1alpha2.SeverityLow:
|
case policyreportv1alpha2.SeverityLow:
|
||||||
return policyreportv1alpha2.SeverityLow
|
return policyreportv1alpha2.SeverityLow
|
||||||
|
case policyreportv1alpha2.SeverityInfo:
|
||||||
|
return policyreportv1alpha2.SeverityInfo
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue