apiVersion: v1
kind: ConfigMap
metadata:
  name: traefik-conf
  namespace: traefik-system
data:
  traefik.toml: |
    defaultEntryPoints = ["http","https"]
    debug = false
    logLevel = "INFO"

    # Do not verify backend certificates (use https backends)
    InsecureSkipVerify = true

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

    #Config to redirect http to https
    #[entryPoints]
    #  [entryPoints.http]
    #  address = ":80"
    #  compress = true
    #    [entryPoints.http.redirect]
    #    entryPoint = "https"
    #  [entryPoints.https]
    #  address = ":443"
    #    [entryPoints.https.tls]

    [web]
      address = ":8080"

    [kubernetes]
    # Array of namespaces to watch.
    #
    # Optional
    # Default: all namespaces (empty array).
    #
    # namespaces = ["default", "production"]

    # Ingress label selector to filter Ingress objects that should be processed.
    #
    # Optional
    # Default: empty (process all Ingresses)
    #
    # labelselector = "A and not B"
    # Only create ingresses where the object has traffic-type: external label
    # labelselector = "traffic-type=internal"

    # Value of `kubernetes.io/ingress.class` annotation that identifies Ingress objects to be processed.
    # If the parameter is non-empty, only Ingresses containing an annotation with the same value are processed.
    # Otherwise, Ingresses missing the annotation, having an empty value, or the value `traefik` are processed.
    #
    # Optional
    # Default: empty
    #
    # ingressClass = "traefik-internal"

    [metrics]
      [metrics.prometheus]
      buckets=[0.1,0.3,1.2,5.0]
      entryPoint = "traefik"
    [ping]
    entryPoint = "http"
