controller 0.29.3

Tembo Operator for Postgres
Documentation
name: MessageQueue
description: A Tembo Postgres Stack optimized for Message Queue workloads.
image: "quay.io/tembo/standard-cnpg:15.3.0-1-1096aeb"
stack_version: 0.3.0
appServices:
  - name: mq-api
    image: postgrest/postgrest:v10.0.0
    routing:
      - port: 3000
        ingressPath: /pgmq/v1
        middlewares:
          - map-pgmq
          - strip-prefix
          - headers
    middlewares:
      - !customRequestHeaders
          name: headers
          config:
            Authorization: ""
            Content-Profile: pgmq
            Accept-Profile: pgmq
      - !stripPrefix
          name: strip-prefix
          config:
            - /rest/v1
      - !replacePathRegex
          name: map-pgmq
          config:
            regex: \/pgmq\/v1\/?
            replacement: /rpc/
    env:
      - name: PGRST_DB_URI
        valueFromPlatform: ReadWriteConnection
      - name: PGRST_DB_SCHEMA
        value: "public, pgmq"
      - name: PGRST_DB_ANON_ROLE
        value: postgres
      - name: PGRST_LOG_LEVEL
        value: info
    resources:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 400m
        memory: 256Mi
compute_templates:
  - cpu: 0.25
    memory: 1Gi
    instance_class: GeneralPurpose
  - cpu: 0.5
    memory: 2Gi
    instance_class: GeneralPurpose
  - cpu: 1
    memory: 4Gi
    instance_class: GeneralPurpose
  - cpu: 2
    memory: 8Gi
    instance_class: GeneralPurpose
  - cpu: 4
    memory: 16Gi
    instance_class: GeneralPurpose
  - cpu: 8
    memory: 32Gi
    instance_class: GeneralPurpose
  - cpu: 0.5
    memory: 1Gi
    instance_class: ComputeOptimized
  - cpu: 1
    memory: 2Gi
    instance_class: ComputeOptimized
  - cpu: 2
    memory: 4Gi
    instance_class: ComputeOptimized
  - cpu: 4
    memory: 8Gi
    instance_class: ComputeOptimized
  - cpu: 8
    memory: 16Gi
    instance_class: ComputeOptimized
  - cpu: 0.5
    memory: 4Gi
    instance_class: MemoryOptimized
  - cpu: 1
    memory: 8Gi
    instance_class: MemoryOptimized
  - cpu: 2
    memory: 16Gi
    instance_class: MemoryOptimized
  - cpu: 4
    memory: 32Gi
    instance_class: MemoryOptimized
trunk_installs:
  - name: pgmq
    version: 1.1.0
  - name: pg_partman
    version: 4.7.3
extensions:
  - name: pgmq
    locations:
      - database: postgres
        enabled: true
        version: 1.1.0
  - name: pg_partman
    locations:
      - database: postgres
        enabled: true
        version: 4.7.3
postgres_metrics:
  pgmq:
      query: select queue_name, queue_length, oldest_msg_age_sec, newest_msg_age_sec, total_messages from pgmq.metrics_all()
      master: true
      metrics:
        - queue_name:
            usage: LABEL
            description: Name of the queue
        - queue_length:
            usage: GAUGE
            description: Number of messages in the queue
        - oldest_msg_age_sec:
            usage: GAUGE
            description: Age of the oldest message in the queue, in seconds.
        - newest_msg_age_sec:
            usage: GAUGE
            description: Age of the newest message in the queue, in seconds.
        - total_messages:
            usage: GAUGE
            description: Total number of messages that have passed into the queue.
      target_databases:
        - "postgres"
postgres_config_engine: mq
postgres_config:
  - name: shared_preload_libraries
    value: pg_stat_statements,pg_partman_bgw
  - name: pg_partman_bgw.dbname
    value: postgres
  - name: pg_partman_bgw.interval
    value: 60
  - name: pg_partman_bgw.role
    value: postgres
  - name: random_page_cost
    value: 1.1
  - name: autovacuum_naptime
    value: '20s'
  - name: autovacuum_vacuum_cost_limit
    value: 10000
  - name: autovacuum_vacuum_scale_factor
    value: 0.05
  - name: autovacuum_vacuum_insert_scale_factor
    value: 0.05
  - name: autovacuum_analyze_scale_factor
    value: 0.05
  - name: track_io_timing
    value: 'on'
  - name: checkpoint_timeout
    value: 10min
  - name: pg_stat_statements.track
    value: all