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:
        wordpress.image.repo:
          type: REPO_WITH_REGISTRY
        wordpress.image.tag:
          type: TAG
    mysql:
      properties:
        db.image:
          type: FULL
    mysqld-exporter:
      properties:
        db.exporter.image:
          type: FULL
    apache-exporter:
      properties:
        apache.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
  db.rootPassword:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
        base64: False
  db.wordpressPassword:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
        base64: False
  db.exporter.password:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 12
        base64: False

  # Persistence parameters for Wordpress Application
  wordpress.persistence.storageClass:
    type: string
    title: StorageClass for WordPress Application
    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
  wordpress.persistence.size:
    type: string
    title: Storage size for persistent volumes in WordPress Application
    default: "5Gi"
    description: WordPress storage size per instance
    pattern: '^[1-9][0-9]*(\.[0-9]+)?[TGM]i?$'

  # Persistence parameters for MySQL
  db.persistence.storageClass:
    type: string
    title: StorageClass for MySQL Application
    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
  db.persistence.size:
    type: string
    title: Storage size for persistent volumes in MySQL Application
    default: "5Gi"
    description: MySQL storage size per instance
    pattern: '^[1-9][0-9]*(\.[0-9]+)?[TGM]i?$'

  # An e-mail address for WordPress site.
  admin.email:
    type: string
    title: WordPress admin e-mail address
    description: The e-mail address for administrator account of WordPress.
    default: noreply@example.com
    # https://www.w3.org/TR/html52/sec-forms.html#email-state-typeemail
    pattern: ^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
  # A password for WordPress site.
  admin.password:
    type: string
    x-google-marketplace:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 20
        base64: False
  enablePublicServiceAndIngress:
    type: boolean
    title: Enable public IP access
    description: Set the WordPress Service type to NodePort and enable Ingress
    default: false
  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
- db.rootPassword
- db.wordpressPassword
- db.exporter.password
- admin.email
- admin.password
- metrics.exporter.enabled
- enablePublicServiceAndIngress
- certificate
