1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00

source attribute added to report.

Signed-off-by: Nikolay Osmolovskiy <nikolay.osmolovsky@gmail.com>
This commit is contained in:
Nikolay Osmolovskiy 2023-05-15 14:03:32 +03:00
parent 421cdadbc6
commit 1ed28a5d9f
No known key found for this signature in database
GPG key ID: 9D693C83136B39E2
2 changed files with 2 additions and 0 deletions

View file

@ -32,4 +32,5 @@ type Result struct {
Properties map[string]string `json:"properties,omitempty"`
Resource Resource `json:"resource"`
CreationTimestamp time.Time `json:"creationTimestamp"`
Source string `json:"source"`
}

View file

@ -75,6 +75,7 @@ func NewJSONResult(r v1alpha2.PolicyReportResult) Result {
Properties: r.Properties,
Resource: res,
CreationTimestamp: time.Unix(r.Timestamp.Seconds, int64(r.Timestamp.Nanos)),
Source: r.Source,
}
}