apiVersion: v1
kind: ConfigMap
metadata:
  name: hive-matastore-init-postgresql-conf
data:
  metastore-site.xml: |-
    <configuration>
      <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>{{ .Values.jdbcDriverName }}</value>
      </property>
      <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>{{ .Values.dbConnectionString }}</value>
      </property>
      <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>{{ .Values.dbUserName }}</value>
      </property>
      <property>
      <name> javax.jdo.option.ConnectionPassword</name>
      <value>{{ .Values.dbUserPassword }}</value>
      </property>
      <property>
      <name>metastore.expression.proxy</name>
      <value>org.apache.hadoop.hive.metastore.DefaultPartitionExpressionProxy</value>
      </property>
      <property>
      <name>metastore.task.threads.always</name>
      <value>org.apache.hadoop.hive.metastore.events.EventCleanerTask,org.apache.hadoop.hive.metastore.MaterializationsCacheCleanerTask</value>
      </property>
      <property>
      <name>datanucleus.autoCreateSchema</name>
      <value>false</value>
      </property>
      <property>
      <name>hive.metastore.uris</name>
      <value>{{ .Values.metastoreUris }}</value>
      </property>
      <property>
      <name>hive.metastore.warehouse.dir</name>
      <value>{{ .Values.metastoreWarehouseDir }}</value>
      </property>
      <property>
      <name>hive.metastore.event.db.notification.api.authfalse</name>
      <value>false</value>
      </property>
      <property>
      <name>hadoop.proxyuser.hive.hostsHS2_HOST</name>
      <value>HS2_HOST</value>
      </property>
      <property>
      <name>hadoop.proxyuser.hive.groups*</name>
      <value>*</value>
      </property>
      <property>
      <name>datanucleus.autoStartMechanismSchemaTable</name>
      <value>SchemaTable</value>
      </property>
    </configuration>
