x-google-marketplace:
  schemaVersion: v2

  applicationApiVersion: v1beta1

  publishedVersion: "$TAG"
  publishedVersionMetadata:
    releaseNote: >-
      A regular update.
    releaseTypes:
    - Feature
    recommended: false

  images:
    '':
      properties:
        grafana.image.repo:
          type: REPO_WITH_REGISTRY
        grafana.image.tag:
          type: TAG
    debian9:
      properties:
        grafana.initImage:
          type: FULL
    prometheus-to-sd:
      properties:
        metrics.image:
          type: FULL

properties:
  name:
    type: string
    x-google-marketplace:
      type: NAME
  namespace:
    type: string
    x-google-marketplace:
      type: NAMESPACE
  grafana.password:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
  grafana.serviceaccount:
    type: string
    title: Grafana Service Account
    x-google-marketplace:
      type: SERVICE_ACCOUNT
      serviceAccount:
        description: Service account used by main Grafana StatefulSet
        roles:
        - type: ClusterRole
          rulesType: CUSTOM
          rules:
          - apiGroups: [""]
            resources:
            - endpoints
            - pods
            - nodes
            verbs:
            - get
            - list
  grafana.persistence.storageClass:
    type: string
    title: StorageClass
    description: You can choose an existing StorageClass or create a new one. Newly created StorageClass provisioner will be "pd-ssd".
    x-google-marketplace:
      type: STORAGE_CLASS
      storageClass:
        type: SSD
  grafana.persistence.size:
    type: string
    title: Grafana application storage size
    description: Storage size for Grafana persistent volume
    default: '2Gi'
    pattern: '^[1-9][0-9]*(\.[0-9]+)?[TGM]i?$'

  metrics.exporter.enabled:
    type: boolean
    title: Enable Stackdriver Metrics Exporter
    description: Your GCP project should have Stackdriver enabled. For non-GCP clusters, export of metrics to Stackdriver is not supported yet
    default: false

required:
- name
- namespace
- grafana.password
- grafana.serviceaccount
- metrics.exporter.enabled
