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

Merge pull request #295 from nikolay-o/bugfix

Fixed config.yaml in chart. fix customFields for kinesis target.
This commit is contained in:
Frank Jogeleit 2023-04-06 11:12:56 +02:00 committed by GitHub
commit e849a3b705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 13 deletions

View file

@ -5,7 +5,7 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 2.18.3
version: 2.18.4
appVersion: 2.14.1
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png

View file

@ -165,7 +165,7 @@ s3:
bucket: {{ .Values.target.s3.bucket }}
bucketKeyEnabled: {{ .Values.target.s3.bucketKeyEnabled }}
kmsKeyId: {{ .Values.target.s3.kmsKeyId }}
serverSideEncryption: { .Values.target.s3.serverSideEncryption }}
serverSideEncryption: {{ .Values.target.s3.serverSideEncryption }}
pathStyle: {{ .Values.target.s3.pathStyle }}
prefix: {{ .Values.target.s3.prefix }}
minimumPriority: {{ .Values.target.s3.minimumPriority | quote }}

View file

@ -34,7 +34,7 @@ func Load(cmd *cobra.Command) (*Config, error) {
v.AutomaticEnv()
if err := v.ReadInConfig(); err != nil {
log.Println("[INFO] No configuration file found")
log.Printf("[INFO] No configuration file found: %v\n", err)
}
if flag := cmd.Flags().Lookup("worker"); flag != nil {

View file

@ -21,14 +21,15 @@ type Resource struct {
// Result JSON structure for HTTP Requests
type Result struct {
Message string `json:"message"`
Policy string `json:"policy"`
Rule string `json:"rule"`
Priority string `json:"priority"`
Status string `json:"status"`
Severity string `json:"severity,omitempty"`
Category string `json:"category,omitempty"`
Scored bool `json:"scored"`
Resource Resource `json:"resource"`
CreationTimestamp time.Time `json:"creationTimestamp"`
Message string `json:"message"`
Policy string `json:"policy"`
Rule string `json:"rule"`
Priority string `json:"priority"`
Status string `json:"status"`
Severity string `json:"severity,omitempty"`
Category string `json:"category,omitempty"`
Scored bool `json:"scored"`
Properties map[string]string `json:"properties,omitempty"`
Resource Resource `json:"resource"`
CreationTimestamp time.Time `json:"creationTimestamp"`
}

View file

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