Skip to content

Commit

Permalink
Add additional labels support to validator servicemonitor (#78)
Browse files Browse the repository at this point in the history
* Add additional labels support to validator servicemonitor

* Update README and values.schema.json for modified charts

* Trigger CI

* Update Chart.yaml

---------

Co-authored-by: a-thomas-22 <[email protected]>
  • Loading branch information
a-thomas-22 and a-thomas-22 authored Aug 29, 2024
1 parent 9b0542e commit 27fc649
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nitro/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:

type: application

version: 0.6.12
version: 0.6.13

appVersion: "v3.1.2-309340a"
2 changes: 2 additions & 0 deletions charts/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ helm install xai offchainlabs/nitro -f values.yaml
| `serviceMonitor.portName` | Name of the port to monitor | `metrics` |
| `serviceMonitor.path` | Path to monitor | `/debug/metrics/prometheus` |
| `serviceMonitor.interval` | Interval to monitor | `5s` |
| `serviceMonitor.additionalLabels` | Additional labels for the service monitor | `{}` |
| `serviceMonitor.relabelings` | Add relabelings for the metrics being scraped | `[]` |
| `perReplicaService.enabled` | Enable a service for each sts replica | `false` |
| `perReplicaService.publishNotReadyAddresses` | Publish not ready addresses | `true` |
Expand Down Expand Up @@ -191,6 +192,7 @@ helm install xai offchainlabs/nitro -f values.yaml
| `validator.splitvalidator.global.serviceMonitor.portName` | Name of the port to monitor | `metrics` |
| `validator.splitvalidator.global.serviceMonitor.path` | Path to monitor | `/debug/metrics/prometheus` |
| `validator.splitvalidator.global.serviceMonitor.interval` | Interval to monitor | `5s` |
| `validator.splitvalidator.global.serviceMonitor.additionalLabels` | Additional labels for the service monitor | `{}` |
| `validator.splitvalidator.global.serviceMonitor.relabelings` | Add relabelings for the metrics being scraped | `[]` |
| `validator.splitvalidator.global.livenessProbe.enabled` | Enable the liveness probe for the validator statefulset | `true` |
| `validator.splitvalidator.global.livenessProbe.tcpSocket.port` | Port to probe | `auth` |
Expand Down
3 changes: 3 additions & 0 deletions charts/nitro/templates/validator/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata:
name: {{ include "nitro.fullname" $ }}-val-{{ .name }}
labels:
{{- $labels | nindent 4 }}
{{- if $mergedValues.serviceMonitor.additionalLabels }}
{{- toYaml $mergedValues.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions charts/nitro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ blobPersistence:
## @param serviceMonitor.portName Name of the port to monitor
## @param serviceMonitor.path Path to monitor
## @param serviceMonitor.interval Interval to monitor
## @param serviceMonitor.additionalLabels Additional labels for the service monitor
## @param serviceMonitor.relabelings Add relabelings for the metrics being scraped
serviceMonitor:
enabled: false
portName: metrics
path: /debug/metrics/prometheus
interval: 5s
additionalLabels: {}
relabelings: []

## @param perReplicaService.enabled Enable a service for each sts replica
Expand Down Expand Up @@ -324,6 +326,8 @@ validator:
path: /debug/metrics/prometheus
## @param validator.splitvalidator.global.serviceMonitor.interval Interval to monitor
interval: 5s
## @param validator.splitvalidator.global.serviceMonitor.additionalLabels Additional labels for the service monitor
additionalLabels: {}
## @param validator.splitvalidator.global.serviceMonitor.relabelings Add relabelings for the metrics being scraped
relabelings: []

Expand Down

0 comments on commit 27fc649

Please sign in to comment.