.catalog:
  name: "Postgres"
  version: "v0.0.1"
  description: "PostgreSQL"
  uuid: postgres-0
  minimum_rancher_version: v0.9.0
  questions:
    - variable: lb_port
      description: "Port to access PostgreSQL from external services"
      label: "Postgres LB Port"
      required: true
      default: 5432
      type: "int"
    - variable: postgres_db
      description: "Postgres Database"
      label: "Postgres Database"
      required: true
      default: "postgres_sb"
      type: "string"
    - variable: postgres_user
      description: "Postgres User"
      label: "Postgres User"
      required: true
      default: "postgres_user"
      type: "string"
    - variable: postgres_password
      description: "Postgres Password"
      label: "Postgres Password"
      required: true
      default: "postgres_password"
      type: "string"
      
version: '2'
services:
  postgres-lb:
    scale: 1
    lb_config:
      certs: []
      port_rules:
      - protocol: tcp
        service: postgres
        source_port: ${lb_port}
        target_port: 5432
    health_check:
      port: 42
      interval: 2000
      unhealthy_threshold: 3
      healthy_threshold: 2
      response_timeout: 2000
  postgres:
    scale: 1
    health_check:
      port: 5432
      interval: 2000
      unhealthy_threshold: 3
      healthy_threshold: 2
      response_timeout: 2000  
