apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: keptnmetricsproviders.metrics.keptn.sh
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
    {{- with .Values.global.caInjectionAnnotations }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
    {{- include "common.annotations" ( dict "context" . ) }}
  labels:
    app.kubernetes.io/part-of: keptn
    crdGroup: metrics.keptn.sh
    keptn.sh/inject-cert: "true"
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
spec:
  group: metrics.keptn.sh
  names:
    kind: KeptnMetricsProvider
    listKind: KeptnMetricsProviderList
    plural: keptnmetricsproviders
    shortNames:
    - kmp
    singular: keptnmetricsprovider
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders
          API
        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: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider
            properties:
              insecureSkipTlsVerify:
                default: false
                description: InsecureSkipTlsVerify skips verification of the tls certificate
                  when fetching metrics
                type: boolean
              secretKeyRef:
                description: SecretKeyRef defines an optional secret for access credentials
                  to the metrics provider.
                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
                    type: string
                  optional:
                    description: Specify whether the Secret or its key must be defined
                    type: boolean
                required:
                - key
                type: object
                x-kubernetes-map-type: atomic
              targetServer:
                description: TargetServer defines URL (including port and protocol)
                  at which the metrics provider is reachable.
                type: string
              type:
                description: Type represents the provider type. This can be one of
                  cortex, datadog, dql, dynatrace, prometheus, elastic or thanos.
                pattern: cortex|datadog|dql|dynatrace|prometheus|elastic|thanos
                type: string
            required:
            - targetServer
            type: object
          status:
            description: unused field
            type: string
        type: object
    served: true
    storage: true
    subresources:
      status: {}
  - name: v1alpha2
    schema:
      openAPIV3Schema:
        description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders
          API
        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: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider
            properties:
              secretKeyRef:
                description: SecretKeySelector selects a key of a Secret.
                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
                    type: string
                  optional:
                    description: Specify whether the Secret or its key must be defined
                    type: boolean
                required:
                - key
                type: object
                x-kubernetes-map-type: atomic
              targetServer:
                type: string
            required:
            - targetServer
            type: object
          status:
            description: unused field
            type: string
        type: object
    served: true
    storage: false
    subresources:
      status: {}
  - name: v1alpha3
    schema:
      openAPIV3Schema:
        description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders
          API
        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: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider
            properties:
              secretKeyRef:
                description: SecretKeyRef defines an optional secret for access credentials
                  to the metrics provider.
                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
                    type: string
                  optional:
                    description: Specify whether the Secret or its key must be defined
                    type: boolean
                required:
                - key
                type: object
                x-kubernetes-map-type: atomic
              targetServer:
                description: TargetServer defined the URL at which the metrics provider
                  is reachable with included port and protocol.
                type: string
              type:
                description: Type represents the provider type. This can be one of
                  prometheus, dynatrace, datadog, dql.
                pattern: prometheus|dynatrace|datadog|dql
                type: string
            required:
            - targetServer
            type: object
          status:
            description: unused field
            type: string
        type: object
    served: true
    storage: false
    subresources:
      status: {}
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders
          API
        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: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider
            properties:
              secretKeyRef:
                description: SecretKeyRef defines an optional secret for access credentials
                  to the metrics provider.
                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
                    type: string
                  optional:
                    description: Specify whether the Secret or its key must be defined
                    type: boolean
                required:
                - key
                type: object
                x-kubernetes-map-type: atomic
              targetServer:
                description: TargetServer defines URL (including port and protocol)
                  at which the metrics provider is reachable.
                type: string
              type:
                description: Type represents the provider type. This can be one of
                  prometheus, dynatrace, datadog, dql.
                pattern: prometheus|dynatrace|datadog|dql
                type: string
            required:
            - targetServer
            type: object
          status:
            description: unused field
            type: string
        type: object
    served: true
    storage: false
    subresources:
      status: {}
