k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/prometheus/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml (about) 1 apiVersion: apiextensions.k8s.io/v1 2 kind: CustomResourceDefinition 3 metadata: 4 annotations: 5 controller-gen.kubebuilder.io/version: v0.4.1 6 creationTimestamp: null 7 name: servicemonitors.monitoring.coreos.com 8 spec: 9 group: monitoring.coreos.com 10 names: 11 kind: ServiceMonitor 12 listKind: ServiceMonitorList 13 plural: servicemonitors 14 singular: servicemonitor 15 scope: Namespaced 16 versions: 17 - name: v1 18 schema: 19 openAPIV3Schema: 20 description: ServiceMonitor defines monitoring for a set of services. 21 properties: 22 apiVersion: 23 description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 24 type: string 25 kind: 26 description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 27 type: string 28 metadata: 29 type: object 30 spec: 31 description: Specification of desired Service selection for target discovery by Prometheus. 32 properties: 33 endpoints: 34 description: A list of endpoints allowed as part of this ServiceMonitor. 35 items: 36 description: Endpoint defines a scrapeable endpoint serving Prometheus metrics. 37 properties: 38 basicAuth: 39 description: 'BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' 40 properties: 41 password: 42 description: The secret in the service monitor namespace that contains the password for authentication. 43 properties: 44 key: 45 description: The key of the secret to select from. Must be a valid secret key. 46 type: string 47 name: 48 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 49 type: string 50 optional: 51 description: Specify whether the Secret or its key must be defined 52 type: boolean 53 required: 54 - key 55 type: object 56 username: 57 description: The secret in the service monitor namespace that contains the username for authentication. 58 properties: 59 key: 60 description: The key of the secret to select from. Must be a valid secret key. 61 type: string 62 name: 63 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 64 type: string 65 optional: 66 description: Specify whether the Secret or its key must be defined 67 type: boolean 68 required: 69 - key 70 type: object 71 type: object 72 bearerTokenFile: 73 description: File to read bearer token for scraping targets. 74 type: string 75 bearerTokenSecret: 76 description: Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator. 77 properties: 78 key: 79 description: The key of the secret to select from. Must be a valid secret key. 80 type: string 81 name: 82 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 83 type: string 84 optional: 85 description: Specify whether the Secret or its key must be defined 86 type: boolean 87 required: 88 - key 89 type: object 90 honorLabels: 91 description: HonorLabels chooses the metric's labels on collisions with target labels. 92 type: boolean 93 honorTimestamps: 94 description: HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data. 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 label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' 103 properties: 104 action: 105 description: Action to perform based on regex matching. Default is 'replace' 106 type: string 107 modulus: 108 description: Modulus to take of the hash of the source label values. 109 format: int64 110 type: integer 111 regex: 112 description: Regular expression against which the extracted value is matched. Default is '(.*)' 113 type: string 114 replacement: 115 description: Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1' 116 type: string 117 separator: 118 description: Separator placed between concatenated source label values. default is ';'. 119 type: string 120 sourceLabels: 121 description: The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions. 122 items: 123 type: string 124 type: array 125 targetLabel: 126 description: Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available. 127 type: string 128 type: object 129 type: array 130 params: 131 additionalProperties: 132 items: 133 type: string 134 type: array 135 description: Optional HTTP URL parameters 136 type: object 137 path: 138 description: HTTP path to scrape for metrics. 139 type: string 140 port: 141 description: Name of the service port this endpoint refers to. Mutually exclusive with targetPort. 142 type: string 143 proxyUrl: 144 description: ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. 145 type: string 146 relabelings: 147 description: 'RelabelConfigs to apply to samples before scraping. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' 148 items: 149 description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' 150 properties: 151 action: 152 description: Action to perform based on regex matching. Default is 'replace' 153 type: string 154 modulus: 155 description: Modulus to take of the hash of the source label values. 156 format: int64 157 type: integer 158 regex: 159 description: Regular expression against which the extracted value is matched. Default is '(.*)' 160 type: string 161 replacement: 162 description: Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1' 163 type: string 164 separator: 165 description: Separator placed between concatenated source label values. default is ';'. 166 type: string 167 sourceLabels: 168 description: The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions. 169 items: 170 type: string 171 type: array 172 targetLabel: 173 description: Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available. 174 type: string 175 type: object 176 type: array 177 scheme: 178 description: HTTP scheme to use for scraping. 179 type: string 180 scrapeTimeout: 181 description: Timeout after which the scrape is ended 182 type: string 183 targetPort: 184 anyOf: 185 - type: integer 186 - type: string 187 description: Name or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port. 188 x-kubernetes-int-or-string: true 189 tlsConfig: 190 description: TLS configuration to use when scraping the endpoint 191 properties: 192 ca: 193 description: Struct containing the CA cert to use for the targets. 194 properties: 195 configMap: 196 description: ConfigMap containing data to use for the targets. 197 properties: 198 key: 199 description: The key to select. 200 type: string 201 name: 202 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 203 type: string 204 optional: 205 description: Specify whether the ConfigMap or its key must be defined 206 type: boolean 207 required: 208 - key 209 type: object 210 secret: 211 description: Secret containing data to use for the targets. 212 properties: 213 key: 214 description: The key of the secret to select from. Must be a valid secret key. 215 type: string 216 name: 217 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 218 type: string 219 optional: 220 description: Specify whether the Secret or its key must be defined 221 type: boolean 222 required: 223 - key 224 type: object 225 type: object 226 caFile: 227 description: Path to the CA cert in the Prometheus container to use for the targets. 228 type: string 229 cert: 230 description: Struct containing the client cert file for the targets. 231 properties: 232 configMap: 233 description: ConfigMap containing data to use for the targets. 234 properties: 235 key: 236 description: The key to select. 237 type: string 238 name: 239 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 240 type: string 241 optional: 242 description: Specify whether the ConfigMap or its key must be defined 243 type: boolean 244 required: 245 - key 246 type: object 247 secret: 248 description: Secret containing data to use for the targets. 249 properties: 250 key: 251 description: The key of the secret to select from. Must be a valid secret key. 252 type: string 253 name: 254 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 255 type: string 256 optional: 257 description: Specify whether the Secret or its key must be defined 258 type: boolean 259 required: 260 - key 261 type: object 262 type: object 263 certFile: 264 description: Path to the client cert file in the Prometheus container for the targets. 265 type: string 266 insecureSkipVerify: 267 description: Disable target certificate validation. 268 type: boolean 269 keyFile: 270 description: Path to the client key file in the Prometheus container for the targets. 271 type: string 272 keySecret: 273 description: Secret containing the client key file for the targets. 274 properties: 275 key: 276 description: The key of the secret to select from. Must be a valid secret key. 277 type: string 278 name: 279 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' 280 type: string 281 optional: 282 description: Specify whether the Secret or its key must be defined 283 type: boolean 284 required: 285 - key 286 type: object 287 serverName: 288 description: Used to verify the hostname for the targets. 289 type: string 290 type: object 291 type: object 292 type: array 293 jobLabel: 294 description: The label to use to retrieve the job name from. 295 type: string 296 namespaceSelector: 297 description: Selector to select which namespaces the Endpoints objects are discovered from. 298 properties: 299 any: 300 description: Boolean describing whether all namespaces are selected in contrast to a list restricting them. 301 type: boolean 302 matchNames: 303 description: List of namespace names. 304 items: 305 type: string 306 type: array 307 type: object 308 podTargetLabels: 309 description: PodTargetLabels transfers labels on the Kubernetes Pod onto the target. 310 items: 311 type: string 312 type: array 313 sampleLimit: 314 description: SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. 315 format: int64 316 type: integer 317 selector: 318 description: Selector to select Endpoints objects. 319 properties: 320 matchExpressions: 321 description: matchExpressions is a list of label selector requirements. The requirements are ANDed. 322 items: 323 description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. 324 properties: 325 key: 326 description: key is the label key that the selector applies to. 327 type: string 328 operator: 329 description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. 330 type: string 331 values: 332 description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. 333 items: 334 type: string 335 type: array 336 required: 337 - key 338 - operator 339 type: object 340 type: array 341 matchLabels: 342 additionalProperties: 343 type: string 344 description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. 345 type: object 346 type: object 347 targetLabels: 348 description: TargetLabels transfers labels on the Kubernetes Service onto the target. 349 items: 350 type: string 351 type: array 352 targetLimit: 353 description: TargetLimit defines a limit on the number of scraped targets that will be accepted. 354 format: int64 355 type: integer 356 required: 357 - endpoints 358 - selector 359 type: object 360 required: 361 - spec 362 type: object 363 served: true 364 storage: true 365 status: 366 acceptedNames: 367 kind: "" 368 plural: "" 369 conditions: [] 370 storedVersions: []