apiVersion: v1
kind: ConfigMap
metadata:
  name: traefik-config
data:
  traefik.toml: |
    debug = true
    logLevel = "DEBUG"
    defaultEntryPoints = ["http"]

    [file]
    watch = true
    directory = "/etc/traefik/"

    [entryPoints]
        [entryPoints.http]
        address = ":80"

    [accessLog]
    format = "common"

    [frontends]
        [frontends.frontend1]
        backend = "backend1"
            [frontends.frontend1.routes.test_1]
            rule = "Host: localhost; PathPrefix: /app"

    [backends]
        [backends.backend1]
            [backends.backend1.LoadBalancer]
            method = "drr"

            #[backends.backend1.healthcheck]
            #path = "/app/health"
            #interval = "3s"

            [backends.backend1.servers.server1]
            url = "http://127.0.0.1:8081"
            weight = 1

            [backends.backend1.servers.server2]
            url = "http://127.0.0.1:8082"
            weight = 1
