Skip to content

Commit 7e56086

Browse files
vmpodscrape/vmservicescrape/vmnodescrape/vmstaticscrape: support scrape_protocols option
1 parent e9b2e9c commit 7e56086

21 files changed

+108
-13
lines changed

api/v1beta1/vmnodescrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ 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"`
44+
// ScrapeProtocols defines Prometheus scrape protocol.
45+
// +optional
46+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
4447
// OAuth2 defines auth configuration
4548
// +optional
4649
OAuth2 *OAuth2 `json:"oauth2,omitempty"`

api/v1beta1/vmpodscrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type PodMetricsEndpoint struct {
9797
// one of scrape_interval or interval can be used
9898
// +optional
9999
ScrapeInterval string `json:"scrape_interval,omitempty"`
100-
// Timeout after which the scrape is ended
100+
// ScrapeTimeout after which the scrape is ended
101101
// +optional
102102
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
103103
// SampleLimit defines per-podEndpoint limit on number of scraped samples that will be accepted.
@@ -107,6 +107,9 @@ type PodMetricsEndpoint struct {
107107
// a single target can expose during all the scrapes on the time window of 24h.
108108
// +optional
109109
SeriesLimit uint64 `json:"seriesLimit,omitempty"`
110+
// ScrapeProtocols defines Prometheus scrape protocol.
111+
// +optional
112+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
110113
// HonorLabels chooses the metric's labels on collisions with target labels.
111114
// +optional
112115
HonorLabels bool `json:"honorLabels,omitempty"`

api/v1beta1/vmservicescrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ type Endpoint struct {
140140
// one of scrape_interval or interval can be used
141141
// +optional
142142
ScrapeInterval string `json:"scrape_interval,omitempty"`
143-
// Timeout after which the scrape is ended
143+
// ScrapeTimeout after which the scrape is ended
144144
// +optional
145145
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
146146
// SampleLimit defines per-endpoint limit on number of scraped samples that will be accepted.
@@ -150,6 +150,9 @@ type Endpoint struct {
150150
// a single target can expose during all the scrapes on the time window of 24h.
151151
// +optional
152152
SeriesLimit uint64 `json:"seriesLimit,omitempty"`
153+
// ScrapeProtocols defines Prometheus scrape protocol.
154+
// +optional
155+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
153156
// OAuth2 defines auth configuration
154157
// +optional
155158
OAuth2 *OAuth2 `json:"oauth2,omitempty"`

api/v1beta1/vmstaticscrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ 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"`
66+
// ScrapeProtocols defines Prometheus scrape protocol.
67+
// +optional
68+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
6669
// OAuth2 defines auth configuration
6770
// +optional
6871
OAuth2 *OAuth2 `json:"oauth2,omitempty"`

api/v1beta1/zz_generated.deepcopy.go

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

api/victoriametrics/v1beta1/vmnodescrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ 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"`
44+
// ScrapeProtocols defines Prometheus scrape protocol.
45+
// +optional
46+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
4447
// OAuth2 defines auth configuration
4548
// +optional
4649
OAuth2 *OAuth2 `json:"oauth2,omitempty"`

api/victoriametrics/v1beta1/vmpodscrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ type PodMetricsEndpoint struct {
9797
// one of scrape_interval or interval can be used
9898
// +optional
9999
ScrapeInterval string `json:"scrape_interval,omitempty"`
100-
// Timeout after which the scrape is ended
100+
// ScrapeTimeout after which the scrape is ended
101101
// +optional
102102
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
103+
// ScrapeProtocols defines Prometheus scrape protocol.
104+
// +optional
105+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
103106
// SampleLimit defines per-podEndpoint limit on number of scraped samples that will be accepted.
104107
// +optional
105108
SampleLimit uint64 `json:"sampleLimit,omitempty"`

api/victoriametrics/v1beta1/vmservicescrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,12 @@ type Endpoint struct {
140140
// one of scrape_interval or interval can be used
141141
// +optional
142142
ScrapeInterval string `json:"scrape_interval,omitempty"`
143-
// Timeout after which the scrape is ended
143+
// ScrapeTimeout after which the scrape is ended
144144
// +optional
145145
ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
146+
// ScrapeProtocols defines Prometheus scrape protocol.
147+
// +optional
148+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
146149
// SampleLimit defines per-endpoint limit on number of scraped samples that will be accepted.
147150
// +optional
148151
SampleLimit uint64 `json:"sampleLimit,omitempty"`

api/victoriametrics/v1beta1/vmstaticscrape_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ 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"`
66+
// ScrapeProtocols defines Prometheus scrape protocol.
67+
// +optional
68+
ScrapeProtocols []string `json:"scrape_protocols,omitempty"`
6669
// OAuth2 defines auth configuration
6770
// +optional
6871
OAuth2 *OAuth2 `json:"oauth2,omitempty"`

config/crd/bases/operator.victoriametrics.com_vmnodescrapes.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,13 @@ spec:
425425
ScrapeInterval is the same as Interval and has priority over it.
426426
one of scrape_interval or interval can be used
427427
type: string
428+
scrape_protocols:
429+
description: ScrapeProtocols defines Prometheus scrape protocol.
430+
items:
431+
type: string
432+
type: array
428433
scrapeTimeout:
429-
description: Timeout after which the scrape is ended
434+
description: ScrapeTimeout after which the scrape is ended
430435
type: string
431436
selector:
432437
description: Selector to select kubernetes Nodes.

0 commit comments

Comments
 (0)