---
apiVersion: v1
kind: ConfigMap
metadata:
  name: puppetdb-config
data:
  logback: |
    <configuration scan="true">
      <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
          <encoder>
              <pattern>%d %-5p [%thread] [%c{2}] %m%n</pattern>
          </encoder>
      </appender>

      <!-- Silence particularly noisy packages -->
      <logger name="org.apache.activemq" level="warn"/>
      <logger name="org.apache.activemq.store.kahadb.MessageDatabase"
          level="info"/>
      <logger name="org.springframework.jms.connection" level="warn"/>

      <root level="info">
          <appender-ref ref="STDOUT" />
      </root>
    </configuration>

  pdb-ini: |
    [global]
    vardir = /var/puppetdb
    logging-config = /etc/puppetlabs/puppetdb/conf.d/logback.xml

    [database]
    subname = //postgresql:5432/puppetdb
    username = puppetdb
    # REPLACE THIS WITH YOUR PASSWORD
    password = MyPassword

    [nrepl]
    enabled = false

    [jetty]
    port = 8080
    host = 0.0.0.0
    #ssl-port = 8081
    #ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.crt.pem
    #ssl-cert = /etc/puppetlabs/puppetdb/ssl/pdb.crt.pem
    #ssl-key = /etc/puppetlabs/puppetdb/ssl/pdb.key.pem

    [puppetdb]
    disable-update-checking = true
