Skip to content

Commit

Permalink
add documentation for exposing operator metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
pb82 committed Aug 20, 2021
1 parent 90d5790 commit f1f24ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions documentation/deploy_grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ Or using the kustomize cli.
kustomize build config/install |kubectl apply -f -
```

#### Operator metrics

By default Operator metrics are exposed but protected. Please refer to [this guide](https://book.kubebuilder.io/reference/metrics.html#metrics) for instruction about how to access and scrape them.

If you would like to expose the metrics directly, bypassing `kube-rbac-proxy`, you need to make the following changes:

1. Edit `config/manager/controler_manager_config.yaml` and set the `metrics.bindAddress` to `0.0.0.0:8080`
2. Disable `- manager_auth_proxy_patch.yaml` in `config/default/kustomization.yaml` by commenting it. This will disable the `kube-rbac-proxy`
3. Change the port in `config/rbac/auto_proxy_service.yaml` to:
```
ports:
- name: metrics
port: 8080
```
4. Install using `kustomize` as described in the previous chapter

## Grafana image Support Chart

Please take note of this chart when wanting to deploy custom grafana images through either `--grafana-image` operator
Expand Down

0 comments on commit f1f24ad

Please sign in to comment.