Comments (6)
I made some tests.
In docker (on linux), if you mount a file, events are trigger on the file but not on the directory and for other problem we only watch the directory.
To address this, I implemented a solution. If you require a temporary workaround, consider mounting the directory in the docker-compose file instead of the individual file. This should help mitigate the observed issues.
from traefik.
Hello,
The documentation explains this inside the Limitations section: https://doc.traefik.io/traefik/providers/file/#provider-configuration
It's recommended to use directory
instead of filename
because filename
can have issues with some filesystems.
from traefik.
@kevinpollet @ldez it still doesn't work using
providers:
file:
directory: /etc/traefik/dynamic
watch: true
from traefik.
Hello @darkweak,
This is unexpected.
By looking at the config you have shared, I can see that the routers are using a middleware named souin
but you didn’t share the definition of it nor the static part if it is indeed the souin plugin.
Can you please provide the full configuration needed to be able to try to reproduce the problem?
from traefik.
@rtribotte here is the minimal reproducible example
# ./dynamic-configuration.yml
http:
routers:
whoami-one:
entrypoints:
- http
service: whoami1
rule: Host(`whoami1.domain.com`)
whoami-two:
entrypoints:
- http
service: whoami2
rule: Host(`whoami2.domain.com`)
services:
whoami1:
loadBalancer:
servers:
- url: http://whoami1
passHostHeader: false
whoami2:
loadBalancer:
servers:
- url: http://whoami2
passHostHeader: false
# ./traefik.yml
providers:
file:
directory: /etc/traefik/dynamic
watch: true
api:
dashboard: true
debug: true
insecure: true
log:
level: DEBUG
accessLog: {}
# ./compose.yml
version: '3'
services:
traefik:
image: traefik:v3.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/traefik.yml
- ./dynamic-configuration.yml:/etc/traefik/dynamic/traefik-dynamic.yml
ports:
- 80:80
- 8080:8080
whoami1:
image: traefik/whoami
whoami2:
image: traefik/whoami
If I update the ./dynamic-configuration.yml
file (remove the whom-two
router declaration and the whoami2
service declaration) and save the file changes nothing get reloaded in Træfik but I set the watch: true
on the directory I put my dynamic configuration. Even without middlewares it doesn't get reloaded.
If I restart træfik, the new configuration get loaded well with only the whoami-one
router and the whoami1
service.
from traefik.
Closed by #10420.
from traefik.
Related Issues (20)
- Increase the last time to access the http service
- Possible memory leak in v2.10.5, maybe cause by consul/consulcatalog provider HOT 3
- Rewrite headers should be a core feature. HOT 1
- Building 2.11.0 docker image: `package slices is not in GOROOT` HOT 4
- Expose target service name in middleware HOT 5
- Subdomain wildcard HOT 1
- Traefik is removing Access-Control-Allow-Origin headers from the service response HOT 7
- Improve the performance of access logs HOT 2
- IPAllowList does not show allowed IPs in Dashboard as IPWhiteList does HOT 2
- error while adding rule Host: unexpected number of parameters; got 2, expected one of [1] HOT 2
- Unable to create custom TCP Middleware because depends on `unsafe` package HOT 4
- Using outdated Gateway API CRD Versions HOT 2
- v3.0.0-rc1 - configfile is ignored HOT 2
- v3.0.0 RC1 imposes tracecontext as propagation HOT 5
- k8s configuration traefik load balancer But with kubectl get ingress -o wide -n service There is no address. HOT 1
- some TCP services with proxyProtocol.trustedIPs broken in 3.0.0-rc1 HOT 5
- ACME Challenge Failure Against NS1 with image tag v2.11.0 HOT 5
- build on 32-bit arches error: overflows int HOT 3
- ReusePort directive doesn't work on multiple websecure-like entrypoints HOT 1
- Default certificate not found when migrating to v3.0.0-rc1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik.