-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Allow custom traefik middlewares #3637
feat: Allow custom traefik middlewares #3637
Conversation
… only basicauth and redirect
Thank you for the PR! I have to test it, but it looks good! |
Thank you for working on this. However, I've noticed that the changes don't seem to work as expected with pre-made templates, specifically the Ghost template. IssueAfter applying the update, the middlewares are not being merged for the Ghost pre-made template. ExampleIn my deployable compose file for Ghost, the labels include: labels:
- traefik.http.routers.https-0-[redacted]-ghost.middlewares=crowdsec@file
# ... other labels ...
- 'traefik.http.routers.https-0-[redacted]-ghost.middlewares=gzip,redir-ghost' We can see that the Expected BehaviorBased on the changes described in the PR, we would expect all middlewares to be merged into a single list, similar to: - 'traefik.http.routers.https-0-[redacted]-ghost.middlewares=gzip,redir-ghost,crowdsec@file' SuggestionIt seems that the middleware merging logic might not be applied correctly to pre-made templates. Could you please investigate why the middlewares aren't being merged for the Ghost template (and potentially other pre-made templates)? This issue suggests that there might be a difference in how labels are processed for pre-made templates compared to custom configurations. It would be helpful to ensure that the new middleware merging logic is consistently applied across all types of deployments, including pre-made templates. |
Hi, I experienced the same problem as Paillat-dev with |
@Paillat-dev please open a issue for your problem so we can track this better. |
Sure will do later |
Thanks for your feedback @Paillat-dev
I think that there is nothing wrong with the pre-made templates and it's just a misunderstanding about the content of this MR, I should have been clearer. Could you try defining your crowdsec middleware inside the labels? I am unable to test it myself until next week. |
This is my first merge request, open to feedback
Solves #3122
Changes
Using the following compose-file:
now results in the following label:
instead of: