Skip to content

Commit

Permalink
minor fixes; PolicyReportCreate
Browse files Browse the repository at this point in the history
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
  • Loading branch information
anushkamittal20 committed Jul 19, 2021
1 parent 2e3c1d6 commit 0871c0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func forwardEvent(falcopayload types.FalcoPayload) {
if config.WebUI.URL != "" {
go webUIClient.WebUIPost(falcopayload)
}
if config.PolicyReport.Enabled != false {
if config.PolicyReport.Enabled == true {

go policyReportClient.PolicyReportPost(falcopayload)
go policyReportClient.PolicyReportCreate(falcopayload)
}
}
6 changes: 3 additions & 3 deletions outputs/policyadapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewPolicyReportClient(config *types.Configuration, stats *types.Statistics,
if config.PolicyReport.Kubeconfig != "" {
restConfig, err := clientcmd.BuildConfigFromFlags("", config.PolicyReport.Kubeconfig)
if err != nil {
return nil, err
return nil, fmt.Errorf("unable to load kube config file: %v", err)
}
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil {
Expand Down Expand Up @@ -54,7 +54,7 @@ func NewPolicyReportClient(config *types.Configuration, stats *types.Statistics,

}

// PolicyAdapterPost receives falco payload
func (c *Client) PolicyReportPost(falcopayload types.FalcoPayload) {
// PolicyReportPost creates Policy Report Resource in Kubernetes
func (c *Client) PolicyReportCreate(falcopayload types.FalcoPayload) {
//to do
}

0 comments on commit 0871c0e

Please sign in to comment.