Refactor Distributed Analytics project structure
[demo.git] / vnfs / DAaaS / deploy / operator / charts / prometheus-operator / templates / prometheus-operator / crd-prometheusrules.yaml
1 {{- if and .Release.IsInstall .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}}
2 # Source https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
3 apiVersion: apiextensions.k8s.io/v1beta1
4 kind: CustomResourceDefinition
5 metadata:
6   creationTimestamp: null
7   name: {{ printf "prometheusrules.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
8   labels:
9     app: {{ template "prometheus-operator.name" . }}-operator
10 {{ include "prometheus-operator.labels" . | indent 4 }}
11   annotations:
12     "helm.sh/hook": crd-install
13     "helm.sh/hook-delete-policy": "before-hook-creation"
14 spec:
15   additionalPrinterColumns:
16   - JSONPath: .metadata.creationTimestamp
17     description: |-
18       CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
19
20       Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
21     name: Age
22     type: date
23   group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
24   names:
25     kind: PrometheusRule
26     listKind: PrometheusRuleList
27     plural: prometheusrules
28     singular: prometheusrule
29   scope: Namespaced
30   validation:
31     openAPIV3Schema:
32       properties:
33         apiVersion:
34           description: 'APIVersion defines the versioned schema of this representation
35             of an object. Servers should convert recognized schemas to the latest
36             internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
37           type: string
38         kind:
39           description: 'Kind is a string value representing the REST resource this
40             object represents. Servers may infer this from the endpoint the client
41             submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
42           type: string
43         metadata:
44           description: ObjectMeta is metadata that all persisted resources must have,
45             which includes all objects users must create.
46           properties:
47             annotations:
48               description: 'Annotations is an unstructured key value map stored with
49                 a resource that may be set by external tools to store and retrieve
50                 arbitrary metadata. They are not queryable and should be preserved
51                 when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
52               type: object
53             clusterName:
54               description: The name of the cluster which the object belongs to. This
55                 is used to distinguish resources with same name and namespace in different
56                 clusters. This field is not set anywhere right now and apiserver is
57                 going to ignore it if set in create or update request.
58               type: string
59             creationTimestamp:
60               description: Time is a wrapper around time.Time which supports correct
61                 marshaling to YAML and JSON.  Wrappers are provided for many of the
62                 factory methods that the time package offers.
63               format: date-time
64               type: string
65             deletionGracePeriodSeconds:
66               description: Number of seconds allowed for this object to gracefully
67                 terminate before it will be removed from the system. Only set when
68                 deletionTimestamp is also set. May only be shortened. Read-only.
69               format: int64
70               type: integer
71             deletionTimestamp:
72               description: Time is a wrapper around time.Time which supports correct
73                 marshaling to YAML and JSON.  Wrappers are provided for many of the
74                 factory methods that the time package offers.
75               format: date-time
76               type: string
77             finalizers:
78               description: Must be empty before the object is deleted from the registry.
79                 Each entry is an identifier for the responsible component that will
80                 remove the entry from the list. If the deletionTimestamp of the object
81                 is non-nil, entries in this list can only be removed.
82               items:
83                 type: string
84               type: array
85             generateName:
86               description: |-
87                 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.
88
89                 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).
90
91                 Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
92               type: string
93             generation:
94               description: A sequence number representing a specific generation of
95                 the desired state. Populated by the system. Read-only.
96               format: int64
97               type: integer
98             initializers:
99               description: Initializers tracks the progress of initialization.
100               properties:
101                 pending:
102                   description: Pending is a list of initializers that must execute
103                     in order before this object is visible. When the last pending
104                     initializer is removed, and no failing result is set, the initializers
105                     struct will be set to nil and the object is considered as initialized
106                     and visible to all clients.
107                   items:
108                     description: Initializer is information about an initializer that
109                       has not yet completed.
110                     properties:
111                       name:
112                         description: name of the process that is responsible for initializing
113                           this object.
114                         type: string
115                     required:
116                     - name
117                   type: array
118                 result:
119                   description: Status is a return value for calls that don't return
120                     other objects.
121                   properties:
122                     apiVersion:
123                       description: 'APIVersion defines the versioned schema of this
124                         representation of an object. Servers should convert recognized
125                         schemas to the latest internal value, and may reject unrecognized
126                         values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
127                       type: string
128                     code:
129                       description: Suggested HTTP return code for this status, 0 if
130                         not set.
131                       format: int32
132                       type: integer
133                     details:
134                       description: StatusDetails is a set of additional properties
135                         that MAY be set by the server to provide additional information
136                         about a response. The Reason field of a Status object defines
137                         what attributes will be set. Clients must ignore fields that
138                         do not match the defined type of each attribute, and should
139                         assume that any attribute may be empty, invalid, or under
140                         defined.
141                       properties:
142                         causes:
143                           description: The Causes array includes more details associated
144                             with the StatusReason failure. Not all StatusReasons may
145                             provide detailed causes.
146                           items:
147                             description: StatusCause provides more information about
148                               an api.Status failure, including cases when multiple
149                               errors are encountered.
150                             properties:
151                               field:
152                                 description: |-
153                                   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.
154
155                                   Examples:
156                                     "name" - the field "name" on the current resource
157                                     "items[0].name" - the field "name" on the first array entry in "items"
158                                 type: string
159                               message:
160                                 description: A human-readable description of the cause
161                                   of the error.  This field may be presented as-is
162                                   to a reader.
163                                 type: string
164                               reason:
165                                 description: A machine-readable description of the
166                                   cause of the error. If this value is empty there
167                                   is no information available.
168                                 type: string
169                           type: array
170                         group:
171                           description: The group attribute of the resource associated
172                             with the status StatusReason.
173                           type: string
174                         kind:
175                           description: 'The kind attribute of the resource associated
176                             with the status StatusReason. On some operations may differ
177                             from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
178                           type: string
179                         name:
180                           description: The name attribute of the resource associated
181                             with the status StatusReason (when there is a single name
182                             which can be described).
183                           type: string
184                         retryAfterSeconds:
185                           description: If specified, the time in seconds before the
186                             operation should be retried. Some errors may indicate
187                             the client must take an alternate action - for those errors
188                             this field may indicate how long to wait before taking
189                             the alternate action.
190                           format: int32
191                           type: integer
192                         uid:
193                           description: 'UID of the resource. (when there is a single
194                             resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
195                           type: string
196                     kind:
197                       description: 'Kind is a string value representing the REST resource
198                         this object represents. Servers may infer this from the endpoint
199                         the client submits requests to. Cannot be updated. In CamelCase.
200                         More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
201                       type: string
202                     message:
203                       description: A human-readable description of the status of this
204                         operation.
205                       type: string
206                     metadata:
207                       description: ListMeta describes metadata that synthetic resources
208                         must have, including lists and various status objects. A resource
209                         may have only one of {ObjectMeta, ListMeta}.
210                       properties:
211                         continue:
212                           description: continue may be set if the user set a limit
213                             on the number of items returned, and indicates that the
214                             server has more data available. The value is opaque and
215                             may be used to issue another request to the endpoint that
216                             served this list to retrieve the next set of available
217                             objects. Continuing a list may not be possible if the
218                             server configuration has changed or more than a few minutes
219                             have passed. The resourceVersion field returned when using
220                             this continue value will be identical to the value in
221                             the first response.
222                           type: string
223                         resourceVersion:
224                           description: 'String that identifies the server''s internal
225                             version of this object that can be used by clients to
226                             determine when objects have changed. Value must be treated
227                             as opaque by clients and passed unmodified back to the
228                             server. Populated by the system. Read-only. More info:
229                             https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency'
230                           type: string
231                         selfLink:
232                           description: selfLink is a URL representing this object.
233                             Populated by the system. Read-only.
234                           type: string
235                     reason:
236                       description: A machine-readable description of why this operation
237                         is in the "Failure" status. If this value is empty there is
238                         no information available. A Reason clarifies an HTTP status
239                         code but does not override it.
240                       type: string
241                     status:
242                       description: 'Status of the operation. One of: "Success" or
243                         "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
244                       type: string
245               required:
246               - pending
247             labels:
248               description: 'Map of string keys and values that can be used to organize
249                 and categorize (scope and select) objects. May match selectors of
250                 replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
251               type: object
252             name:
253               description: 'Name must be unique within a namespace. Is required when
254                 creating resources, although some resources may allow a client to
255                 request the generation of an appropriate name automatically. Name
256                 is primarily intended for creation idempotence and configuration definition.
257                 Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
258               type: string
259             namespace:
260               description: |-
261                 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.
262
263                 Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
264               type: string
265             ownerReferences:
266               description: List of objects depended by this object. If ALL objects
267                 in the list have been deleted, this object will be garbage collected.
268                 If this object is managed by a controller, then an entry in this list
269                 will point to this controller, with the controller field set to true.
270                 There cannot be more than one managing controller.
271               items:
272                 description: OwnerReference contains enough information to let you
273                   identify an owning object. Currently, an owning object must be in
274                   the same namespace, so there is no namespace field.
275                 properties:
276                   apiVersion:
277                     description: API version of the referent.
278                     type: string
279                   blockOwnerDeletion:
280                     description: If true, AND if the owner has the "foregroundDeletion"
281                       finalizer, then the owner cannot be deleted from the key-value
282                       store until this reference is removed. Defaults to false. To
283                       set this field, a user needs "delete" permission of the owner,
284                       otherwise 422 (Unprocessable Entity) will be returned.
285                     type: boolean
286                   controller:
287                     description: If true, this reference points to the managing controller.
288                     type: boolean
289                   kind:
290                     description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
291                     type: string
292                   name:
293                     description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
294                     type: string
295                   uid:
296                     description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
297                     type: string
298                 required:
299                 - apiVersion
300                 - kind
301                 - name
302                 - uid
303               type: array
304             resourceVersion:
305               description: |-
306                 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.
307
308                 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
309               type: string
310             selfLink:
311               description: SelfLink is a URL representing this object. Populated by
312                 the system. Read-only.
313               type: string
314             uid:
315               description: |-
316                 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.
317
318                 Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
319               type: string
320         spec:
321           description: PrometheusRuleSpec contains specification parameters for a
322             Rule.
323           properties:
324             groups:
325               description: Content of Prometheus rule file
326               items:
327                 description: RuleGroup is a list of sequentially evaluated recording
328                   and alerting rules.
329                 properties:
330                   interval:
331                     type: string
332                   name:
333                     type: string
334                   rules:
335                     items:
336                       description: Rule describes an alerting or recording rule.
337                       properties:
338                         alert:
339                           type: string
340                         annotations:
341                           type: object
342                         expr:
343                           anyOf:
344                           - type: string
345                           - type: integer
346                         for:
347                           type: string
348                         labels:
349                           type: object
350                         record:
351                           type: string
352                       required:
353                       - expr
354                     type: array
355                 required:
356                 - name
357                 - rules
358               type: array
359   version: v1
360 {{- end }}