Collectd operator utilties
[demo.git] / vnfs / DAaaS / operator / charts / prometheus-operator / templates / prometheus-operator / crd-servicemonitor.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-0servicemonitorCustomResourceDefinition.yaml
3 apiVersion: apiextensions.k8s.io/v1beta1
4 kind: CustomResourceDefinition
5 metadata:
6   creationTimestamp: null
7   name: {{ printf "servicemonitors.%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: ServiceMonitor
26     listKind: ServiceMonitorList
27     plural: servicemonitors
28     singular: servicemonitor
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         spec:
44           description: ServiceMonitorSpec contains specification parameters for a
45             ServiceMonitor.
46           properties:
47             endpoints:
48               description: A list of endpoints allowed as part of this ServiceMonitor.
49               items:
50                 description: Endpoint defines a scrapeable endpoint serving Prometheus
51                   metrics.
52                 properties:
53                   basicAuth:
54                     description: 'BasicAuth allow an endpoint to authenticate over
55                       basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
56                     properties:
57                       password:
58                         description: SecretKeySelector selects a key of a Secret.
59                         properties:
60                           key:
61                             description: The key of the secret to select from.  Must
62                               be a valid secret key.
63                             type: string
64                           name:
65                             description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
66                             type: string
67                           optional:
68                             description: Specify whether the Secret or it's key must
69                               be defined
70                             type: boolean
71                         required:
72                         - key
73                       username:
74                         description: SecretKeySelector selects a key of a Secret.
75                         properties:
76                           key:
77                             description: The key of the secret to select from.  Must
78                               be a valid secret key.
79                             type: string
80                           name:
81                             description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
82                             type: string
83                           optional:
84                             description: Specify whether the Secret or it's key must
85                               be defined
86                             type: boolean
87                         required:
88                         - key
89                   bearerTokenFile:
90                     description: File to read bearer token for scraping targets.
91                     type: string
92                   honorLabels:
93                     description: HonorLabels chooses the metric's labels on collisions
94                       with target labels.
95                     type: boolean
96                   interval:
97                     description: Interval at which metrics should be scraped
98                     type: string
99                   metricRelabelings:
100                     description: MetricRelabelConfigs to apply to samples before ingestion.
101                     items:
102                       description: 'RelabelConfig allows dynamic rewriting of the
103                         label set, being applied to samples before ingestion. It defines
104                         `<metric_relabel_configs>`-section of Prometheus configuration.
105                         More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
106                       properties:
107                         action:
108                           description: Action to perform based on regex matching.
109                             Default is 'replace'
110                           type: string
111                         modulus:
112                           description: Modulus to take of the hash of the source label
113                             values.
114                           format: int64
115                           type: integer
116                         regex:
117                           description: Regular expression against which the extracted
118                             value is matched. defailt is '(.*)'
119                           type: string
120                         replacement:
121                           description: Replacement value against which a regex replace
122                             is performed if the regular expression matches. Regex
123                             capture groups are available. Default is '$1'
124                           type: string
125                         separator:
126                           description: Separator placed between concatenated source
127                             label values. default is ';'.
128                           type: string
129                         sourceLabels:
130                           description: The source labels select values from existing
131                             labels. Their content is concatenated using the configured
132                             separator and matched against the configured regular expression
133                             for the replace, keep, and drop actions.
134                           items:
135                             type: string
136                           type: array
137                         targetLabel:
138                           description: Label to which the resulting value is written
139                             in a replace action. It is mandatory for replace actions.
140                             Regex capture groups are available.
141                           type: string
142                     type: array
143                   params:
144                     description: Optional HTTP URL parameters
145                     type: object
146                   path:
147                     description: HTTP path to scrape for metrics.
148                     type: string
149                   port:
150                     description: Name of the service port this endpoint refers to.
151                       Mutually exclusive with targetPort.
152                     type: string
153                   proxyUrl:
154                     description: ProxyURL eg http://proxyserver:2195 Directs scrapes
155                       to proxy through this endpoint.
156                     type: string
157                   relabelings:
158                     description: 'RelabelConfigs to apply to samples before ingestion.
159                       More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<relabel_config>'
160                     items:
161                       description: 'RelabelConfig allows dynamic rewriting of the
162                         label set, being applied to samples before ingestion. It defines
163                         `<metric_relabel_configs>`-section of Prometheus configuration.
164                         More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
165                       properties:
166                         action:
167                           description: Action to perform based on regex matching.
168                             Default is 'replace'
169                           type: string
170                         modulus:
171                           description: Modulus to take of the hash of the source label
172                             values.
173                           format: int64
174                           type: integer
175                         regex:
176                           description: Regular expression against which the extracted
177                             value is matched. default is '(.*)'
178                           type: string
179                         replacement:
180                           description: Replacement value against which a regex replace
181                             is performed if the regular expression matches. Regex
182                             capture groups are available. Default is '$1'
183                           type: string
184                         separator:
185                           description: Separator placed between concatenated source
186                             label values. default is ';'.
187                           type: string
188                         sourceLabels:
189                           description: The source labels select values from existing
190                             labels. Their content is concatenated using the configured
191                             separator and matched against the configured regular expression
192                             for the replace, keep, and drop actions.
193                           items:
194                             type: string
195                           type: array
196                         targetLabel:
197                           description: Label to which the resulting value is written
198                             in a replace action. It is mandatory for replace actions.
199                             Regex capture groups are available.
200                           type: string
201                     type: array
202                   scheme:
203                     description: HTTP scheme to use for scraping.
204                     type: string
205                   scrapeTimeout:
206                     description: Timeout after which the scrape is ended
207                     type: string
208                   targetPort:
209                     anyOf:
210                     - type: string
211                     - type: integer
212                   tlsConfig:
213                     description: TLSConfig specifies TLS configuration parameters.
214                     properties:
215                       caFile:
216                         description: The CA cert to use for the targets.
217                         type: string
218                       certFile:
219                         description: The client cert file for the targets.
220                         type: string
221                       insecureSkipVerify:
222                         description: Disable target certificate validation.
223                         type: boolean
224                       keyFile:
225                         description: The client key file for the targets.
226                         type: string
227                       serverName:
228                         description: Used to verify the hostname for the targets.
229                         type: string
230               type: array
231             jobLabel:
232               description: The label to use to retrieve the job name from.
233               type: string
234             namespaceSelector:
235               description: NamespaceSelector is a selector for selecting either all
236                 namespaces or a list of namespaces.
237               properties:
238                 any:
239                   description: Boolean describing whether all namespaces are selected
240                     in contrast to a list restricting them.
241                   type: boolean
242                 matchNames:
243                   description: List of namespace names.
244                   items:
245                     type: string
246                   type: array
247             podTargetLabels:
248               description: PodTargetLabels transfers labels on the Kubernetes Pod
249                 onto the target.
250               items:
251                 type: string
252               type: array
253             sampleLimit:
254               description: SampleLimit defines per-scrape limit on number of scraped
255                 samples that will be accepted.
256               format: int64
257               type: integer
258             selector:
259               description: A label selector is a label query over a set of resources.
260                 The result of matchLabels and matchExpressions are ANDed. An empty
261                 label selector matches all objects. A null label selector matches
262                 no objects.
263               properties:
264                 matchExpressions:
265                   description: matchExpressions is a list of label selector requirements.
266                     The requirements are ANDed.
267                   items:
268                     description: A label selector requirement is a selector that contains
269                       values, a key, and an operator that relates the key and values.
270                     properties:
271                       key:
272                         description: key is the label key that the selector applies
273                           to.
274                         type: string
275                       operator:
276                         description: operator represents a key's relationship to a
277                           set of values. Valid operators are In, NotIn, Exists and
278                           DoesNotExist.
279                         type: string
280                       values:
281                         description: values is an array of string values. If the operator
282                           is In or NotIn, the values array must be non-empty. If the
283                           operator is Exists or DoesNotExist, the values array must
284                           be empty. This array is replaced during a strategic merge
285                           patch.
286                         items:
287                           type: string
288                         type: array
289                     required:
290                     - key
291                     - operator
292                   type: array
293                 matchLabels:
294                   description: matchLabels is a map of {key,value} pairs. A single
295                     {key,value} in the matchLabels map is equivalent to an element
296                     of matchExpressions, whose key field is "key", the operator is
297                     "In", and the values array contains only "value". The requirements
298                     are ANDed.
299                   type: object
300             targetLabels:
301               description: TargetLabels transfers labels on the Kubernetes Service
302                 onto the target.
303               items:
304                 type: string
305               type: array
306           required:
307           - endpoints
308           - selector
309   version: v1
310 {{- end }}