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
6 creationTimestamp: null
7 name: {{ printf "servicemonitors.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
9 app: {{ template "prometheus-operator.name" . }}-operator
10 {{ include "prometheus-operator.labels" . | indent 4 }}
12 "helm.sh/hook": crd-install
13 "helm.sh/hook-delete-policy": "before-hook-creation"
15 additionalPrinterColumns:
16 - JSONPath: .metadata.creationTimestamp
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.
20 Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
23 group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
26 listKind: ServiceMonitorList
27 plural: servicemonitors
28 singular: servicemonitor
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'
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'
44 description: ServiceMonitorSpec contains specification parameters for a
48 description: A list of endpoints allowed as part of this ServiceMonitor.
50 description: Endpoint defines a scrapeable endpoint serving Prometheus
54 description: 'BasicAuth allow an endpoint to authenticate over
55 basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
58 description: SecretKeySelector selects a key of a Secret.
61 description: The key of the secret to select from. Must
62 be a valid secret key.
65 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
68 description: Specify whether the Secret or it's key must
74 description: SecretKeySelector selects a key of a Secret.
77 description: The key of the secret to select from. Must
78 be a valid secret key.
81 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
84 description: Specify whether the Secret or it's key must
90 description: File to read bearer token for scraping targets.
93 description: HonorLabels chooses the metric's labels on collisions
97 description: Interval at which metrics should be scraped
100 description: MetricRelabelConfigs to apply to samples before ingestion.
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'
108 description: Action to perform based on regex matching.
112 description: Modulus to take of the hash of the source label
117 description: Regular expression against which the extracted
118 value is matched. defailt is '(.*)'
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'
126 description: Separator placed between concatenated source
127 label values. default is ';'.
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.
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.
144 description: Optional HTTP URL parameters
147 description: HTTP path to scrape for metrics.
150 description: Name of the service port this endpoint refers to.
151 Mutually exclusive with targetPort.
154 description: ProxyURL eg http://proxyserver:2195 Directs scrapes
155 to proxy through this endpoint.
158 description: 'RelabelConfigs to apply to samples before ingestion.
159 More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<relabel_config>'
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'
167 description: Action to perform based on regex matching.
171 description: Modulus to take of the hash of the source label
176 description: Regular expression against which the extracted
177 value is matched. default is '(.*)'
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'
185 description: Separator placed between concatenated source
186 label values. default is ';'.
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.
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.
203 description: HTTP scheme to use for scraping.
206 description: Timeout after which the scrape is ended
213 description: TLSConfig specifies TLS configuration parameters.
216 description: The CA cert to use for the targets.
219 description: The client cert file for the targets.
222 description: Disable target certificate validation.
225 description: The client key file for the targets.
228 description: Used to verify the hostname for the targets.
232 description: The label to use to retrieve the job name from.
235 description: NamespaceSelector is a selector for selecting either all
236 namespaces or a list of namespaces.
239 description: Boolean describing whether all namespaces are selected
240 in contrast to a list restricting them.
243 description: List of namespace names.
248 description: PodTargetLabels transfers labels on the Kubernetes Pod
254 description: SampleLimit defines per-scrape limit on number of scraped
255 samples that will be accepted.
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
265 description: matchExpressions is a list of label selector requirements.
266 The requirements are ANDed.
268 description: A label selector requirement is a selector that contains
269 values, a key, and an operator that relates the key and values.
272 description: key is the label key that the selector applies
276 description: operator represents a key's relationship to a
277 set of values. Valid operators are In, NotIn, Exists and
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
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
301 description: TargetLabels transfers labels on the Kubernetes Service