apiVersion: v1
data:
  config.xml: |
    <Config>
      <UrlBase>{{ .Values.sonarr.ingress.path }}</UrlBase>
    </Config>
  init-sonarr.sh: |
    #!/bin/bash
    echo "### Initializing config ###"
    if [ ! -f /sonarr-config/config.xml ]; then
      cp -n /init-sonarr/config.xml /sonarr-config/config.xml
      echo "### No configuration found, intialized with default settings ###"
    fi
kind: ConfigMap
metadata:
  name: init-sonarr-cm
