Skip to content

Commit

Permalink
Merge pull request #295 from nikolay-o/bugfix
Browse files Browse the repository at this point in the history
Fixed config.yaml in chart. fix customFields for kinesis target.
  • Loading branch information
fjogeleit authored Apr 6, 2023
2 parents b456fe0 + e92e151 commit e849a3b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/policy-reporter/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
21 changes: 11 additions & 10 deletions pkg/target/http/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
1 change: 1 addition & 0 deletions pkg/target/http/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
}
Expand Down

0 comments on commit e849a3b

Please sign in to comment.