· 4 years ago · Mar 18, 2021, 04:36 PM
1apiVersion: apiextensions.k8s.io/v1
2kind: CustomResourceDefinition
3metadata:
4 creationTimestamp: "2019-08-27T13:42:34Z"
5 generation: 1
6 name: prometheusrules.monitoring.coreos.com
7 resourceVersion: "31237176"
8 selfLink: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/prometheusrules.monitoring.coreos.com
9 uid: 8667526a-c8d0-11e9-952d-0a193e92b2b8
10spec:
11 conversion:
12 strategy: None
13 group: monitoring.coreos.com
14 names:
15 kind: PrometheusRule
16 listKind: PrometheusRuleList
17 plural: prometheusrules
18 singular: prometheusrule
19 preserveUnknownFields: true
20 scope: Namespaced
21 versions:
22 - name: v1
23 schema:
24 openAPIV3Schema:
25 properties:
26 apiVersion:
27 description: 'APIVersion defines the versioned schema of this representation
28 of an object. Servers should convert recognized schemas to the latest
29 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
30 type: string
31 kind:
32 description: 'Kind is a string value representing the REST resource this
33 object represents. Servers may infer this from the endpoint the client
34 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
35 type: string
36 metadata:
37 description: ObjectMeta is metadata that all persisted resources must
38 have, which includes all objects users must create.
39 properties:
40 annotations:
41 description: 'Annotations is an unstructured key value map stored
42 with a resource that may be set by external tools to store and retrieve
43 arbitrary metadata. They are not queryable and should be preserved
44 when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
45 type: object
46 clusterName:
47 description: The name of the cluster which the object belongs to.
48 This is used to distinguish resources with same name and namespace
49 in different clusters. This field is not set anywhere right now
50 and apiserver is going to ignore it if set in create or update request.
51 type: string
52 creationTimestamp:
53 description: Time is a wrapper around time.Time which supports correct
54 marshaling to YAML and JSON. Wrappers are provided for many of
55 the factory methods that the time package offers.
56 format: date-time
57 type: string
58 deletionGracePeriodSeconds:
59 description: Number of seconds allowed for this object to gracefully
60 terminate before it will be removed from the system. Only set when
61 deletionTimestamp is also set. May only be shortened. Read-only.
62 format: int64
63 type: integer
64 deletionTimestamp:
65 description: Time is a wrapper around time.Time which supports correct
66 marshaling to YAML and JSON. Wrappers are provided for many of
67 the factory methods that the time package offers.
68 format: date-time
69 type: string
70 finalizers:
71 description: Must be empty before the object is deleted from the registry.
72 Each entry is an identifier for the responsible component that will
73 remove the entry from the list. If the deletionTimestamp of the
74 object is non-nil, entries in this list can only be removed.
75 items:
76 type: string
77 type: array
78 generateName:
79 description: |-
80 GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
81
82 If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
83
84 Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
85 type: string
86 generation:
87 description: A sequence number representing a specific generation
88 of the desired state. Populated by the system. Read-only.
89 format: int64
90 type: integer
91 initializers:
92 description: Initializers tracks the progress of initialization.
93 properties:
94 pending:
95 description: Pending is a list of initializers that must execute
96 in order before this object is visible. When the last pending
97 initializer is removed, and no failing result is set, the initializers
98 struct will be set to nil and the object is considered as initialized
99 and visible to all clients.
100 items:
101 description: Initializer is information about an initializer
102 that has not yet completed.
103 properties:
104 name:
105 description: name of the process that is responsible for
106 initializing this object.
107 type: string
108 required:
109 - name
110 type: object
111 type: array
112 result:
113 description: Status is a return value for calls that don't return
114 other objects.
115 properties:
116 apiVersion:
117 description: 'APIVersion defines the versioned schema of this
118 representation of an object. Servers should convert recognized
119 schemas to the latest internal value, and may reject unrecognized
120 values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
121 type: string
122 code:
123 description: Suggested HTTP return code for this status, 0
124 if not set.
125 format: int32
126 type: integer
127 details:
128 description: StatusDetails is a set of additional properties
129 that MAY be set by the server to provide additional information
130 about a response. The Reason field of a Status object defines
131 what attributes will be set. Clients must ignore fields
132 that do not match the defined type of each attribute, and
133 should assume that any attribute may be empty, invalid,
134 or under defined.
135 properties:
136 causes:
137 description: The Causes array includes more details associated
138 with the StatusReason failure. Not all StatusReasons
139 may provide detailed causes.
140 items:
141 description: StatusCause provides more information about
142 an api.Status failure, including cases when multiple
143 errors are encountered.
144 properties:
145 field:
146 description: |-
147 The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
148
149 Examples:
150 "name" - the field "name" on the current resource
151 "items[0].name" - the field "name" on the first array entry in "items"
152 type: string
153 message:
154 description: A human-readable description of the
155 cause of the error. This field may be presented
156 as-is to a reader.
157 type: string
158 reason:
159 description: A machine-readable description of the
160 cause of the error. If this value is empty there
161 is no information available.
162 type: string
163 type: object
164 type: array
165 group:
166 description: The group attribute of the resource associated
167 with the status StatusReason.
168 type: string
169 kind:
170 description: 'The kind attribute of the resource associated
171 with the status StatusReason. On some operations may
172 differ from the requested resource Kind. More info:
173 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
174 type: string
175 name:
176 description: The name attribute of the resource associated
177 with the status StatusReason (when there is a single
178 name which can be described).
179 type: string
180 retryAfterSeconds:
181 description: If specified, the time in seconds before
182 the operation should be retried. Some errors may indicate
183 the client must take an alternate action - for those
184 errors this field may indicate how long to wait before
185 taking the alternate action.
186 format: int32
187 type: integer
188 uid:
189 description: 'UID of the resource. (when there is a single
190 resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
191 type: string
192 type: object
193 kind:
194 description: 'Kind is a string value representing the REST
195 resource this object represents. Servers may infer this
196 from the endpoint the client submits requests to. Cannot
197 be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
198 type: string
199 message:
200 description: A human-readable description of the status of
201 this operation.
202 type: string
203 metadata:
204 description: ListMeta describes metadata that synthetic resources
205 must have, including lists and various status objects. A
206 resource may have only one of {ObjectMeta, ListMeta}.
207 properties:
208 continue:
209 description: continue may be set if the user set a limit
210 on the number of items returned, and indicates that
211 the server has more data available. The value is opaque
212 and may be used to issue another request to the endpoint
213 that served this list to retrieve the next set of available
214 objects. Continuing a consistent list may not be possible
215 if the server configuration has changed or more than
216 a few minutes have passed. The resourceVersion field
217 returned when using this continue value will be identical
218 to the value in the first response, unless you have
219 received this token from an error message.
220 type: string
221 resourceVersion:
222 description: 'String that identifies the server''s internal
223 version of this object that can be used by clients to
224 determine when objects have changed. Value must be treated
225 as opaque by clients and passed unmodified back to the
226 server. Populated by the system. Read-only. More info:
227 https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency'
228 type: string
229 selfLink:
230 description: selfLink is a URL representing this object.
231 Populated by the system. Read-only.
232 type: string
233 type: object
234 reason:
235 description: A machine-readable description of why this operation
236 is in the "Failure" status. If this value is empty there
237 is no information available. A Reason clarifies an HTTP
238 status code but does not override it.
239 type: string
240 status:
241 description: 'Status of the operation. One of: "Success" or
242 "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
243 type: string
244 type: object
245 required:
246 - pending
247 type: object
248 labels:
249 description: 'Map of string keys and values that can be used to organize
250 and categorize (scope and select) objects. May match selectors of
251 replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
252 type: object
253 managedFields:
254 description: |-
255 ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object.
256
257 This field is alpha and can be changed or removed without notice.
258 items:
259 description: ManagedFieldsEntry is a workflow-id, a FieldSet and
260 the group version of the resource that the fieldset applies to.
261 properties:
262 apiVersion:
263 description: APIVersion defines the version of this resource
264 that this field set applies to. The format is "group/version"
265 just like the top-level APIVersion field. It is necessary
266 to track the version of a field set because it cannot be automatically
267 converted.
268 type: string
269 fields:
270 description: 'Fields stores a set of fields in a data structure
271 like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff'
272 type: object
273 manager:
274 description: Manager is an identifier of the workflow managing
275 these fields.
276 type: string
277 operation:
278 description: Operation is the type of operation which lead to
279 this ManagedFieldsEntry being created. The only valid values
280 for this field are 'Apply' and 'Update'.
281 type: string
282 time:
283 description: Time is a wrapper around time.Time which supports
284 correct marshaling to YAML and JSON. Wrappers are provided
285 for many of the factory methods that the time package offers.
286 format: date-time
287 type: string
288 type: object
289 type: array
290 name:
291 description: 'Name must be unique within a namespace. Is required
292 when creating resources, although some resources may allow a client
293 to request the generation of an appropriate name automatically.
294 Name is primarily intended for creation idempotence and configuration
295 definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
296 type: string
297 namespace:
298 description: |-
299 Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
300
301 Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
302 type: string
303 ownerReferences:
304 description: List of objects depended by this object. If ALL objects
305 in the list have been deleted, this object will be garbage collected.
306 If this object is managed by a controller, then an entry in this
307 list will point to this controller, with the controller field set
308 to true. There cannot be more than one managing controller.
309 items:
310 description: OwnerReference contains enough information to let you
311 identify an owning object. An owning object must be in the same
312 namespace as the dependent, or be cluster-scoped, so there is
313 no namespace field.
314 properties:
315 apiVersion:
316 description: API version of the referent.
317 type: string
318 blockOwnerDeletion:
319 description: If true, AND if the owner has the "foregroundDeletion"
320 finalizer, then the owner cannot be deleted from the key-value
321 store until this reference is removed. Defaults to false.
322 To set this field, a user needs "delete" permission of the
323 owner, otherwise 422 (Unprocessable Entity) will be returned.
324 type: boolean
325 controller:
326 description: If true, this reference points to the managing
327 controller.
328 type: boolean
329 kind:
330 description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
331 type: string
332 name:
333 description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
334 type: string
335 uid:
336 description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
337 type: string
338 required:
339 - apiVersion
340 - kind
341 - name
342 - uid
343 type: object
344 type: array
345 resourceVersion:
346 description: |-
347 An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
348
349 Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
350 type: string
351 selfLink:
352 description: SelfLink is a URL representing this object. Populated
353 by the system. Read-only.
354 type: string
355 uid:
356 description: |-
357 UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
358
359 Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
360 type: string
361 type: object
362 spec:
363 description: PrometheusRuleSpec contains specification parameters for
364 a Rule.
365 properties:
366 groups:
367 description: Content of Prometheus rule file
368 items:
369 description: RuleGroup is a list of sequentially evaluated recording
370 and alerting rules.
371 properties:
372 interval:
373 type: string
374 name:
375 type: string
376 rules:
377 items:
378 description: Rule describes an alerting or recording rule.
379 properties:
380 alert:
381 type: string
382 annotations:
383 type: object
384 expr:
385 anyOf:
386 - type: string
387 - type: integer
388 for:
389 type: string
390 labels:
391 type: object
392 record:
393 type: string
394 required:
395 - expr
396 type: object
397 type: array
398 required:
399 - name
400 - rules
401 type: object
402 type: array
403 type: object
404 type: object
405 served: true
406 storage: true
407status:
408 acceptedNames:
409 kind: PrometheusRule
410 listKind: PrometheusRuleList
411 plural: prometheusrules
412 singular: prometheusrule
413 conditions:
414 - lastTransitionTime: "2019-08-27T13:42:34Z"
415 message: no conflicts found
416 reason: NoConflicts
417 status: "True"
418 type: NamesAccepted
419 - lastTransitionTime: null
420 message: the initial names have been accepted
421 reason: InitialNamesAccepted
422 status: "True"
423 type: Established
424 - lastTransitionTime: "2019-11-12T10:45:07Z"
425 message: '[spec.validation.openAPIV3Schema.properties[metadata]: Forbidden: must
426 not specify anything other than name and generateName, but metadata is implicitly
427 specified, spec.validation.openAPIV3Schema.properties[spec].properties[groups].items.properties[rules].items.properties[expr].anyOf[0].type:
428 Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[groups].items.properties[rules].items.properties[expr].anyOf[1].type:
429 Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[groups].items.properties[rules].items.properties[expr].type:
430 Required value: must not be empty for specified object fields]'
431 reason: Violations
432 status: "True"
433 type: NonStructuralSchema
434 storedVersions:
435 - v1