TraefikEE Provider

The default Traefik file provider can be difficult to operate in a distributed environment. For this reason, TraefikEE has a built-in dynamic configuration provider that replaces the file provider. This provider uses the same file formats as the file provider for ease of use. For more information on the file format, please refer to the reference.

Applying a TraefikEE Provider Configuration

TraefikEE provider configuration can be applied to a cluster using the apply command in teectl:

teectl apply --file=config.toml

The apply command supports both TOML and YAML dynamic configuration formats, in addition to Go Templating.

More information about the apply command can be found in the teectl reference.

Referencing resources across providers

The TraefikEE provider leverages the Traefik provider namespacing system. All resources defined using the TraefikEE provider are available from other providers under the traefikee namespace.

For example, a middleware called google-auth defined in the TraefiKEE provider is available as google-auth@traefikee from any other provider.

# Defines a google-auth middleware
[http.middlewares]
  [http.middlewares.google-auth.plugin.oidcAuth]
    source = "google"
    redirectURL = "/callback"
    [http.middlewares.google-auth.plugin.oidcAuth.session]
      secret = "0123456789secret"
---
# Defines a google-auth middleware
http:
  middlewares:
    google-auth:
      plugin:
        oidcAuth:
          source: "google"
          redirectURL: "/callback"
          session:
            secret: "0123456789secret"
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: secured-app
spec:
  # [...]
  routes:
    - match: Host(`secured.example.com`)
      kind: Rule
      middlewares:
        # Refers to the google-auth middleware defined with the TraefikEE provider
        - google-auth@traefikee
[...]
labels:
  # Refers to the google-auth middleware defined with the TraefikEE provider
  - "traefik.http.routers.secured-app.middlewares=google-auth@traefikee"

Getting the TraefikEE Provider Configuration

To get the currently applied TraefikEE provider configuration, use teectl:

teectl get traefikee-provider-config

The format of the output can be specified with the --format option.

More information about the get traefikee-provider-config command can be found in the teectl reference.

Deleting the TraefikEE Provider Configuration

If the TraefikEE provider configuration is no longer needed, it can be deleted using teectl:

teectl delete traefikee-provider-config

More information about the delete traefikee-provider-config command can be found in the teectl reference.