Skip to content

Commit

Permalink
helm: add service monitor scrape interval config
Browse files Browse the repository at this point in the history
this commit was related to the service monitor scrape interval option

Signed-off-by: Jack-R-lantern <[email protected]>
  • Loading branch information
Jack-R-lantern committed Oct 23, 2023
1 parent 1f4ca86 commit 52f1607
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/content/en/docs/reference/helm-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ To use [the values available](#values), with `helm install` or `helm upgrade`, u
| tetragon.prometheus.port | int | `2112` | The port at which to expose metrics. |
| tetragon.prometheus.serviceMonitor.enabled | bool | `false` | Whether to create a 'ServiceMonitor' resource targeting the 'tetragon' pods. |
| tetragon.prometheus.serviceMonitor.labelsOverride | object | `{}` | The set of labels to place on the 'ServiceMonitor' resource. |
| tetragon.prometheus.serviceMonitor.spec | object | `{"endpoints":{"interval":"10s"}}` | Specification of desired Service selection for target discovery by Prometheus. |
| tetragon.prometheus.serviceMonitor.spec.endpoints | object | `{"interval":"10s"}` | A list of endpoints allowed as part of this ServiceMonitor. |
| tetragon.prometheus.serviceMonitor.spec.endpoints.interval | string | `"10s"` | Interval at which metrics should be scraped If not specified Prometheus' global scrape interval is used. |
| tetragon.resources | object | `{}` | |
| tetragon.securityContext.privileged | bool | `true` | |
| tetragonOperator.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/tetragon-operator","suffix":"","tag":"v1.0.0-rc.1"}` | tetragon-operator image. |
Expand Down
3 changes: 3 additions & 0 deletions install/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Helm chart for Tetragon
| tetragon.prometheus.port | int | `2112` | The port at which to expose metrics. |
| tetragon.prometheus.serviceMonitor.enabled | bool | `false` | Whether to create a 'ServiceMonitor' resource targeting the 'tetragon' pods. |
| tetragon.prometheus.serviceMonitor.labelsOverride | object | `{}` | The set of labels to place on the 'ServiceMonitor' resource. |
| tetragon.prometheus.serviceMonitor.spec | object | `{"endpoints":{"interval":"10s"}}` | Specification of desired Service selection for target discovery by Prometheus. |
| tetragon.prometheus.serviceMonitor.spec.endpoints | object | `{"interval":"10s"}` | A list of endpoints allowed as part of this ServiceMonitor. |
| tetragon.prometheus.serviceMonitor.spec.endpoints.interval | string | `"10s"` | Interval at which metrics should be scraped If not specified Prometheus' global scrape interval is used. |
| tetragon.resources | object | `{}` | |
| tetragon.securityContext.privileged | bool | `true` | |
| tetragonOperator.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/tetragon-operator","suffix":"","tag":"v1.0.0-rc.1"}` | tetragon-operator image. |
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
spec:
endpoints:
- honorLabels: true
interval: 10s
interval: {{ .Values.tetragon.prometheus.serviceMonitor.spec.endpoints.interval }}
path: /metrics
port: metrics
relabelings:
Expand Down
6 changes: 6 additions & 0 deletions install/kubernetes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ tetragon:
enabled: false
# -- The set of labels to place on the 'ServiceMonitor' resource.
labelsOverride: {}
# -- Specification of desired Service selection for target discovery by Prometheus.
spec:
# -- A list of endpoints allowed as part of this ServiceMonitor.
endpoints:
# -- Interval at which metrics should be scraped If not specified Prometheus' global scrape interval is used.
interval: "10s"
grpc:
# -- Whether to enable exposing Tetragon gRPC.
enabled: true
Expand Down

0 comments on commit 52f1607

Please sign in to comment.