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

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

package vmcrd

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

var VmalertsOperatorVictoriametricsComCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.10.0"},
		Name:        "vmalerts.operator.victoriametrics.com",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "operator.victoriametrics.com",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "VMAlert",
			ListKind: "VMAlertList",
			Plural:   "vmalerts",
			Singular: "vmalert",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{{
			Name: "v1beta1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "VMAlert  executes a list of given alerting or recording rules against configured address.",
				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: "VMAlertSpec defines the desired state of VMAlert",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"-": {
								Description: "ParsingError contents error with context if operator was failed to parse json object from kubernetes api server",
								Type:        "string",
							},
							"affinity": {
								Description:            "Affinity If specified, the pod's scheduling constraints.",
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"configMaps": {
								Description: "ConfigMaps is a list of ConfigMaps in the same namespace as the VMAlert object, which shall be mounted into the VMAlert Pods. The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
							"containers": {
								Description: "Containers property allows to inject additions sidecars or to patch existing containers. It can be useful for proxies, backup, etc.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description:            "A single application container that you want to run within a pod.",
									Required:               []string{"name"},
									Type:                   "object",
									XPreserveUnknownFields: P(true),
								}},
								Type: "array",
							},
							"datasource": {
								Description: "Datasource Victoria Metrics or VMSelect url. Required parameter. e.g. http://127.0.0.1:8428",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"OAuth2": {
										Description:            "OAuth2 defines OAuth2 configuration",
										Required:               []string{"client_id", "token_url"},
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"basicAuth": {
										Description: "BasicAuth allow an endpoint to authenticate over basic authentication",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"password": {
												Description: "The secret in the service scrape namespace that contains the password for authentication. It must be at them same namespace as CRD",
												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"),
											},
											"password_file": {
												Description: "PasswordFile defines path to password file at disk",
												Type:        "string",
											},
											"username": {
												Description: "The secret in the service scrape namespace that contains the username for authentication. It must be at them same namespace as CRD",
												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",
									},
									"bearerTokenFilePath": {Type: "string"},
									"bearerTokenSecret": {
										Description: "Optional bearer auth token to use for -remoteWrite.url",
										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"),
									},
									"headers": {
										Description: "Headers allow configuring custom http headers Must be in form of semicolon separated header with value e.g. headerName:headerValue vmalert supports it since 1.79.0 version",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"tlsConfig": {
										Description:            "TLSConfig specifies TLSConfig configuration parameters.",
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"url": {
										Description: "Victoria Metrics or VMSelect url. Required parameter. E.g. http://127.0.0.1:8428",
										Type:        "string",
									},
								},
								Required: []string{"url"},
								Type:     "object",
							},
							"dnsConfig": {
								Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{XPreserveUnknownFields: P(true)}},
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"nameservers": {
										Description: "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"options": {
										Description: "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "PodDNSConfigOption defines DNS resolver options of a pod.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"name": {
													Description: "Required.",
													Type:        "string",
												},
												"value": {Type: "string"},
											},
											Type: "object",
										}},
										Type: "array",
									},
									"searches": {
										Description: "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
								},
								Type: "object",
							},
							"dnsPolicy": {
								Description: "DNSPolicy sets DNS policy for the pod",
								Type:        "string",
							},
							"enforcedNamespaceLabel": {
								Description: "EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.",
								Type:        "string",
							},
							"evaluationInterval": {
								Description: "EvaluationInterval how often evalute rules by default",
								Pattern:     "[0-9]+(ms|s|m|h)",
								Type:        "string",
							},
							"externalLabels": {
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "ExternalLabels in the form 'name: value' to add to all generated recording rules and alerts.",
								Type:        "object",
							},
							"extraArgs": {
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "ExtraArgs that will be passed to  VMAlert pod for example -remoteWrite.tmpDataPath=/tmp",
								Type:        "object",
							},
							"extraEnvs": {
								Description: "ExtraEnvs that will be added to VMAlert pod",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "EnvVar represents an environment variable present in a Container.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"name": {
											Description: "Name of the environment variable. Must be a C_IDENTIFIER.",
											Type:        "string",
										},
										"value": {
											Description: "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".",
											Type:        "string",
										},
									},
									Required:               []string{"name"},
									Type:                   "object",
									XPreserveUnknownFields: P(true),
								}},
								Type: "array",
							},
							"hostNetwork": {
								Description: "HostNetwork controls whether the pod may use the node network namespace",
								Type:        "boolean",
							},
							"image": {
								Description: "Image - docker image settings for VMAlert if no specified operator uses default config version",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"pullPolicy": {
										Description: "PullPolicy describes how to pull docker image",
										Type:        "string",
									},
									"repository": {
										Description: "Repository contains name of docker image + it's repository if needed",
										Type:        "string",
									},
									"tag": {
										Description: "Tag contains desired docker image version",
										Type:        "string",
									},
								},
								Type: "object",
							},
							"imagePullSecrets": {
								Description: "ImagePullSecrets An optional list of references to secrets in the same namespace to use for pulling images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{"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",
									}},
									Type:     "object",
									XMapType: P("atomic"),
								}},
								Type: "array",
							},
							"initContainers": {
								Description: "InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the VMAlert configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description:            "A single application container that you want to run within a pod.",
									Required:               []string{"name"},
									Type:                   "object",
									XPreserveUnknownFields: P(true),
								}},
								Type: "array",
							},
							"livenessProbe": {
								Description:            "LivenessProbe that will be added CRD pod",
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"logFormat": {
								Description: "LogFormat for VMAlert to be configured with. default or json",
								Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"default\"")}, {Raw: []byte("\"json\"")}},
								Type:        "string",
							},
							"logLevel": {
								Description: "LogLevel for VMAlert to be configured with.",
								Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"INFO\"")}, {Raw: []byte("\"WARN\"")}, {Raw: []byte("\"ERROR\"")}, {Raw: []byte("\"FATAL\"")}, {Raw: []byte("\"PANIC\"")}},
								Type:        "string",
							},
							"nodeSelector": {
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "NodeSelector Define which Nodes the Pods are scheduled on.",
								Type:        "object",
							},
							"notifier": {
								Description: "Notifier prometheus alertmanager endpoint spec. Required at least one of  notifier or notifiers. e.g. http://127.0.0.1:9093 If specified both notifier and notifiers, notifier will be added as last element to notifiers. only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"OAuth2": {
										Description:            "OAuth2 defines OAuth2 configuration",
										Required:               []string{"client_id", "token_url"},
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"basicAuth": {
										Description: "BasicAuth allow an endpoint to authenticate over basic authentication",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"password": {
												Description: "The secret in the service scrape namespace that contains the password for authentication. It must be at them same namespace as CRD",
												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"),
											},
											"password_file": {
												Description: "PasswordFile defines path to password file at disk",
												Type:        "string",
											},
											"username": {
												Description: "The secret in the service scrape namespace that contains the username for authentication. It must be at them same namespace as CRD",
												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",
									},
									"bearerTokenFilePath": {Type: "string"},
									"bearerTokenSecret": {
										Description: "Optional bearer auth token to use for -remoteWrite.url",
										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"),
									},
									"headers": {
										Description: "Headers allow configuring custom http headers Must be in form of semicolon separated header with value e.g. headerName:headerValue vmalert supports it since 1.79.0 version",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"selector": {
										Description: "Selector allows service discovery for alertmanager in this case all matched vmalertmanager replicas will be added into vmalert notifier.url as statefulset pod.fqdn",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"labelSelector": {
												Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no 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"),
											},
											"namespaceSelector": {
												Description: "NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces.",
												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.",
														Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Type:        "array",
													},
												},
												Type: "object",
											},
										},
										Type: "object",
									},
									"tlsConfig": {
										Description:            "TLSConfig specifies TLSConfig configuration parameters.",
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"url": {
										Description: "AlertManager url.  E.g. http://127.0.0.1:9093",
										Type:        "string",
									},
								},
								Type: "object",
							},
							"notifierConfigRef": {
								Description: "NotifierConfigRef reference for secret with notifier configuration for vmalert only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier",
								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"),
							},
							"notifiers": {
								Description: "Notifiers prometheus alertmanager endpoints. Required at least one of  notifier or notifiers. e.g. http://127.0.0.1:9093 If specified both notifier and notifiers, notifier will be added as last element to notifiers. only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "VMAlertNotifierSpec defines the notifier url for sending information about alerts",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"OAuth2": {
											Description:            "OAuth2 defines OAuth2 configuration",
											Required:               []string{"client_id", "token_url"},
											Type:                   "object",
											XPreserveUnknownFields: P(true),
										},
										"basicAuth": {
											Description: "BasicAuth allow an endpoint to authenticate over basic authentication",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"password": {
													Description: "The secret in the service scrape namespace that contains the password for authentication. It must be at them same namespace as CRD",
													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"),
												},
												"password_file": {
													Description: "PasswordFile defines path to password file at disk",
													Type:        "string",
												},
												"username": {
													Description: "The secret in the service scrape namespace that contains the username for authentication. It must be at them same namespace as CRD",
													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",
										},
										"bearerTokenFilePath": {Type: "string"},
										"bearerTokenSecret": {
											Description: "Optional bearer auth token to use for -remoteWrite.url",
											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"),
										},
										"headers": {
											Description: "Headers allow configuring custom http headers Must be in form of semicolon separated header with value e.g. headerName:headerValue vmalert supports it since 1.79.0 version",
											Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
											Type:        "array",
										},
										"selector": {
											Description: "Selector allows service discovery for alertmanager in this case all matched vmalertmanager replicas will be added into vmalert notifier.url as statefulset pod.fqdn",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"labelSelector": {
													Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no 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"),
												},
												"namespaceSelector": {
													Description: "NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces.",
													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.",
															Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
															Type:        "array",
														},
													},
													Type: "object",
												},
											},
											Type: "object",
										},
										"tlsConfig": {
											Description:            "TLSConfig specifies TLSConfig configuration parameters.",
											Type:                   "object",
											XPreserveUnknownFields: P(true),
										},
										"url": {
											Description: "AlertManager url.  E.g. http://127.0.0.1:9093",
											Type:        "string",
										},
									},
									Type: "object",
								}},
								Type: "array",
							},
							"podDisruptionBudget": {
								Description: "PodDisruptionBudget created by operator",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"maxUnavailable": {
										AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
										Description:  "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".",
										XIntOrString: true,
									},
									"minAvailable": {
										AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
										Description:  "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod.  So for example you can prevent all voluntary evictions by specifying \"100%\".",
										XIntOrString: true,
									},
									"selectorLabels": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: "replaces default labels selector generated by operator it's useful when you need to create custom budget",
										Type:        "object",
									},
								},
								Type: "object",
							},
							"podMetadata": {
								Description: "PodMetadata configures Labels and Annotations which are propagated to the VMAlert pods.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"annotations": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
										Type:        "object",
									},
									"labels": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: "Labels Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
										Type:        "object",
									},
									"name": {
										Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
										Type:        "string",
									},
								},
								Type: "object",
							},
							"podSecurityPolicyName": {
								Description: "PodSecurityPolicyName - defines name for podSecurityPolicy in case of empty value, prefixedName will be used.",
								Type:        "string",
							},
							"port": {
								Description: "Port for listen",
								Type:        "string",
							},
							"priorityClassName": {
								Description: "Priority class assigned to the Pods",
								Type:        "string",
							},
							"readinessGates": {
								Description: "ReadinessGates defines pod readiness gates",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "PodReadinessGate contains the reference to a pod condition",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{"conditionType": {
										Description: "ConditionType refers to a condition in the pod's condition list with matching type.",
										Type:        "string",
									}},
									Required: []string{"conditionType"},
									Type:     "object",
								}},
								Type: "array",
							},
							"readinessProbe": {
								Description:            "ReadinessProbe that will be added CRD pod",
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"remoteRead": {
								Description: "RemoteRead Optional URL to read vmalert state (persisted via RemoteWrite) This configuration only makes sense if alerts state has been successfully persisted (via RemoteWrite) before. see -remoteRead.url docs in vmalerts for details. E.g. http://127.0.0.1:8428",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"OAuth2": {
										Description:            "OAuth2 defines OAuth2 configuration",
										Required:               []string{"client_id", "token_url"},
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"basicAuth": {
										Description: "BasicAuth allow an endpoint to authenticate over basic authentication",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"password": {
												Description: "The secret in the service scrape namespace that contains the password for authentication. It must be at them same namespace as CRD",
												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"),
											},
											"password_file": {
												Description: "PasswordFile defines path to password file at disk",
												Type:        "string",
											},
											"username": {
												Description: "The secret in the service scrape namespace that contains the username for authentication. It must be at them same namespace as CRD",
												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",
									},
									"bearerTokenFilePath": {Type: "string"},
									"bearerTokenSecret": {
										Description: "Optional bearer auth token to use for -remoteWrite.url",
										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"),
									},
									"headers": {
										Description: "Headers allow configuring custom http headers Must be in form of semicolon separated header with value e.g. headerName:headerValue vmalert supports it since 1.79.0 version",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"lookback": {
										Description: "Lookback defines how far to look into past for alerts timeseries. For example, if lookback=1h then range from now() to now()-1h will be scanned. (default 1h0m0s) Applied only to RemoteReadSpec",
										Type:        "string",
									},
									"tlsConfig": {
										Description:            "TLSConfig specifies TLSConfig configuration parameters.",
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"url": {
										Description: "URL of the endpoint to send samples to.",
										Type:        "string",
									},
								},
								Required: []string{"url"},
								Type:     "object",
							},
							"remoteWrite": {
								Description: "RemoteWrite Optional URL to remote-write compatible storage to persist vmalert state and rule results to. Rule results will be persisted according to each rule. Alerts state will be persisted in the form of time series named ALERTS and ALERTS_FOR_STATE see -remoteWrite.url docs in vmalerts for details. E.g. http://127.0.0.1:8428",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"OAuth2": {
										Description:            "OAuth2 defines OAuth2 configuration",
										Required:               []string{"client_id", "token_url"},
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"basicAuth": {
										Description: "BasicAuth allow an endpoint to authenticate over basic authentication",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"password": {
												Description: "The secret in the service scrape namespace that contains the password for authentication. It must be at them same namespace as CRD",
												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"),
											},
											"password_file": {
												Description: "PasswordFile defines path to password file at disk",
												Type:        "string",
											},
											"username": {
												Description: "The secret in the service scrape namespace that contains the username for authentication. It must be at them same namespace as CRD",
												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",
									},
									"bearerTokenFilePath": {Type: "string"},
									"bearerTokenSecret": {
										Description: "Optional bearer auth token to use for -remoteWrite.url",
										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"),
									},
									"concurrency": {
										Description: "Defines number of readers that concurrently write into remote storage (default 1)",
										Format:      "int32",
										Type:        "integer",
									},
									"flushInterval": {
										Description: "Defines interval of flushes to remote write endpoint (default 5s)",
										Pattern:     "[0-9]+(ms|s|m|h)",
										Type:        "string",
									},
									"headers": {
										Description: "Headers allow configuring custom http headers Must be in form of semicolon separated header with value e.g. headerName:headerValue vmalert supports it since 1.79.0 version",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"maxBatchSize": {
										Description: "Defines defines max number of timeseries to be flushed at once (default 1000)",
										Format:      "int32",
										Type:        "integer",
									},
									"maxQueueSize": {
										Description: "Defines the max number of pending datapoints to remote write endpoint (default 100000)",
										Format:      "int32",
										Type:        "integer",
									},
									"tlsConfig": {
										Description:            "TLSConfig specifies TLSConfig configuration parameters.",
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
									"url": {
										Description: "URL of the endpoint to send samples to.",
										Type:        "string",
									},
								},
								Required: []string{"url"},
								Type:     "object",
							},
							"replicaCount": {
								Description: "ReplicaCount is the expected size of the VMAlert cluster. The controller will eventually make the size of the running cluster equal to the expected size.",
								Format:      "int32",
								Type:        "integer",
							},
							"resources": {
								Description: "Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"limits": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{
												AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
												Pattern:      "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
												XIntOrString: true,
											},
										},
										Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
										Type:        "object",
									},
									"requests": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{
												AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
												Pattern:      "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
												XIntOrString: true,
											},
										},
										Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
										Type:        "object",
									},
								},
								Type: "object",
							},
							"rollingUpdate": {
								Description: "RollingUpdate - overrides deployment update params.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"maxSurge": {
										AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
										Description:  "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.",
										XIntOrString: true,
									},
									"maxUnavailable": {
										AnyOf:        []apiextensionsv1.JSONSchemaProps{{Type: "integer"}, {Type: "string"}},
										Description:  "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
										XIntOrString: true,
									},
								},
								Type: "object",
							},
							"ruleNamespaceSelector": {
								Description: "RuleNamespaceSelector to be selected for VMRules discovery. Works in combination with Selector. If both nil - behaviour controlled by selectAllByDefault NamespaceSelector nil - only objects at VMAlert namespace.",
								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"),
							},
							"rulePath": {
								Description: "RulePath to the file with alert rules. Supports patterns. Flag can be specified multiple times. Examples: -rule /path/to/file. Path to a single file with alerting rules -rule dir/*.yaml -rule /*.yaml. Relative path to all .yaml files in folder, absolute path to all .yaml files in root. by default operator adds /etc/vmalert/configs/base/vmalert.yaml",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
							"ruleSelector": {
								Description: "RuleSelector selector to select which VMRules to mount for loading alerting rules from. Works in combination with NamespaceSelector. If both nil - behaviour controlled by selectAllByDefault NamespaceSelector nil - only objects at VMAlert namespace.",
								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"),
							},
							"runtimeClassName": {
								Description: "RuntimeClassName - defines runtime class for kubernetes pod. https://kubernetes.io/docs/concepts/containers/runtime-class/",
								Type:        "string",
							},
							"schedulerName": {
								Description: "SchedulerName - defines kubernetes scheduler name",
								Type:        "string",
							},
							"secrets": {
								Description: "Secrets is a list of Secrets in the same namespace as the VMAlert object, which shall be mounted into the VMAlert Pods. The Secrets are mounted into /etc/vm/secrets/<secret-name>.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
							"securityContext": {
								Description:            "SecurityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.",
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"selectAllByDefault": {
								Description: "SelectAllByDefault changes default behavior for empty CRD selectors, such RuleSelector. with selectAllByDefault: true and empty serviceScrapeSelector and RuleNamespaceSelector Operator selects all exist serviceScrapes with selectAllByDefault: false - selects nothing",
								Type:        "boolean",
							},
							"serviceAccountName": {
								Description: "ServiceAccountName is the name of the ServiceAccount to use to run the VMAlert Pods.",
								Type:        "string",
							},
							"serviceScrapeSpec": {
								Description:            "ServiceScrapeSpec that will be added to vmselect VMServiceScrape spec",
								Required:               []string{"endpoints"},
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"serviceSpec": {
								Description: "ServiceSpec that will be added to vmalert service spec",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"metadata": {
										Description: "EmbeddedObjectMetadata defines objectMeta for additional service.",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"annotations": {
												AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
													Allows: true,
													Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
												},
												Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
												Type:        "object",
											},
											"labels": {
												AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
													Allows: true,
													Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
												},
												Description: "Labels Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
												Type:        "object",
											},
											"name": {
												Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
												Type:        "string",
											},
										},
										Type: "object",
									},
									"spec": {
										Description:            "ServiceSpec describes the attributes that a user creates on a service. More info: https://kubernetes.io/docs/concepts/services-networking/service/",
										Type:                   "object",
										XPreserveUnknownFields: P(true),
									},
								},
								Required: []string{"spec"},
								Type:     "object",
							},
							"startupProbe": {
								Description:            "StartupProbe that will be added to CRD pod",
								Type:                   "object",
								XPreserveUnknownFields: P(true),
							},
							"terminationGracePeriodSeconds": {
								Description: "TerminationGracePeriodSeconds period for container graceful termination",
								Format:      "int64",
								Type:        "integer",
							},
							"tolerations": {
								Description: "Tolerations If specified, the pod's tolerations.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"effect": {
											Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
											Type:        "string",
										},
										"key": {
											Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
											Type:        "string",
										},
										"operator": {
											Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
											Type:        "string",
										},
										"tolerationSeconds": {
											Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.",
											Format:      "int64",
											Type:        "integer",
										},
										"value": {
											Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.",
											Type:        "string",
										},
									},
									Type: "object",
								}},
								Type: "array",
							},
							"topologySpreadConstraints": {
								Description: "TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description:            "TopologySpreadConstraint specifies how to spread matching pods among the given topology.",
									Required:               []string{"maxSkew", "topologyKey", "whenUnsatisfiable"},
									Type:                   "object",
									XPreserveUnknownFields: P(true),
								}},
								Type: "array",
							},
							"updateStrategy": {
								Description: "UpdateStrategy - overrides default update strategy.",
								Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"Recreate\"")}, {Raw: []byte("\"RollingUpdate\"")}},
								Type:        "string",
							},
							"volumeMounts": {
								Description: "VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. VolumeMounts specified will be appended to other VolumeMounts in the VMAlert container, that are generated as a result of StorageSpec objects.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "VolumeMount describes a mounting of a Volume within a container.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"mountPath": {
											Description: "Path within the container at which the volume should be mounted.  Must not contain ':'.",
											Type:        "string",
										},
										"mountPropagation": {
											Description: "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.",
											Type:        "string",
										},
										"name": {
											Description: "This must match the Name of a Volume.",
											Type:        "string",
										},
										"readOnly": {
											Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.",
											Type:        "boolean",
										},
										"subPath": {
											Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).",
											Type:        "string",
										},
										"subPathExpr": {
											Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.",
											Type:        "string",
										},
									},
									Required: []string{"mountPath", "name"},
									Type:     "object",
								}},
								Type: "array",
							},
							"volumes": {
								Description: "Volumes allows configuration of additional volumes on the output Deployment definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description:            "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
									Required:               []string{"name"},
									Type:                   "object",
									XPreserveUnknownFields: P(true),
								}},
								Type: "array",
							},
						},
						Required: []string{"datasource"},
						Type:     "object",
					},
					"status": {
						Description: "VmAlertStatus defines the observed state of VmAlert",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"availableReplicas": {
								Description: "AvailableReplicas Total number of available pods (ready for at least minReadySeconds) targeted by this VMAlert cluster.",
								Format:      "int32",
								Type:        "integer",
							},
							"replicas": {
								Description: "ReplicaCount Total number of non-terminated pods targeted by this VMAlert cluster (their labels match the selector).",
								Format:      "int32",
								Type:        "integer",
							},
							"unavailableReplicas": {
								Description: "UnavailableReplicas Total number of unavailable pods targeted by this VMAlert cluster.",
								Format:      "int32",
								Type:        "integer",
							},
							"updatedReplicas": {
								Description: "UpdatedReplicas Total number of non-terminated pods targeted by this VMAlert cluster that have the desired version spec.",
								Format:      "int32",
								Type:        "integer",
							},
						},
						Required: []string{"availableReplicas", "replicas", "unavailableReplicas", "updatedReplicas"},
						Type:     "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
