apiVersion: v1
kind: ConfigMap
metadata:
  name: db2-service-broker
data:
  app.conf: |+
    appname = db2-service-broker
    httpport = 8000
    runmode = dev
    autorender = false
    copyrequestbody = true
    EnableDocs = true

    include "db2-service-broker.conf"
  db2-service-broker.conf: |+
    [db2-service-broker]
    settings.path="conf/settings.yaml"

    [etcd]
    endpoints="http://127.0.0.1:2379"
    # For multi endpoints. endpoints="http://192.168.86.131:2379,http://192.168.86.132:2379,http://192.168.86.133:2379"

    [auth]
    username="suyan"
    password="12345678"
  settings.yaml:  |+
    # This file should not be used in deployed environments. Instead, set
    # the SETTINGS_PATH environment variable to point to a configuration
    # file that contains these settings.

    services:
    - name: db2-service
      id: 3102c871-1044-4716-a7dc-9ded2e028380
      description: DB2 service for application development and testing
      bindable: true
      tags:
        - db2
        - relational
      metadata:
        providerDisplayName: experimental
        imageUrl: http://orvjyath1.bkt.clouddn.com/db2_logo_image.png
        # serviceType: database cache message-queue
        serviceType: database
        longDescription: |
          # DB2 Service Broker Description

          用于对接外部DB2集群服务,遵守ServiceBroker API规范.
          [Open Service Broker](https://www.openservicebrokerapi.org/)


          更多信息,
          [请访问 GitHub 上 Service Catalog 项目](https://github.com/kubernetes-incubator/service-catalog).
        basicInformation: |
          # DB2 Service Broker Basic Information

          用于对接外部DB2集群服务,遵守ServiceBroker API规范.
          [Open Service Broker](https://www.openservicebrokerapi.org/)


          更多信息,
          [请访问 GitHub 上 Service Catalog 项目](https://github.com/kubernetes-incubator/service-catalog).
        configParam: |
          ## 配置参数描述
          ```
          service_name: 服务的名字
          plan_name: 套餐的名字
          connect_uri: 数据库链接字符串
          ```
        howToUse: |
          ## 参数使用说明
          ```
          service_name: db2-service
          plan_name: default
          connect_uri: DATABASE=sample; HOSTNAME=192.168.21.87; PORT=50000; PROTOCOL=TCPIP; UID=db2admin; PWD=12345678; FILE_ROOT=C:\Tablespaces\
          ```
      plans:
      - name: default
        id: 2651da21-dc16-4c1a-ba6c-1c681a3ddb2c1
        description: Shared DB2 Server
        free: true
        bindable: true
        metadata:
         costs:
         - amount:
             value: 5
           unit: g
         bullets:
           - Shared DB2 server
           - free storage
