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

  images:
    '':
      properties:
        postgresql.image.repo:
          type: REPO_WITH_REGISTRY
        postgresql.image.tag:
          type: TAG
    exporter:
      properties:
        exporter.image:
          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
  postgresql.serviceAccount:
    type: string
    title: PostgreSQL service account
    x-google-marketplace:
      type: SERVICE_ACCOUNT
      serviceAccount:
        description: >-
          Service account used by PostgreSQL StatefulSet (with default permissions)
  postgresql.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
  postgresql.persistence.size:
    type: string
    title: Storage size for persistent volumes
    default: "5Gi"
    description: PostgreSQL storage size
    pattern: '^[1-9][0-9]*(\.[0-9]+)?[TGM]i?$'
  postgresql.exposePublicService:
    type: boolean
    title: Enable public IP access
    description: Set the PostgreSQL Service type to LoadBalancer
    default: false
  db.password:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
  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
  tls.enabled:
    type: boolean
    title: Enable TLS Security Configuration
    description: Enable TLS secure communication for your PostgreSQL service.
    default: true
  certificate:
    type: string
    x-google-marketplace:
      type: TLS_CERTIFICATE
      tlsCertificate:
        generatedProperties:
          base64EncodedPrivateKey: tls.base64EncodedPrivateKey
          base64EncodedCertificate: tls.base64EncodedCertificate

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