Skip to content

Commit

Permalink
doc: add descriptions for helm values.
Browse files Browse the repository at this point in the history
Add descriptions for the values `helmPreUpgradeCheckerJob` and
`serviceMonitor`.

Ref: 7485

Signed-off-by: James Lu <james.lu@suse.com>
  • Loading branch information
mantissahz committed Jan 3, 2024
1 parent 65770d6 commit 24d54a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
24 changes: 21 additions & 3 deletions content/docs/1.6.0/monitoring/prometheus-and-grafana-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Follow instructions in [Prometheus Operator - Quickstart](https://github.com/pro
### Install Longhorn ServiceMonitor

#### Install Longhorn ServiceMonitor with Kubectl

1. Create a ServiceMonitor for Longhorn manager.

```yaml
Expand All @@ -61,9 +63,26 @@ Follow instructions in [Prometheus Operator - Quickstart](https://github.com/pro
- port: manager
```
Longhorn ServiceMonitor has a label selector `app: longhorn-manager` for selecting Longhorn backend service.
#### Install Longhorn ServiceMonitor with Helm
1. Modify the YAML file `longhorn/chart/values.yaml`.

```yaml
metrics:
serviceMonitor:
# -- Setting that allows the creation of a Prometheus ServiceMonitor resource for Longhorn Manager components.
enabled: true
```

1. Create a ServiceMonitor for Longhorn manager with Helm

```bash
helm upgrade longhorn longhorn/longhorn --namespace longhorn-system -f values.yaml
```

Longhorn ServiceMonitor is included in the Prometheus custom resource so that the Prometheus server can discover all Longhorn manager pods and their endpoints.
Longhorn ServiceMonitor has a label selector `app: longhorn-manager` for selecting Longhorn backend service.

Longhorn ServiceMonitor is included in the Prometheus custom resource so that the Prometheus server can discover all Longhorn manager pods and their endpoints.

### Install and configure Prometheus AlertManager

Expand Down Expand Up @@ -398,4 +417,3 @@ See [Prometheus - Configuration](https://prometheus.io/docs/alerting/latest/conf
You should see the following dashboard at successful setup:
![images](/img/screenshots/monitoring/longhorn-example-grafana-dashboard.png)
4 changes: 2 additions & 2 deletions content/docs/1.6.0/references/helm-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ Please also refer to this document [ocp-readme](https://github.com/longhorn/long
| annotations | `{}` | Annotations to add to the Longhorn Manager DaemonSet Pods. Optional. |
| enableGoCoverDir | `false` | Enable this to allow Longhorn to generate code coverage profiles |
| enablePSP | `false` | For Kubernetes < v1.25, if your cluster enables Pod Security Policy admission controller, set this to `true` to ship longhorn-psp which allow privileged Longhorn pods to start |
| helmPreUpgradeCheckerJob.enabled | `true` | |
| metrics.serviceMonitor.enabled | `false` | |
| helmPreUpgradeCheckerJob.enabled | `true` | Setting that allows Longhorn to perform pre-upgrade checks. Disable this setting when installing Longhorn using Argo CD or other GitOps solutions. |
| metrics.serviceMonitor.enabled | `false` | Setting that allows the creation of a Prometheus ServiceMonitor resource for Longhorn Manager components. |

### System Default Settings

Expand Down

0 comments on commit 24d54a3

Please sign in to comment.