Skip to content

Commit

Permalink
fix: #2095 GV in constraint StatusViolation (#2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
prachirp authored Jun 14, 2022
1 parent cbcf4ad commit d3e62d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/audit/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ type Manager struct {

// StatusViolation represents each violation under status.
type StatusViolation struct {
Group string `json:"group"`
Version string `json:"version"`
Kind string `json:"kind"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Expand Down Expand Up @@ -736,6 +738,8 @@ func (ucloop *updateConstraintLoop) updateConstraintStatus(ctx context.Context,
// append statusViolations for this constraint until constraintViolationsLimit has reached
if uint(len(statusViolations)) < *constraintViolationsLimit {
statusViolations = append(statusViolations, StatusViolation{
Group: ar.group,
Version: ar.version,
Kind: ar.kind,
Name: ar.name,
Namespace: ar.namespace,
Expand Down

0 comments on commit d3e62d0

Please sign in to comment.