Skip to content

Commit

Permalink
docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
docs.yml committed Oct 24, 2024
1 parent 218a88a commit 118be44
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions site/content/en/main/user-guide/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ You can display warnings in the logs by setting the `PEPR_NODE_WARNINGS` environ

## Customizing Log Format

The log format can be customized by setting the `PINO_TIME_STAMP` environment variable in the `package.json` file or directly on the Watcher or Admission `Deployment`. The default value is a partial JSON timestamp string representation of the time. If set to `iso`, the timestamp is displayed in an ISO format.
The log format can be customized by setting the `PINO_TIME_STAMP` environment variable in the `package.json` file or directly on the Watcher or Admission `Deployment`. The default value is a partial JSON timestamp string representation of the time. If set to `iso`, the timestamp is displayed in an ISO format.

**Caution**: attempting to format time in-process will significantly impact logging performance.
**Caution**: attempting to format time in-process will significantly impact logging performance.

```json
{
Expand All @@ -50,13 +50,13 @@ With ISO:
{"level":30,"time":"2024-05-14T14:26:03.788Z","pid":16,"hostname":"pepr-static-test-7f4d54b6cc-9lxm6","method":"GET","url":"/healthz","status":200,"duration":"1 ms"}
```

Default (without):
Default (without):

```json
{"level":30,"time":"1715696764106","pid":16,"hostname":"pepr-static-test-watcher-559d94447f-xkq2h","method":"GET","url":"/healthz","status":200,"duration":"1 ms"}
```

## Customizing Watch Configuration
## Customizing Watch Configuration

The Watch configuration is a part of the Pepr module that allows you to watch for specific resources in the Kubernetes cluster. The Watch configuration can be customized by specific enviroment variables of the Watcher Deployment and can be set in the field in the `package.json` or in the helm `values.yaml` file.

Expand Down Expand Up @@ -136,5 +136,29 @@ Below are the available configurations through `package.json`.
| `alwaysIgnore` | Conditions to always ignore | `{namespaces: []}` |
| `includedFiles` | For working with WebAssembly | ["main.wasm", "wasm_exec.js"] |
| `env` | Environment variables for the container| `{LOG_LEVEL: "warn"}` |
| `rbac` | Custom RBAC rules | `{"rbac": [{"apiGroups": ["<apiGroups>"], "resources": ["<resources>"], "verbs": ["<verbs>"]}]}` |

These tables provide a comprehensive overview of the fields available for customization within the Helm overrides and the `package.json` file. Modify these according to your deployment requirements.

### Example Custom RBAC Rules

The following example demonstrates how to add custom RBAC rules to the Pepr module.

```json
{
"pepr": {
"rbac": [
{
"apiGroups": ["pepr.dev"],
"resources": ["customresources"],
"verbs": ["get", "list"]
},
{
"apiGroups": ["apps"],
"resources": ["deployments"],
"verbs": ["create", "delete"]
}
]
}
}
```

0 comments on commit 118be44

Please sign in to comment.