apiVersion: v1
kind: ConfigMap
metadata:
  name: openstack-exporter-openstack-config
data:
  openstack-config.yaml: |
    exporter:
      log_level: {{ required ".Values.exporter.log_level missing" .Values.exporter.log_level }}
      prometheus_port: {{ required ".Values.exporter.prometheus_port missing" .Values.exporter.prometheus_port | quote }}
    openstack:
      auth_url: https://{{include "keystone_api_endpoint_host_public" .}}/v3
      username: {{ required ".Values.openstack.username missing" .Values.openstack.username }}
      password: {{ derivePassword 1 "long" .Values.global.master_password "openstack_exporter" (include "keystone_api_endpoint_host_public" .) | quote }}
      user_domain_name: {{ required ".Values.openstack.user_domain_name missing" .Values.openstack.user_domain_name }}
      project_domain_name: {{ required ".Values.openstack.project_domain_name missing" .Values.openstack.project_domain_name }}
      project_name: {{ required ".Values.openstack.project_name missing" .Values.openstack.project_name }}
      region: {{ required ".Values.global.region missing" .Values.global.region }}
