x-google-marketplace:
  schemaVersion: v2

  applicationApiVersion: v1beta1

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

  clusterConstraints:
    resources:
    - replicas: 1
      requests:
        cpu: 100m
        memory: 100Mi
    - replicas: 1
      requests:
        cpu: 100m
        memory: 2048Mi

  images:
    '':
      properties:
        sonarqube.image.repo:
          type: REPO_WITH_REGISTRY
        sonarqube.image.tag:
          type: TAG
    postgresql-exporter:
      properties:
        postgresql.exporter.image:
          type: FULL
    prometheus-to-sd:
      properties:
        metrics.image:
          type: FULL
    postgresql:
      properties:
        postgresql.image:
          type: FULL

properties:
  name:
    type: string
    x-google-marketplace:
      type: NAME
  namespace:
    type: string
    x-google-marketplace:
      type: NAMESPACE
  postgresql.db.password:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
  sonarqube.persistence.storageClass:
    type: string
    title: StorageClass
    description: You can choose an existing StorageClass or create a new one.
    x-google-marketplace:
      type: STORAGE_CLASS
      storageClass:
        type: SSD
  sonarqube.persistence.size:
    type: string
    title: Storage size for Sonarqube
    default: "5Gi"
    description: The storage size (GB) for the Sonarqube persistent volume
    pattern: '^[1-9][0-9]*(\.[0-9]+)?[TGM]i?$'
  deployer.image:
    type: string
    x-google-marketplace:
      type: DEPLOYER_IMAGE
  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
  certificate:
    type: string
    x-google-marketplace:
      type: TLS_CERTIFICATE
      tlsCertificate:
        generatedProperties:
          base64EncodedPrivateKey: tls.base64EncodedPrivateKey
          base64EncodedCertificate: tls.base64EncodedCertificate

required:
- name
- namespace
- postgresql.db.password
- sonarqube.persistence.size
- metrics.exporter.enabled
- certificate
