Skip to content

Commit

Permalink
updating logs and docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <[email protected]>
  • Loading branch information
JaydipGabani committed Jan 28, 2025
1 parent 2fba5c2 commit 2323228
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func setupControllers(ctx context.Context, mgr ctrl.Manager, tracker *readiness.
MutationSystem: mutationSystem,
ExpansionSystem: expansionSystem,
ProviderCache: providerCache,
ExportSystem: exportSystem,
ExportSystem: exportSystem,
}

if err := controller.AddToManager(mgr, &opts); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type Dependencies struct {
MutationSystem *mutation.System
ExpansionSystem *expansion.System
ProviderCache *externaldata.ProviderCache
ExportSystem *export.System
ExportSystem *export.System
SyncEventsCh chan event.GenericEvent
CacheMgr *cm.CacheManager
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/export/export_config_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
}

if len(cfg.Data) == 0 {
return reconcile.Result{}, fmt.Errorf(fmt.Sprintf("data missing in configmap %s, unable to establish connection", request.NamespacedName))
return reconcile.Result{}, fmt.Errorf(fmt.Sprintf("data missing in configmap %s, unable to configure exporter", request.NamespacedName))
}
if _, ok := cfg.Data["driver"]; !ok {
return reconcile.Result{}, fmt.Errorf(fmt.Sprintf("missing driver field in configmap %s, unable to establish connection", request.NamespacedName))
return reconcile.Result{}, fmt.Errorf(fmt.Sprintf("missing driver field in configmap %s, unable to configure exporter", request.NamespacedName))
}
var config interface{}
err = json.Unmarshal([]byte(cfg.Data["config"]), &config)
Expand Down
4 changes: 2 additions & 2 deletions website/docs/export-driver-walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: export-driver
title: Export Interface/Driver walkthrough
---

This guide provides an overview of the driver interface, including details of its structure and functionality. Additionally, it offers instructions on adding a new driver and utilizing different backends to export violations.
This guide provides an overview of the driver interface, including details of its structure and functionality. Additionally, it offers instructions on adding a new driver and utilizing different backends to export audit violations.

## Driver interface

Expand All @@ -25,7 +25,7 @@ type Driver interface {

As an example, the Dapr driver implements these methods to publish message and manage connection to do so. Please refer to [dapr.go](https://github.com/open-policy-agent/gatekeeper/blob/master/pkg/export/dapr/dapr.go) to understand the logic that goes in each of these methods.

### How to add new driver to export violations to foo backend
### How to add new driver to export audit violations to foo backend

A driver must maintain a map of open connections associated with backend `foo`.

Expand Down

0 comments on commit 2323228

Please sign in to comment.