serviceMonitor
serviceMonitor objects to be generated by the chart. Additional ServiceMonitors can be added by adding a dictionary key similar to the ‘main’ ServiceMonitor.
object
Keys are identifiers for serviceMonitor instances.
serviceMonitor: main: enabled: true # ... configuration
secondary: enabled: true # ... configurationInstance Properties
Section titled “Instance Properties”Available properties:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
annotations | object / null | No | - | Annotations to set on the item. Keys and values support H… |
enabled | boolean | No | true | Set to false to disable the ServiceMonitor. |
endpoints | array | No | - | Endpoints allowed as part of this ServiceMonitor. |
forceRename | string | No | - | Override the default resource name. Mutually exclusive wi… |
jobLabel | string | No | app.kubernetes.io/name | The label to use to retrieve the job name from the target… |
labels | object / null | No | - | Labels to set on the item. Keys and values support Helm t… |
prefix | string | No | “ | Prefix to prepend to the resource name. Mutually exclusiv… |
selector | object | No | - | Selector to select Endpoints objects. |
service | object | No | - | Service to monitor. Either ‘serviceName’ or ’… |
serviceName | string | No | - | Reference to a Service name to monitor. Deprecated in fav… |
suffix | string | No | - | Suffix to append to the resource name. Defaults to the re… |
targetLabels | array | No | - | Transfers labels from the Kubernetes Service onto the cre… |
Property Details
Section titled “Property Details”annotations
Section titled “annotations”Annotations to set on the item. Keys and values support Helm templating.
forceRename
Section titled “forceRename”Override the default resource name. Mutually exclusive with prefix and suffix.
jobLabel
Section titled “jobLabel”The label to use to retrieve the job name from the target service’s metadata. Defaults to ‘app.kubernetes.io/name’.
labels
Section titled “labels”Labels to set on the item. Keys and values support Helm templating.
prefix
Section titled “prefix”Prefix to prepend to the resource name. Mutually exclusive with forceRename.
serviceName
Section titled “serviceName”Reference to a Service name to monitor. Deprecated in favor of ‘service’.
suffix
Section titled “suffix”Suffix to append to the resource name. Defaults to the resource identifier if there are multiple items, otherwise empty. Mutually exclusive with forceRename.
targetLabels
Section titled “targetLabels”Transfers labels from the Kubernetes Service onto the created metrics. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitorspec for details.