---
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: xxx
  name: traefik-conf
data:
  traefik.toml: |
    # traefik.toml
    logLevel = "DEBUG"
    defaultEntryPoints = ["http","https"]
    [entryPoints]
      [entryPoints.http]
      address = ":80"
      #启用gzip
      compress = true
      # [entryPoints.http.redirect]
      # entryPoint = "https"
      [entryPoints.https]
      address = ":443"
      compress = true
      [entryPoints.https.tls]
        [[entryPoints.https.tls.certificates]]
        certFile = "/ssl/www.xxx.com.cert"
        keyFile = "/ssl/www.xxx.com.key"
        [[entryPoints.https.tls.certificates]]
        certFile = "/ssl/2019/www.yyy.com.cert"
        keyFile = "/ssl/2019/www.yyy.com.key"
    # [kubernetes]

    [acme]
    email = "xxx"
    # /www/data/traefik
    storage = "/acme.json"
    # or `storage = "traefik/acme/account"` if using KV store.
    entryPoint = "https"
    # Enable on demand certificate generation. on first visit.
    onDemand = true
    # Enable certificate generation on frontends Host rules.
    onHostRule = true
    # dnsProvider = "dnspod"
    [acme.httpChallenge]
    entryPoint = "http"

    # [acme.dnsChallenge]
    # DNSPOD_API_KEY='52851,dcc8cdc24275201a17274cc9896b9f0d'
    # provider = "dnspod"
    # delayBeforeCheck = 0
