mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
commit
4e11a19ae8
2 changed files with 10 additions and 5 deletions
|
@ -29,6 +29,7 @@ of the service endpoints. This is also made possible by the Prometheus Operator.
|
|||
| ---- | ----------- | -------- | ------ | ------- |
|
||||
| jobLabel | Service label of which the value is used to assemble a job name of the form `<label value>-<port>`. If no label is specified, the service name is used. | false | string | |
|
||||
| selector | Label selector for services the `ServiceMonitor` applies to. | true | [unversioned.LabelSelector](http://kubernetes.io/docs/api-reference/v1/definitions/#_unversioned_labelselector) | |
|
||||
| namespaceSelector | Namespaces from which services are selected. | false | NamespaceSelector | same namespace only |
|
||||
| endpoints | The endpoints to be monitored for endpoints of the selected services. | true | Endpoint array | |
|
||||
|
||||
### `Endpoint`
|
||||
|
@ -52,6 +53,13 @@ of the service endpoints. This is also made possible by the Prometheus Operator.
|
|||
| serverName | Server name used to verify host name | |
|
||||
| insecureSkipVerify | Skip certificate verification | false | bool | false |
|
||||
|
||||
### `NamespaceSelector`
|
||||
|
||||
| Name | Description | Required | Schema | Default |
|
||||
| ---- | ----------- | -------- | ------ | ------- |
|
||||
| any | Match any namespace | false | bool | false |
|
||||
| matchNames | Explicit list of namespace names to select | false | string array | |
|
||||
|
||||
|
||||
## Current state and roadmap
|
||||
|
||||
|
|
|
@ -107,10 +107,7 @@ type ServiceMonitorSpec struct {
|
|||
JobLabel string `json:"jobLabel"`
|
||||
Endpoints []Endpoint `json:"endpoints"`
|
||||
Selector metav1.LabelSelector `json:"selector"`
|
||||
NamespaceSelector Selector `json:"namespaceSelector"`
|
||||
// AllNamespaces bool `json:"allNamespaces"`
|
||||
// Namespaces []string `json:"namespaces"`
|
||||
// NamespaceSelector metav1.LabelSelector `json:"namespaceSelector"`
|
||||
NamespaceSelector NamespaceSelector `json:"namespaceSelector"`
|
||||
}
|
||||
|
||||
// Endpoint defines a scrapeable endpoint serving Prometheus metrics.
|
||||
|
@ -182,7 +179,7 @@ type AlertmanagerList struct {
|
|||
Items []Alertmanager `json:"items"`
|
||||
}
|
||||
|
||||
type Selector struct {
|
||||
type NamespaceSelector struct {
|
||||
Any bool `json:"any,omitempty"`
|
||||
MatchNames []string `json:"matchNames,omitempty"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue