apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.6.2
  name: vmalerts.operator.victoriametrics.com
spec:
  group: operator.victoriametrics.com
  names:
    kind: VMAlert
    listKind: VMAlertList
    plural: vmalerts
    singular: vmalert
  scope: Namespaced
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: VMAlert  executes a list of given alerting or recording rules
          against configured address.
        properties:
          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:
              affinity:
                description: Affinity If specified, the pod's scheduling constraints.
                type: object
                x-kubernetes-preserve-unknown-fields: 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:
                  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:
                  description: A single application container that you want to run
                    within a pod.
                  required:
                  - name
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                type: array
              datasource:
                description: Datasource Victoria Metrics or VMSelect url. Required
                  parameter. e.g. http://127.0.0.1:8428
                properties:
                  basicAuth:
                    description: BasicAuth allow datasource to authenticate over basic
                      authentication
                    properties:
                      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:
                          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:
                        - key
                        type: object
                      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:
                          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:
                        - key
                        type: object
                    type: object
                  tlsConfig:
                    description: TLSConfig describes tls configuration for datasource
                      target
                    properties:
                      ca:
                        description: Stuct containing the CA cert to use for the targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      caFile:
                        description: Path to the CA cert in the container to use for
                          the targets.
                        type: string
                      cert:
                        description: Struct containing the client cert file for the
                          targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      certFile:
                        description: Path to the client cert file in the container
                          for the targets.
                        type: string
                      insecureSkipVerify:
                        description: Disable target certificate validation.
                        type: boolean
                      keyFile:
                        description: Path to the client key file in the container
                          for the targets.
                        type: string
                      keySecret:
                        description: Secret containing the client key file for the
                          targets.
                        properties:
                          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:
                        - key
                        type: object
                      serverName:
                        description: Used to verify the hostname for the targets.
                        type: string
                    type: object
                  url:
                    description: Victoria Metrics or VMSelect url. Required parameter.
                      E.g. http://127.0.0.1:8428
                    type: string
                required:
                - url
                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:
                  type: string
                description: 'ExternalLabels in the form ''name: value'' to add to
                  all generated recording rules and alerts.'
                type: object
              extraArgs:
                additionalProperties:
                  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:
                  description: EnvVar represents an environment variable present in
                    a Container.
                  properties:
                    name:
                      description: Name of the environment variable. Must be a C_IDENTIFIER.
                      type: string
                    value:
                      description: 'Variable references $(VAR_NAME) are expanded using
                        the previous 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.
                        The $(VAR_NAME) syntax can be escaped with a double $$, ie:
                        $$(VAR_NAME). Escaped references will never be expanded, regardless
                        of whether the variable exists or not. Defaults to "".'
                      type: string
                  required:
                  - name
                  type: object
                  x-kubernetes-preserve-unknown-fields: 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:
                  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:
                  description: LocalObjectReference contains enough information to
                    let you locate the referenced object inside the same namespace.
                  properties:
                    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
                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:
                  description: A single application container that you want to run
                    within a pod.
                  required:
                  - name
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                type: array
              livenessProbe:
                description: LivenessProbe that will be added CRD pod
                type: object
                x-kubernetes-preserve-unknown-fields: true
              logFormat:
                description: LogFormat for VMAlert to be configured with. default
                  or json
                enum:
                - default
                - json
                type: string
              logLevel:
                description: LogLevel for VMAlert to be configured with.
                enum:
                - INFO
                - WARN
                - ERROR
                - FATAL
                - PANIC
                type: string
              nodeSelector:
                additionalProperties:
                  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.
                properties:
                  basicAuth:
                    description: BasicAuth allow notifier to authenticate over basic
                      authentication
                    properties:
                      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:
                          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:
                        - key
                        type: object
                      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:
                          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:
                        - key
                        type: object
                    type: object
                  tlsConfig:
                    description: TLSConfig describes tls configuration for notifier
                    properties:
                      ca:
                        description: Stuct containing the CA cert to use for the targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      caFile:
                        description: Path to the CA cert in the container to use for
                          the targets.
                        type: string
                      cert:
                        description: Struct containing the client cert file for the
                          targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      certFile:
                        description: Path to the client cert file in the container
                          for the targets.
                        type: string
                      insecureSkipVerify:
                        description: Disable target certificate validation.
                        type: boolean
                      keyFile:
                        description: Path to the client key file in the container
                          for the targets.
                        type: string
                      keySecret:
                        description: Secret containing the client key file for the
                          targets.
                        properties:
                          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:
                        - key
                        type: object
                      serverName:
                        description: Used to verify the hostname for the targets.
                        type: string
                    type: object
                  url:
                    description: AlertManager url. Required parameter. E.g. http://127.0.0.1:9093
                    type: string
                required:
                - url
                type: object
              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.
                items:
                  description: VMAlertNotifierSpec defines the notifier url for sending
                    information about alerts
                  properties:
                    basicAuth:
                      description: BasicAuth allow notifier to authenticate over basic
                        authentication
                      properties:
                        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:
                            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:
                          - key
                          type: object
                        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:
                            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:
                          - key
                          type: object
                      type: object
                    tlsConfig:
                      description: TLSConfig describes tls configuration for notifier
                      properties:
                        ca:
                          description: Stuct containing the CA cert to use for the
                            targets.
                          properties:
                            configMap:
                              description: ConfigMap containing data to use for the
                                targets.
                              properties:
                                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:
                              - key
                              type: object
                            secret:
                              description: Secret containing data to use for the targets.
                              properties:
                                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:
                              - key
                              type: object
                          type: object
                        caFile:
                          description: Path to the CA cert in the container to use
                            for the targets.
                          type: string
                        cert:
                          description: Struct containing the client cert file for
                            the targets.
                          properties:
                            configMap:
                              description: ConfigMap containing data to use for the
                                targets.
                              properties:
                                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:
                              - key
                              type: object
                            secret:
                              description: Secret containing data to use for the targets.
                              properties:
                                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:
                              - key
                              type: object
                          type: object
                        certFile:
                          description: Path to the client cert file in the container
                            for the targets.
                          type: string
                        insecureSkipVerify:
                          description: Disable target certificate validation.
                          type: boolean
                        keyFile:
                          description: Path to the client key file in the container
                            for the targets.
                          type: string
                        keySecret:
                          description: Secret containing the client key file for the
                            targets.
                          properties:
                            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:
                          - key
                          type: object
                        serverName:
                          description: Used to verify the hostname for the targets.
                          type: string
                      type: object
                    url:
                      description: AlertManager url. Required parameter. E.g. http://127.0.0.1:9093
                      type: string
                  required:
                  - url
                  type: object
                type: array
              podDisruptionBudget:
                description: PodDisruptionBudget created by operator
                properties:
                  maxUnavailable:
                    anyOf:
                    - 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".
                    x-kubernetes-int-or-string: true
                  minAvailable:
                    anyOf:
                    - 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%".
                    x-kubernetes-int-or-string: true
                type: object
              podMetadata:
                description: PodMetadata configures Labels and Annotations which are
                  propagated to the VMAlert pods.
                properties:
                  annotations:
                    additionalProperties:
                      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:
                      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
              readinessProbe:
                description: ReadinessProbe that will be added CRD pod
                type: object
                x-kubernetes-preserve-unknown-fields: true
              remoteRead:
                description: RemoteRead victoria metrics address for loading state
                  This configuration makes sense only if remoteWrite was configured
                  before and has been successfully persisted its state.
                properties:
                  basicAuth:
                    description: BasicAuth allow an endpoint to authenticate over
                      basic authentication
                    properties:
                      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:
                          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:
                        - key
                        type: object
                      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:
                          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:
                        - key
                        type: object
                    type: object
                  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 describes tls configuration for remote
                      read target
                    properties:
                      ca:
                        description: Stuct containing the CA cert to use for the targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      caFile:
                        description: Path to the CA cert in the container to use for
                          the targets.
                        type: string
                      cert:
                        description: Struct containing the client cert file for the
                          targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      certFile:
                        description: Path to the client cert file in the container
                          for the targets.
                        type: string
                      insecureSkipVerify:
                        description: Disable target certificate validation.
                        type: boolean
                      keyFile:
                        description: Path to the client key file in the container
                          for the targets.
                        type: string
                      keySecret:
                        description: Secret containing the client key file for the
                          targets.
                        properties:
                          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:
                        - key
                        type: object
                      serverName:
                        description: Used to verify the hostname for the targets.
                        type: string
                    type: object
                  url:
                    description: URL of the endpoint to send samples to.
                    type: string
                required:
                - url
                type: object
              remoteWrite:
                description: RemoteWrite Optional URL to remote-write compatible storage
                  where to write timeseriesbased on active alerts. E.g. http://127.0.0.1:8428
                properties:
                  basicAuth:
                    description: BasicAuth allow an endpoint to authenticate over
                      basic authentication
                    properties:
                      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:
                          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:
                        - key
                        type: object
                      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:
                          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:
                        - key
                        type: object
                    type: object
                  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
                  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 describes tls configuration for remote
                      write target
                    properties:
                      ca:
                        description: Stuct containing the CA cert to use for the targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      caFile:
                        description: Path to the CA cert in the container to use for
                          the targets.
                        type: string
                      cert:
                        description: Struct containing the client cert file for the
                          targets.
                        properties:
                          configMap:
                            description: ConfigMap containing data to use for the
                              targets.
                            properties:
                              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:
                            - key
                            type: object
                          secret:
                            description: Secret containing data to use for the targets.
                            properties:
                              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:
                            - key
                            type: object
                        type: object
                      certFile:
                        description: Path to the client cert file in the container
                          for the targets.
                        type: string
                      insecureSkipVerify:
                        description: Disable target certificate validation.
                        type: boolean
                      keyFile:
                        description: Path to the client key file in the container
                          for the targets.
                        type: string
                      keySecret:
                        description: Secret containing the client key file for the
                          targets.
                        properties:
                          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:
                        - key
                        type: object
                      serverName:
                        description: Used to verify the hostname for the targets.
                        type: string
                    type: object
                  url:
                    description: URL of the endpoint to send samples to.
                    type: string
                required:
                - 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:
                  limits:
                    additionalProperties:
                      anyOf:
                      - type: integer
                      - type: string
                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                      x-kubernetes-int-or-string: 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:
                      anyOf:
                      - type: integer
                      - type: string
                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                      x-kubernetes-int-or-string: 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:
                  maxSurge:
                    anyOf:
                    - 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.'
                    x-kubernetes-int-or-string: true
                  maxUnavailable:
                    anyOf:
                    - 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.'
                    x-kubernetes-int-or-string: true
                type: object
              ruleNamespaceSelector:
                description: RuleNamespaceSelector to be selected for VMRules discovery.
                  If unspecified, only the same namespace as the vmalert object is
                  in is used.
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements.
                      The requirements are ANDed.
                    items:
                      description: A label selector requirement is a selector that
                        contains values, a key, and an operator that relates the key
                        and values.
                      properties:
                        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:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      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
              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:
                  type: string
                type: array
              ruleSelector:
                description: RuleSelector selector to select which VMRules to mount
                  for loading alerting rules from.
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements.
                      The requirements are ANDed.
                    items:
                      description: A label selector requirement is a selector that
                        contains values, a key, and an operator that relates the key
                        and values.
                      properties:
                        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:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      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
              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:
                  type: string
                type: array
              securityContext:
                description: SecurityContext holds pod-level security attributes and
                  common container settings. This defaults to the default PodSecurityContext.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              serviceAccountName:
                description: ServiceAccountName is the name of the ServiceAccount
                  to use to run the VMAlert Pods.
                type: string
              serviceSpec:
                description: ServiceSpec that will be added to vmalert service spec
                properties:
                  metadata:
                    description: EmbeddedObjectMetadata defines objectMeta for additional
                      service.
                    properties:
                      annotations:
                        additionalProperties:
                          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:
                          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
                    x-kubernetes-preserve-unknown-fields: true
                required:
                - spec
                type: object
              startupProbe:
                description: StartupProbe that will be added to CRD pod
                type: object
                x-kubernetes-preserve-unknown-fields: true
              tolerations:
                description: Tolerations If specified, the pod's tolerations.
                items:
                  description: The pod this Toleration is attached to tolerates any
                    taint that matches the triple <key,value,effect> using the matching
                    operator <operator>.
                  properties:
                    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:
                  description: TopologySpreadConstraint specifies how to spread matching
                    pods among the given topology.
                  required:
                  - maxSkew
                  - topologyKey
                  - whenUnsatisfiable
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                type: array
              updateStrategy:
                description: UpdateStrategy - overrides default update strategy.
                enum:
                - Recreate
                - 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:
                  description: VolumeMount describes a mounting of a Volume within
                    a container.
                  properties:
                    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:
                  - 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:
                  description: Volume represents a named volume in a pod that may
                    be accessed by any container in the pod.
                  required:
                  - name
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                type: array
            required:
            - datasource
            type: object
          status:
            description: VmAlertStatus defines the observed state of VmAlert
            properties:
              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:
            - availableReplicas
            - replicas
            - unavailableReplicas
            - updatedReplicas
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
