Skip to content

Commit

Permalink
Fixed config.yaml in chart. fix customFields for kinesis target.
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Osmolovskiy <nikolay.osmolovsky@gmail.com>
  • Loading branch information
nikolay-o committed Apr 5, 2023
1 parent b456fe0 commit e5ea4dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
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
3 changes: 1 addition & 2 deletions pkg/target/kinesis/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/helper"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/http"
)

// Options to configure the Kinesis target
Expand Down Expand Up @@ -44,7 +43,7 @@ func (c *client) Send(result v1alpha2.PolicyReportResult) {

body := new(bytes.Buffer)

if err := json.NewEncoder(body).Encode(http.NewJSONResult(result)); err != nil {
if err := json.NewEncoder(body).Encode(result); err != nil {
zap.L().Error("failed to encode result", zap.String("name", c.Name()), zap.Error(err))
return
}
Expand Down

0 comments on commit e5ea4dd

Please sign in to comment.