Code Monkey home page Code Monkey logo

rancher-traefik's Introduction

rancher-traefik

This image is the traefik dynamic conf for rancher. It comes from rawmind/rancher-tools.

Build

docker build -t rawmind/rancher-traefik:<version> .

Versions

Usage

This image has to be run as a sidekick of rawmind/alpine-traefik, and makes available /opt/tools volume. It scans from rancher-metadata, looking for services and externalServices that have traefik labels and generates traefik frontend and backends to expose the services.

Configuration labels

Traefik labels have to be created in your service or externalService in order to get included in traefik dynamic config.

  • traefik.enable = < true | stack | false > #Controls if you want to publish or not the service
    • true: the service will be published as service_name.stack_name.traefik_domain
    • stack: the service will be published as stack_name.domain. WARNING: You can have collisions inside services within your stack
    • false: the service will not be published
  • traefik.priority = # Override for frontend priority. Default 5
  • traefik.protocol = < http | https > # Override the default protocol http
  • traefik.sticky = < true | false > # Enable/disable sticky sessions to the backend. Default false
  • traefik.backend.loadbalancer.method = < drr | wrr > # Override default lb algorithm drr
  • traefik.backend.circuitbreaker.expression = < expression > # Override default backend circuitbreaker expression NetworkErrorRatio() > 0.5
  • traefik.frontend.passHostHeader = < true | false > # Forward client Host header to the backend. Default true
  • traefik.weight = < weight > # Override default backend weight 5
  • traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFUL
  • traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here
  • traefik.domain = < domain.name > # Domain names to route rules. Multiple domains separated by ","
  • traefik.domain.regexp = < domain.regexp > # Domain name regexp rule. Multiple domains separated by ","
  • traefik.port = # Port to expose through traefik. Default 80
  • traefik.acme = < true | false > # Enable/disable ACME traefik feature. Default false
  • traefik.path = < path > # Path rule. Multiple values separated by ","
  • traefik.path.strip = < path > # Path strip rule. Multiple values separated by ","
  • traefik.path.prefix = < path > # Path prefix rule. Multiple values separated by ","
  • traefik.path.prefix.strip = < path > # Path prefix strip rule. Multiple values separated by ","
  • traefik.ratelimit.enable = < true | false > # Enable/disabe rate-limiting based on client ip. Default false
  • traefik.ratelimit.period = < n > # Replace n with desired amount of seconds in which traefik is checking the limits "average" and "burst". Default 10
  • traefik.ratelimit.average = < n > # Change to desired average allowed requests by client ip. Default 100
  • traefik.ratelimit.burst = < n > # State what limit the client ip is allowed to burst up to respectively. Default 200

WARNING: Only services with healthy state are added to traefik, so health checks are mandatory.

Details for configuring the traefik rules can be found at: https://docs.traefik.io/basics/#frontends

rancher-traefik's People

Contributors

rawmind0 avatar romracer avatar fabiorauber avatar hermsi1337 avatar bmanth60 avatar theaxiom avatar lasley avatar jhmartin avatar

Watchers

James Cloos avatar Robert Brendler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.