Skip to content

Commit 0a41a70

Browse files
vmscrapeconfig: support scrape_protocols option
1 parent 7533384 commit 0a41a70

File tree

13 files changed

+35
-14
lines changed

13 files changed

+35
-14
lines changed

api/operator/v1beta1/vmnodescrape_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type VMNodeScrapeSpec struct {
3838
// one of scrape_interval or interval can be used
3939
// +optional
4040
ScrapeInterval string `json:"scrape_interval,omitempty"`
41-
// Timeout after which the scrape is ended
41+
// ScrapeTimeout after which the scrape is ended
4242
// +optional
4343
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
4444
// OAuth2 defines auth configuration

api/operator/v1beta1/vmpodscrape_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ type PodMetricsEndpoint struct {
9191
// one of scrape_interval or interval can be used
9292
// +optional
9393
ScrapeInterval string `json:"scrape_interval,omitempty"`
94-
// Timeout after which the scrape is ended
94+
// ScrapeTimeout after which the scrape is ended
9595
// +optional
9696
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
9797
// SampleLimit defines per-podEndpoint limit on number of scraped samples that will be accepted.

api/operator/v1beta1/vmscrapeconfig_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ type VMScrapeConfigSpec struct {
6363
// ScrapeInterval is the interval between consecutive scrapes.
6464
// +optional
6565
ScrapeInterval string `json:"scrapeInterval,omitempty"`
66+
// ScrapeProtocols defines Prometheus scrape protocol.
67+
// +optional
68+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
6669
// ScrapeTimeout is the number of seconds to wait until a scrape request times out.
6770
// +optional
6871
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`

api/operator/v1beta1/vmservicescrape_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type Endpoint struct {
137137
// one of scrape_interval or interval can be used
138138
// +optional
139139
ScrapeInterval string `json:"scrape_interval,omitempty"`
140-
// Timeout after which the scrape is ended
140+
// ScrapeTimeout after which the scrape is ended
141141
// +optional
142142
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
143143
// SampleLimit defines per-endpoint limit on number of scraped samples that will be accepted.

api/operator/v1beta1/vmstaticscrape_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type TargetEndpoint struct {
6060
// one of scrape_interval or interval can be used
6161
// +optional
6262
ScrapeInterval string `json:"scrape_interval,omitempty"`
63-
// Timeout after which the scrape is ended
63+
// ScrapeTimeout after which the scrape is ended
6464
// +optional
6565
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
6666
// OAuth2 defines auth configuration

api/operator/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/overlay/crd.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16602,7 +16602,7 @@ spec:
1660216602
one of scrape_interval or interval can be used
1660316603
type: string
1660416604
scrapeTimeout:
16605-
description: Timeout after which the scrape is ended
16605+
description: ScrapeTimeout after which the scrape is ended
1660616606
type: string
1660716607
selector:
1660816608
description: Selector to select kubernetes Nodes.
@@ -17676,7 +17676,7 @@ spec:
1767617676
one of scrape_interval or interval can be used
1767717677
type: string
1767817678
scrapeTimeout:
17679-
description: Timeout after which the scrape is ended
17679+
description: ScrapeTimeout after which the scrape is ended
1768017680
type: string
1768117681
seriesLimit:
1768217682
description: |-
@@ -23134,6 +23134,11 @@ spec:
2313423134
- HTTP
2313523135
- HTTPS
2313623136
type: string
23137+
scrape_protocols:
23138+
description: ScrapeProtocols defines Prometheus scrape protocol.
23139+
items:
23140+
type: string
23141+
type: array
2313723142
scrapeInterval:
2313823143
description: ScrapeInterval is the interval between consecutive scrapes.
2313923144
type: string
@@ -24171,7 +24176,7 @@ spec:
2417124176
one of scrape_interval or interval can be used
2417224177
type: string
2417324178
scrapeTimeout:
24174-
description: Timeout after which the scrape is ended
24179+
description: ScrapeTimeout after which the scrape is ended
2417524180
type: string
2417624181
seriesLimit:
2417724182
description: |-
@@ -26924,7 +26929,7 @@ spec:
2692426929
one of scrape_interval or interval can be used
2692526930
type: string
2692626931
scrapeTimeout:
26927-
description: Timeout after which the scrape is ended
26932+
description: ScrapeTimeout after which the scrape is ended
2692826933
type: string
2692926934
seriesLimit:
2693026935
description: |-

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ aliases:
3232
- [operator](./README.md): fix VM CRs' `xxNamespaceSelector` and `xxSelector` options, previously they are inverted. See this [issue](https://github.com/VictoriaMetrics/operator/issues/980) for details.
3333
- [vmnodescrape](./api.md#vmnodescrape): remove duplicated `series_limit` and `sample_limit` fields in generated scrape_config. See [this issue](https://github.com/VictoriaMetrics/operator/issues/986).
3434

35+
- [vmservicescrape](./api.md#vmservicescrape), [vmpodscrape](./api.md#vmpodscrape), [vmnodescrape](./api.md#vmnodescrape) - added `scrape_protocols` parameter for scrape protocols configuration
36+
3537
<a name="v0.45.0"></a>
3638

3739
## [v0.45.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.45.0) - 10 Jun 2024

docs/api.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ _Appears in:_
652652
| `relabelConfigs` | RelabelConfigs to apply to samples during service discovery. | _[RelabelConfig](#relabelconfig) array_ | false |
653653
| `sampleLimit` | SampleLimit defines per-endpoint limit on number of scraped samples that will be accepted. | _integer_ | false |
654654
| `scheme` | HTTP scheme to use for scraping. | _string_ | false |
655-
| `scrapeTimeout` | Timeout after which the scrape is ended | _string_ | false |
655+
| `scrapeTimeout` | ScrapeTimeout after which the scrape is ended | _string_ | false |
656656
| `scrape_interval` | ScrapeInterval is the same as Interval and has priority over it.<br />one of scrape_interval or interval can be used | _string_ | false |
657657
| `seriesLimit` | SeriesLimit defines per-scrape limit on number of unique time series<br />a single target can expose during all the scrapes on the time window of 24h. | _integer_ | false |
658658
| `targetPort` | Name or number of the pod port this endpoint refers to. Mutually exclusive with port. | _[IntOrString](#intorstring)_ | false |
@@ -1218,7 +1218,7 @@ _Appears in:_
12181218
| `relabelConfigs` | RelabelConfigs to apply to samples during service discovery. | _[RelabelConfig](#relabelconfig) array_ | false |
12191219
| `sampleLimit` | SampleLimit defines per-podEndpoint limit on number of scraped samples that will be accepted. | _integer_ | false |
12201220
| `scheme` | HTTP scheme to use for scraping. | _string_ | false |
1221-
| `scrapeTimeout` | Timeout after which the scrape is ended | _string_ | false |
1221+
| `scrapeTimeout` | ScrapeTimeout after which the scrape is ended | _string_ | false |
12221222
| `scrape_interval` | ScrapeInterval is the same as Interval and has priority over it.<br />one of scrape_interval or interval can be used | _string_ | false |
12231223
| `seriesLimit` | SeriesLimit defines per-scrape limit on number of unique time series<br />a single target can expose during all the scrapes on the time window of 24h. | _integer_ | false |
12241224
| `tlsConfig` | TLSConfig configuration to use when scraping the endpoint | _[TLSConfig](#tlsconfig)_ | false |
@@ -1829,7 +1829,7 @@ _Appears in:_
18291829
| `relabelConfigs` | RelabelConfigs to apply to samples during service discovery. | _[RelabelConfig](#relabelconfig) array_ | false |
18301830
| `sampleLimit` | SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. | _integer_ | false |
18311831
| `scheme` | HTTP scheme to use for scraping. | _string_ | false |
1832-
| `scrapeTimeout` | Timeout after which the scrape is ended | _string_ | false |
1832+
| `scrapeTimeout` | ScrapeTimeout after which the scrape is ended | _string_ | false |
18331833
| `scrape_interval` | ScrapeInterval is the same as Interval and has priority over it.<br />one of scrape_interval or interval can be used | _string_ | false |
18341834
| `seriesLimit` | SeriesLimit defines per-scrape limit on number of unique time series<br />a single target can expose during all the scrapes on the time window of 24h. | _integer_ | false |
18351835
| `targets` | Targets static targets addresses in form of ["192.122.55.55:9100","some-name:9100"]. | _string array_ | true |
@@ -2782,7 +2782,7 @@ _Appears in:_
27822782
| `relabelConfigs` | RelabelConfigs to apply to samples during service discovery. | _[RelabelConfig](#relabelconfig) array_ | false |
27832783
| `sampleLimit` | SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. | _integer_ | false |
27842784
| `scheme` | HTTP scheme to use for scraping. | _string_ | false |
2785-
| `scrapeTimeout` | Timeout after which the scrape is ended | _string_ | false |
2785+
| `scrapeTimeout` | ScrapeTimeout after which the scrape is ended | _string_ | false |
27862786
| `scrape_interval` | ScrapeInterval is the same as Interval and has priority over it.<br />one of scrape_interval or interval can be used | _string_ | false |
27872787
| `selector` | Selector to select kubernetes Nodes. | _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v/#labelselector-v1-meta)_ | false |
27882788
| `seriesLimit` | SeriesLimit defines per-scrape limit on number of unique time series<br />a single target can expose during all the scrapes on the time window of 24h. | _integer_ | false |
@@ -3071,6 +3071,7 @@ _Appears in:_
30713071
| `scheme` | Configures the protocol scheme used for requests.<br />If empty, use HTTP by default. | _string_ | false |
30723072
| `scrapeInterval` | ScrapeInterval is the interval between consecutive scrapes. | _string_ | false |
30733073
| `scrapeTimeout` | ScrapeTimeout is the number of seconds to wait until a scrape request times out. | _string_ | false |
3074+
| `scrape_protocols` | ScrapeProtocols defines Prometheus scrape protocol. | _string array_ | false |
30743075
| `seriesLimit` | SeriesLimit defines per-scrape limit on number of unique time series<br />a single target can expose during all the scrapes on the time window of 24h. | _integer_ | false |
30753076
| `staticConfigs` | StaticConfigs defines a list of static targets with a common label set. | _[StaticConfig](#staticconfig) array_ | false |
30763077
| `tlsConfig` | TLS configuration to use on every scrape request | _[TLSConfig](#tlsconfig)_ | false |

docs/vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ menu:
1010

1111
<!-- this doc autogenerated - don't edit it manually -->
1212
# Auto Generated vars for package config
13-
updated at Tue Jul 2 15:08:03 UTC 2024
13+
updated at Tue Jul 2 17:12:36 UTC 2024
1414

1515

1616
| variable name | variable default value | variable required | variable description |

0 commit comments

Comments
 (0)