{
  "description": "Grafana represents a generator for Grafana service account tokens.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "GrafanaSpec controls the behavior of the grafana generator.",
      "properties": {
        "auth": {
          "description": "Auth is the authentication configuration to authenticate\nagainst the Grafana instance.",
          "properties": {
            "basic": {
              "description": "Basic auth credentials used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/",
              "properties": {
                "password": {
                  "description": "A basic auth password used to authenticate against the Grafana instance.",
                  "properties": {
                    "key": {
                      "description": "The key where the token is found.",
                      "maxLength": 253,
                      "minLength": 1,
                      "pattern": "^[-._a-zA-Z0-9]+$",
                      "type": "string"
                    },
                    "name": {
                      "description": "The name of the Secret resource being referred to.",
                      "maxLength": 253,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "username": {
                  "description": "A basic auth username used to authenticate against the Grafana instance.",
                  "type": "string"
                }
              },
              "required": [
                "password",
                "username"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "token": {
              "description": "A service account token used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/",
              "properties": {
                "key": {
                  "description": "The key where the token is found.",
                  "maxLength": 253,
                  "minLength": 1,
                  "pattern": "^[-._a-zA-Z0-9]+$",
                  "type": "string"
                },
                "name": {
                  "description": "The name of the Secret resource being referred to.",
                  "maxLength": 253,
                  "minLength": 1,
                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "serviceAccount": {
          "description": "ServiceAccount is the configuration for the service account that\nis supposed to be generated by the generator.",
          "properties": {
            "name": {
              "description": "Name is the name of the service account that will be created by ESO.",
              "type": "string"
            },
            "role": {
              "description": "Role is the role of the service account.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/",
              "type": "string"
            }
          },
          "required": [
            "name",
            "role"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "url": {
          "description": "URL is the URL of the Grafana instance.",
          "type": "string"
        }
      },
      "required": [
        "auth",
        "serviceAccount",
        "url"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
