{
  "description": "MetricTemplate is the Schema for the MetricTemplates API.",
  "type": "object",
  "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": "MetricTemplateSpec defines the desired state of a MetricTemplate.",
      "type": "object",
      "required": [
        "provider",
        "query"
      ],
      "properties": {
        "provider": {
          "description": "Provider of this metric template",
          "type": "object",
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "description": "Type of this provider",
              "type": "string",
              "enum": [
                "prometheus",
                "influxdb",
                "datadog",
                "stackdriver",
                "cloudwatch",
                "newrelic",
                "graphite",
                "dynatrace",
                "keptn",
                "splunk"
              ]
            },
            "address": {
              "description": "API address of this provider",
              "type": "string"
            },
            "headers": {
              "description": "Headers to add to HTTP(S) requests",
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "secretRef": {
              "description": "Kubernetes secret reference containing the provider credentials",
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "description": "Name of the Kubernetes secret",
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "region": {
              "description": "Region of the provider",
              "type": "string"
            },
            "insecureSkipVerify": {
              "description": "Disable SSL certificate validation for the provider address",
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "query": {
          "description": "Query of this metric template",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}
