Skip to content

Commit 9381fb9

Browse files
authored
feat: added monitoring.googleapis.com schema using CRD Extractor from a fresh GKE cluster (#569)
1 parent 50d8696 commit 9381fb9

13 files changed

+3899
-0
lines changed
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
{
2+
"description": "ClusterNodeMonitoring defines monitoring for a set of nodes.",
3+
"properties": {
4+
"apiVersion": {
5+
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
6+
"type": "string"
7+
},
8+
"kind": {
9+
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
10+
"type": "string"
11+
},
12+
"metadata": {
13+
"type": "object"
14+
},
15+
"spec": {
16+
"description": "Specification of desired node selection for target discovery by\nPrometheus.",
17+
"properties": {
18+
"endpoints": {
19+
"description": "The endpoints to scrape on the selected nodes.",
20+
"items": {
21+
"description": "ScrapeNodeEndpoint specifies a Prometheus metrics endpoint on a node to scrape.\nIt contains all the fields used in the ScrapeEndpoint except for port and HTTPClientConfig.",
22+
"properties": {
23+
"interval": {
24+
"default": "1m",
25+
"description": "Interval at which to scrape metrics. Must be a valid Prometheus duration.",
26+
"pattern": "^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$",
27+
"type": "string"
28+
},
29+
"metricRelabeling": {
30+
"description": "Relabeling rules for metrics scraped from this endpoint. Relabeling rules that\noverride protected target labels (project_id, location, cluster, namespace, job,\ninstance, or __address__) are not permitted. The labelmap action is not permitted\nin general.",
31+
"items": {
32+
"description": "RelabelingRule defines a single Prometheus relabeling rule.",
33+
"properties": {
34+
"action": {
35+
"description": "Action to perform based on regex matching. Defaults to 'replace'.",
36+
"type": "string"
37+
},
38+
"modulus": {
39+
"description": "Modulus to take of the hash of the source label values.",
40+
"format": "int64",
41+
"type": "integer"
42+
},
43+
"regex": {
44+
"description": "Regular expression against which the extracted value is matched. Defaults to '(.*)'.",
45+
"type": "string"
46+
},
47+
"replacement": {
48+
"description": "Replacement value against which a regex replace is performed if the\nregular expression matches. Regex capture groups are available. Defaults to '$1'.",
49+
"type": "string"
50+
},
51+
"separator": {
52+
"description": "Separator placed between concatenated source label values. Defaults to ';'.",
53+
"type": "string"
54+
},
55+
"sourceLabels": {
56+
"description": "The source labels select values from existing labels. Their content is concatenated\nusing the configured separator and matched against the configured regular expression\nfor the replace, keep, and drop actions.",
57+
"items": {
58+
"type": "string"
59+
},
60+
"type": "array"
61+
},
62+
"targetLabel": {
63+
"description": "Label to which the resulting value is written in a replace action.\nIt is mandatory for replace actions. Regex capture groups are available.",
64+
"type": "string"
65+
}
66+
},
67+
"type": "object",
68+
"additionalProperties": false
69+
},
70+
"type": "array"
71+
},
72+
"params": {
73+
"additionalProperties": {
74+
"items": {
75+
"type": "string"
76+
},
77+
"type": "array"
78+
},
79+
"description": "HTTP GET params to use when scraping.",
80+
"type": "object"
81+
},
82+
"path": {
83+
"description": "HTTP path to scrape metrics from. Defaults to \"/metrics\".",
84+
"type": "string"
85+
},
86+
"scheme": {
87+
"description": "Protocol scheme to use to scrape.",
88+
"type": "string"
89+
},
90+
"timeout": {
91+
"description": "Timeout for metrics scrapes. Must be a valid Prometheus duration.\nMust not be larger then the scrape interval.",
92+
"type": "string"
93+
},
94+
"tls": {
95+
"description": "TLS configures the scrape request's TLS settings.",
96+
"properties": {
97+
"insecureSkipVerify": {
98+
"description": "InsecureSkipVerify disables target certificate validation.",
99+
"type": "boolean"
100+
}
101+
},
102+
"type": "object",
103+
"additionalProperties": false
104+
}
105+
},
106+
"type": "object",
107+
"additionalProperties": false
108+
},
109+
"type": "array"
110+
},
111+
"limits": {
112+
"description": "Limits to apply at scrape time.",
113+
"properties": {
114+
"labelNameLength": {
115+
"description": "Maximum label name length.\nUses Prometheus default if left unspecified.",
116+
"format": "int64",
117+
"type": "integer"
118+
},
119+
"labelValueLength": {
120+
"description": "Maximum label value length.\nUses Prometheus default if left unspecified.",
121+
"format": "int64",
122+
"type": "integer"
123+
},
124+
"labels": {
125+
"description": "Maximum number of labels accepted for a single sample.\nUses Prometheus default if left unspecified.",
126+
"format": "int64",
127+
"type": "integer"
128+
},
129+
"samples": {
130+
"description": "Maximum number of samples accepted within a single scrape.\nUses Prometheus default if left unspecified.",
131+
"format": "int64",
132+
"type": "integer"
133+
}
134+
},
135+
"type": "object",
136+
"additionalProperties": false
137+
},
138+
"selector": {
139+
"description": "Label selector that specifies which nodes are selected for this monitoring\nconfiguration. If left empty all nodes are selected.",
140+
"properties": {
141+
"matchExpressions": {
142+
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
143+
"items": {
144+
"description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
145+
"properties": {
146+
"key": {
147+
"description": "key is the label key that the selector applies to.",
148+
"type": "string"
149+
},
150+
"operator": {
151+
"description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
152+
"type": "string"
153+
},
154+
"values": {
155+
"description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
156+
"items": {
157+
"type": "string"
158+
},
159+
"type": "array",
160+
"x-kubernetes-list-type": "atomic"
161+
}
162+
},
163+
"required": [
164+
"key",
165+
"operator"
166+
],
167+
"type": "object",
168+
"additionalProperties": false
169+
},
170+
"type": "array",
171+
"x-kubernetes-list-type": "atomic"
172+
},
173+
"matchLabels": {
174+
"additionalProperties": {
175+
"type": "string"
176+
},
177+
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
178+
"type": "object"
179+
}
180+
},
181+
"type": "object",
182+
"x-kubernetes-map-type": "atomic",
183+
"additionalProperties": false
184+
}
185+
},
186+
"required": [
187+
"endpoints"
188+
],
189+
"type": "object",
190+
"additionalProperties": false
191+
},
192+
"status": {
193+
"description": "Most recently observed status of the resource.",
194+
"properties": {
195+
"conditions": {
196+
"description": "Represents the latest available observations of a podmonitor's current state.",
197+
"items": {
198+
"description": "MonitoringCondition describes the condition of a PodMonitoring.",
199+
"properties": {
200+
"lastTransitionTime": {
201+
"description": "Last time the condition transitioned from one status to another.",
202+
"format": "date-time",
203+
"type": "string"
204+
},
205+
"lastUpdateTime": {
206+
"description": "The last time this condition was updated.",
207+
"format": "date-time",
208+
"type": "string"
209+
},
210+
"message": {
211+
"description": "A human-readable message indicating details about the transition.",
212+
"type": "string"
213+
},
214+
"reason": {
215+
"description": "The reason for the condition's last transition.",
216+
"type": "string"
217+
},
218+
"status": {
219+
"description": "Status of the condition, one of True, False, Unknown.",
220+
"type": "string"
221+
},
222+
"type": {
223+
"description": "MonitoringConditionType is the type of MonitoringCondition.",
224+
"type": "string"
225+
}
226+
},
227+
"required": [
228+
"status",
229+
"type"
230+
],
231+
"type": "object",
232+
"additionalProperties": false
233+
},
234+
"type": "array"
235+
},
236+
"observedGeneration": {
237+
"description": "The generation observed by the controller.",
238+
"format": "int64",
239+
"type": "integer"
240+
}
241+
},
242+
"type": "object",
243+
"additionalProperties": false
244+
}
245+
},
246+
"required": [
247+
"spec"
248+
],
249+
"type": "object"
250+
}

0 commit comments

Comments
 (0)