mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
change annotations struct field name
This commit is contained in:
parent
b38febe734
commit
e54890585a
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ type Policy struct {
|
||||||
type Rule struct {
|
type Rule struct {
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Changes string `json:"changes,omitempty"` // TODO for mutation changes
|
Changes string `json:"changes,omitempty"` // TODO for mutation changes
|
||||||
Error string `json:"error,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Policy) getOverAllStatus() string {
|
func (p *Policy) getOverAllStatus() string {
|
||||||
|
@ -61,7 +61,7 @@ func getRules(rules []*pinfo.RuleInfo, ruleType pinfo.RuleType) map[string]Rule
|
||||||
|
|
||||||
rule := Rule{Status: getStatus(r.IsSuccessful())}
|
rule := Rule{Status: getStatus(r.IsSuccessful())}
|
||||||
if !r.IsSuccessful() {
|
if !r.IsSuccessful() {
|
||||||
rule.Error = r.GetErrorString()
|
rule.Message = r.GetErrorString()
|
||||||
}
|
}
|
||||||
annrules[r.Name] = rule
|
annrules[r.Name] = rule
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue