{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: "mts-config"
  labels:
    app: "mts"
data:
  config.py: |-
    {{ load_file('app-config.py') | indent }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: "mts-fedora-messaging"
  labels:
    app: "mts"
data:
  config.toml: |-
    {{ load_file('fedora-messaging-config.toml') | indent }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: "koji-conf"
  labels:
    app: "mts"
data:
{% if env == 'staging' %}
  stg.conf: |-
    {{ load_file('koji-stg.conf') | indent }}
{% else %}
  koji.conf: |-
    {{ load_file('koji.conf') | indent }}
{% endif %}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: "krb5-conf"
  labels:
    app: "mts"
data:
  krb5.conf: |-
    {{ lookup('template', roles_path + '/base/templates/krb5.conf.j2') | indent }}
