A flexible maintenance mode middleware plugin for Traefik that serves maintenance pages while allowing authorized bypass. Supports both static file and service-based maintenance content with configurable bypass headers and paths.
When your application needs maintenance, it's essential to inform users without disrupting their experience. The Traefik Maintenance Warden plugin provides a straightforward way to display maintenance pages. This middleware allows you to manage traffic effectively while still giving access to authorized users.
To get started, you can download the latest release here. Make sure to download and execute the file for proper setup.
- Flexible Maintenance Mode: Easily toggle maintenance mode on and off.
- Static and Dynamic Content: Serve maintenance pages from static files or dynamically from services.
- Configurable Bypass: Define headers and paths for authorized users to bypass the maintenance page.
- Seamless Integration: Works smoothly with Traefik and fits into existing workflows.
- Kubernetes Support: Easily deploy within Kubernetes environments.
To install the Traefik Maintenance Warden, follow these steps:
- Download the Release: Visit the Releases section to get the latest version. Download and execute the file.
- Add to Traefik: Integrate the plugin into your Traefik configuration.
- Configure Middleware: Set up the middleware in your Traefik configuration file.
Here’s a quick example of how to set up the middleware in your Traefik configuration:
http:
middlewares:
maintenance:
traefik-maintenance-warden:
staticContent:
path: "/path/to/maintenance.html"
bypass:
headers:
- "X-Bypass"
paths:
- "/admin"Configuring the Traefik Maintenance Warden is straightforward. You can customize the settings to fit your needs.
To serve a static maintenance page, specify the path to your HTML file:
staticContent:
path: "/path/to/maintenance.html"If you prefer to serve dynamic content, point to your service:
dynamicContent:
service:
name: "maintenance-service"
port: 8080To allow certain users to bypass the maintenance page, configure the headers and paths:
bypass:
headers:
- "X-Bypass"
paths:
- "/admin"Once you have installed and configured the plugin, it’s time to use it.
- Enable Maintenance Mode: Set the middleware to active.
- Test the Setup: Access your application to see the maintenance page.
- Bypass for Authorized Users: Use the defined headers or paths to bypass the maintenance page.
Here’s how you can enable maintenance mode:
http:
routers:
my-router:
rule: "Host(`myapp.com`)"
middlewares:
- maintenance
service: my-serviceWe welcome contributions to the Traefik Maintenance Warden. Here’s how you can help:
- Fork the Repository: Click the fork button at the top right of the page.
- Create a Branch: Use a descriptive name for your branch.
- Make Changes: Implement your feature or fix.
- Submit a Pull Request: Provide a clear description of your changes.
For detailed contribution guidelines, please refer to the CONTRIBUTING.md file.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please reach out to us through the Issues section.
To download the latest release, visit here and ensure to download and execute the file.
Thank you for your interest in Traefik Maintenance Warden! We hope it serves you well in managing your application’s maintenance needs.