---
kind: ConfigMap
apiVersion: v1
metadata:
  name: traefik-config
  namespace: "${K8S_NAMESPACE}"
data:
  traefik.toml: |-
    checkNewVersion = false

    logLevel = "WARN"

    InsecureSkipVerify = true

    defaultEntryPoints = ["http", "https"]

    [entryPoints]
      [entryPoints.http]
      address = ":80"
        [entryPoints.http.redirect]
        entryPoint = "https"

      [entryPoints.https]
      address = ":443"
        [entryPoints.https.tls]

    [acme]
    acmeLogging = true
    email = "${ACME_EMAIL}"
    storageFile = "/data/traefik/acme.json"
    entryPoint = "https"

    onDemand = false
    OnHostRule = true

      [acme.httpChallenge]
        entryPoint = "http"
    [web]
    address = ":8080"

    [accessLog]
    format = "json"

    [web.metrics.prometheus]
    Buckets=[0.1,0.3,1.2,5.0]
