apiVersion: v1
kind: ConfigMap

metadata:
  name: traefik-config
  namespace: default
  labels:
    k8s-app: traefik-ingress-lb

data:
  traefik.toml: |
    defaultEntryPoints = ["http","https"]
    logLevel = "DEBUG"

    [api]
    [kubernetes]

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

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

    [acme]
    email = "changeme@exmple.net"
    storage = "/mnt/shared/traefik/acme.json"
    entryPoint = "https"
    acmeLogging = true
    onHostRule = true

    [acme.httpChallenge]
      entryPoint = "http"
