// Copyright (c) 2023 Volvo Car Corporation
// SPDX-License-Identifier: Apache-2.0

// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package promcrd

import (
	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var PodmonitorsMonitoringCoreosComCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.11.1"},
		Name:        "podmonitors.monitoring.coreos.com",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "monitoring.coreos.com",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Categories: []string{"prometheus-operator"},
			Kind:       "PodMonitor",
			ListKind:   "PodMonitorList",
			Plural:     "podmonitors",
			ShortNames: []string{"pmon"},
			Singular:   "podmonitor",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "PodMonitor defines monitoring for a set of pods.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": {
						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",
						Type:        "string",
					},
					"kind": {
						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",
						Type:        "string",
					},
					"metadata": {Type: "object"},
					"spec": {
						Description: "Specification of desired Pod selection for target discovery by Prometheus.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"attachMetadata": {
								Description: "Attaches node metadata to discovered targets. Requires Prometheus v2.35.0 and above.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{"node": {
									Description: "When set to true, Prometheus must have permissions to get Nodes.",
									Type:        "boolean",
								}},
								Type: "object",
							},
							"jobLabel": {
								Description: "The label to use to retrieve the job name from.",
								Type:        "string",
							},
							"labelLimit": {
								Description: "Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.",
								Format:      "int64",
								Type:        "integer",
							},
							"labelNameLengthLimit": {
								Description: "Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.",
								Format:      "int64",
								Type:        "integer",
							},
							"labelValueLengthLimit": {
								Description: "Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.",
								Format:      "int64",
								Type:        "integer",
							},
							"namespaceSelector": {
								Description: "Selector to select which namespaces the Endpoints objects are discovered from.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"any": {
										Description: "Boolean describing whether all namespaces are selected in contrast to a list restricting them.",
										Type:        "boolean",
									},
									"matchNames": {
										Description: "List of namespace names to select from.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
								},
								Type: "object",
							},
							"podMetricsEndpoints": {
								Description: "A list of endpoints allowed as part of this PodMonitor.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving Prometheus metrics.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"authorization": {
											Description: "Authorization section for this endpoint",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"credentials": {
													Description: "The secret's key that contains the credentials of the request",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": {
															Description: "The key of the secret to select from.  Must be a valid secret key.",
															Type:        "string",
														},
														"name": {
															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?",
															Type:        "string",
														},
														"optional": {
															Description: "Specify whether the Secret or its key must be defined",
															Type:        "boolean",
														},
													},
													Required: []string{"key"},
													Type:     "object",
													XMapType: P("atomic"),
												},
												"type": {
													Description: "Set the authentication type. Defaults to Bearer, Basic will cause an error",
													Type:        "string",
												},
											},
											Type: "object",
										},
										"basicAuth": {
											Description: "BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"password": {
													Description: "The secret in the service monitor namespace that contains the password for authentication.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": {
															Description: "The key of the secret to select from.  Must be a valid secret key.",
															Type:        "string",
														},
														"name": {
															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?",
															Type:        "string",
														},
														"optional": {
															Description: "Specify whether the Secret or its key must be defined",
															Type:        "boolean",
														},
													},
													Required: []string{"key"},
													Type:     "object",
													XMapType: P("atomic"),
												},
												"username": {
													Description: "The secret in the service monitor namespace that contains the username for authentication.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": {
															Description: "The key of the secret to select from.  Must be a valid secret key.",
															Type:        "string",
														},
														"name": {
															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?",
															Type:        "string",
														},
														"optional": {
															Description: "Specify whether the Secret or its key must be defined",
															Type:        "boolean",
														},
													},
													Required: []string{"key"},
													Type:     "object",
													XMapType: P("atomic"),
												},
											},
											Type: "object",
										},
										"bearerTokenSecret": {
											Description: "Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the pod monitor and accessible by the Prometheus Operator.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"key": {
													Description: "The key of the secret to select from.  Must be a valid secret key.",
													Type:        "string",
												},
												"name": {
													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?",
													Type:        "string",
												},
												"optional": {
													Description: "Specify whether the Secret or its key must be defined",
													Type:        "boolean",
												},
											},
											Required: []string{"key"},
											Type:     "object",
											XMapType: P("atomic"),
										},
										"enableHttp2": {
											Description: "Whether to enable HTTP2.",
											Type:        "boolean",
										},
										"filterRunning": {
											Description: "Drop pods that are not running. (Failed, Succeeded). Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase",
											Type:        "boolean",
										},
										"followRedirects": {
											Description: "FollowRedirects configures whether scrape requests follow HTTP 3xx redirects.",
											Type:        "boolean",
										},
										"honorLabels": {
											Description: "HonorLabels chooses the metric's labels on collisions with target labels.",
											Type:        "boolean",
										},
										"honorTimestamps": {
											Description: "HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.",
											Type:        "boolean",
										},
										"interval": {
											Description: "Interval at which metrics should be scraped If not specified Prometheus' global scrape interval is used.",
											Pattern:     "^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$",
											Type:        "string",
										},
										"metricRelabelings": {
											Description: "MetricRelabelConfigs to apply to samples before ingestion.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												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",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"action": {
														Default:     &apiextensionsv1.JSON{Raw: []byte("\"replace\"")},
														Description: "Action to perform based on regex matching. Default is 'replace'. uppercase and lowercase actions require Prometheus >= 2.36.",
														Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"replace\"")}, {Raw: []byte("\"Replace\"")}, {Raw: []byte("\"keep\"")}, {Raw: []byte("\"Keep\"")}, {Raw: []byte("\"drop\"")}, {Raw: []byte("\"Drop\"")}, {Raw: []byte("\"hashmod\"")}, {Raw: []byte("\"HashMod\"")}, {Raw: []byte("\"labelmap\"")}, {Raw: []byte("\"LabelMap\"")}, {Raw: []byte("\"labeldrop\"")}, {Raw: []byte("\"LabelDrop\"")}, {Raw: []byte("\"labelkeep\"")}, {Raw: []byte("\"LabelKeep\"")}, {Raw: []byte("\"lowercase\"")}, {Raw: []byte("\"Lowercase\"")}, {Raw: []byte("\"uppercase\"")}, {Raw: []byte("\"Uppercase\"")}, {Raw: []byte("\"keepequal\"")}, {Raw: []byte("\"KeepEqual\"")}, {Raw: []byte("\"dropequal\"")}, {Raw: []byte("\"DropEqual\"")}},
														Type:        "string",
													},
													"modulus": {
														Description: "Modulus to take of the hash of the source label values.",
														Format:      "int64",
														Type:        "integer",
													},
													"regex": {
														Description: "Regular expression against which the extracted value is matched. Default is '(.*)'",
														Type:        "string",
													},
													"replacement": {
														Description: "Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'",
														Type:        "string",
													},
													"separator": {
														Description: "Separator placed between concatenated source label values. default is ';'.",
														Type:        "string",
													},
													"sourceLabels": {
														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.",
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.",
															Pattern:     "^[a-zA-Z_][a-zA-Z0-9_]*$",
															Type:        "string",
														}},
														Type: "array",
													},
													"targetLabel": {
														Description: "Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.",
														Type:        "string",
													},
												},
												Type: "object",
											}},
											Type: "array",
										},
										"oauth2": {
											Description: "OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"clientId": {
													Description: "The secret or configmap containing the OAuth2 client id",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"configMap": {
															Description: "ConfigMap containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key to select.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the ConfigMap or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
														"secret": {
															Description: "Secret containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key of the secret to select from.  Must be a valid secret key.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the Secret or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
													},
													Type: "object",
												},
												"clientSecret": {
													Description: "The secret containing the OAuth2 client secret",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": {
															Description: "The key of the secret to select from.  Must be a valid secret key.",
															Type:        "string",
														},
														"name": {
															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?",
															Type:        "string",
														},
														"optional": {
															Description: "Specify whether the Secret or its key must be defined",
															Type:        "boolean",
														},
													},
													Required: []string{"key"},
													Type:     "object",
													XMapType: P("atomic"),
												},
												"endpointParams": {
													AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
														Allows: true,
														Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
													},
													Description: "Parameters to append to the token URL",
													Type:        "object",
												},
												"scopes": {
													Description: "OAuth2 scopes used for the token request",
													Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
													Type:        "array",
												},
												"tokenUrl": {
													Description: "The URL to fetch the token from",
													MinLength:   P(int64(1)),
													Type:        "string",
												},
											},
											Required: []string{"clientId", "clientSecret", "tokenUrl"},
											Type:     "object",
										},
										"params": {
											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
												Allows: true,
												Schema: &apiextensionsv1.JSONSchemaProps{
													Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
													Type:  "array",
												},
											},
											Description: "Optional HTTP URL parameters",
											Type:        "object",
										},
										"path": {
											Description: "HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. `/metrics`).",
											Type:        "string",
										},
										"port": {
											Description: "Name of the pod port this endpoint refers to. Mutually exclusive with targetPort.",
											Type:        "string",
										},
										"proxyUrl": {
											Description: "ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.",
											Type:        "string",
										},
										"relabelings": {
											Description: "RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. The original scrape job's name is available via the `__tmp_prometheus_job_name` label. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												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",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"action": {
														Default:     &apiextensionsv1.JSON{Raw: []byte("\"replace\"")},
														Description: "Action to perform based on regex matching. Default is 'replace'. uppercase and lowercase actions require Prometheus >= 2.36.",
														Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"replace\"")}, {Raw: []byte("\"Replace\"")}, {Raw: []byte("\"keep\"")}, {Raw: []byte("\"Keep\"")}, {Raw: []byte("\"drop\"")}, {Raw: []byte("\"Drop\"")}, {Raw: []byte("\"hashmod\"")}, {Raw: []byte("\"HashMod\"")}, {Raw: []byte("\"labelmap\"")}, {Raw: []byte("\"LabelMap\"")}, {Raw: []byte("\"labeldrop\"")}, {Raw: []byte("\"LabelDrop\"")}, {Raw: []byte("\"labelkeep\"")}, {Raw: []byte("\"LabelKeep\"")}, {Raw: []byte("\"lowercase\"")}, {Raw: []byte("\"Lowercase\"")}, {Raw: []byte("\"uppercase\"")}, {Raw: []byte("\"Uppercase\"")}, {Raw: []byte("\"keepequal\"")}, {Raw: []byte("\"KeepEqual\"")}, {Raw: []byte("\"dropequal\"")}, {Raw: []byte("\"DropEqual\"")}},
														Type:        "string",
													},
													"modulus": {
														Description: "Modulus to take of the hash of the source label values.",
														Format:      "int64",
														Type:        "integer",
													},
													"regex": {
														Description: "Regular expression against which the extracted value is matched. Default is '(.*)'",
														Type:        "string",
													},
													"replacement": {
														Description: "Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'",
														Type:        "string",
													},
													"separator": {
														Description: "Separator placed between concatenated source label values. default is ';'.",
														Type:        "string",
													},
													"sourceLabels": {
														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.",
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.",
															Pattern:     "^[a-zA-Z_][a-zA-Z0-9_]*$",
															Type:        "string",
														}},
														Type: "array",
													},
													"targetLabel": {
														Description: "Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.",
														Type:        "string",
													},
												},
												Type: "object",
											}},
											Type: "array",
										},
										"scheme": {
											Description: "HTTP scheme to use for scraping. `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. If empty, Prometheus uses the default value `http`.",
											Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"http\"")}, {Raw: []byte("\"https\"")}},
											Type:        "string",
										},
										"scrapeTimeout": {
											Description: "Timeout after which the scrape is ended If not specified, the Prometheus global scrape interval is used.",
											Pattern:     "^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$",
											Type:        "string",
										},
										"targetPort": {
											AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
											Description:  "Deprecated: Use 'port' instead.",
											XIntOrString: true,
										},
										"tlsConfig": {
											Description: "TLS configuration to use when scraping the endpoint.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"ca": {
													Description: "Certificate authority used when verifying server certificates.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"configMap": {
															Description: "ConfigMap containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key to select.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the ConfigMap or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
														"secret": {
															Description: "Secret containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key of the secret to select from.  Must be a valid secret key.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the Secret or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
													},
													Type: "object",
												},
												"cert": {
													Description: "Client certificate to present when doing client-authentication.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"configMap": {
															Description: "ConfigMap containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key to select.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the ConfigMap or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
														"secret": {
															Description: "Secret containing data to use for the targets.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": {
																	Description: "The key of the secret to select from.  Must be a valid secret key.",
																	Type:        "string",
																},
																"name": {
																	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?",
																	Type:        "string",
																},
																"optional": {
																	Description: "Specify whether the Secret or its key must be defined",
																	Type:        "boolean",
																},
															},
															Required: []string{"key"},
															Type:     "object",
															XMapType: P("atomic"),
														},
													},
													Type: "object",
												},
												"insecureSkipVerify": {
													Description: "Disable target certificate validation.",
													Type:        "boolean",
												},
												"keySecret": {
													Description: "Secret containing the client key file for the targets.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": {
															Description: "The key of the secret to select from.  Must be a valid secret key.",
															Type:        "string",
														},
														"name": {
															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?",
															Type:        "string",
														},
														"optional": {
															Description: "Specify whether the Secret or its key must be defined",
															Type:        "boolean",
														},
													},
													Required: []string{"key"},
													Type:     "object",
													XMapType: P("atomic"),
												},
												"serverName": {
													Description: "Used to verify the hostname for the targets.",
													Type:        "string",
												},
											},
											Type: "object",
										},
									},
									Type: "object",
								}},
								Type: "array",
							},
							"podTargetLabels": {
								Description: "PodTargetLabels transfers labels on the Kubernetes Pod onto the target.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
							"sampleLimit": {
								Description: "SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.",
								Format:      "int64",
								Type:        "integer",
							},
							"selector": {
								Description: "Selector to select Pod objects.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"matchExpressions": {
										Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"key": {
													Description: "key is the label key that the selector applies to.",
													Type:        "string",
												},
												"operator": {
													Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
													Type:        "string",
												},
												"values": {
													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.",
													Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
													Type:        "array",
												},
											},
											Required: []string{"key", "operator"},
											Type:     "object",
										}},
										Type: "array",
									},
									"matchLabels": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										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.",
										Type:        "object",
									},
								},
								Type:     "object",
								XMapType: P("atomic"),
							},
							"targetLimit": {
								Description: "TargetLimit defines a limit on the number of scraped targets that will be accepted.",
								Format:      "int64",
								Type:        "integer",
							},
						},
						Required: []string{"podMetricsEndpoints", "selector"},
						Type:     "object",
					},
				},
				Required: []string{"spec"},
				Type:     "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
