WIP test: optional traefik installation#4024
Draft
shreddedbacon wants to merge 3 commits intomainfrom
Draft
Conversation
68de186 to
2d3998f
Compare
Member
Author
|
https://traefik.io/blog/transition-from-ingress-nginx-to-traefik and https://doc.traefik.io/traefik/v3.5/reference/routing-configuration/kubernetes/ingress-nginx/
This only matters if using the ingress-nginx provider in |
c9f4c16 to
071bcb6
Compare
071bcb6 to
df66a25
Compare
Member
Author
|
New charts branch that can install different controllers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
General Checklist
Database Migrations
Description
This is an experimental branch to see which tests pass/fail when using Traefik instead of ingress-nginx, requires https://github.com/uselagoon/lagoon-charts/tree/traefik. This is not an indication that Traefik is our supported ingress-controller, just verifying alternatives.
Traefik has some support for a fair few ingress-nginx annotations, described here https://doc.traefik.io/traefik/master/reference/routing-configuration/kubernetes/ingress-nginx/
This branch is not using the
ingress-nginxprovider type, it is using a build-deploy-tool image that has support for traefik built in, and leveragesmiddlewareto reproduce some of the basics that Lagoon leveraged fromingress-nginxannotations. It runs a version ofaergia-controllerthat has limited support for idling with traefik too.What doesn't work in Lagoon (so far)
HSTS Configuration
The build-deploy-tool sets a
nginx.ingress.kubernetes.io/configuration-snippetannotation that contains the HSTS header, the Traefik ingress-nginx provider doesn't support this.Dev route
X-Robots-TagThe build-deploy-tool templating sets a
nginx.ingress.kubernetes.io/server-snippetannotation, this is not supported in Traefik. Ournginximages do set this, however an alternative would need to be found for anything else.Route annotations
Lagoon allows users to set annotations on their routes. If you've set annotations that are specific to
ingress-nginx, these will likely not work unless they're listed as supported in Traefik.Redirect annotations described in the docs are also unsupported.
See Traefik unsupported ingress-nginx annotations for all annotations without support.Edit: only applies if using the provider, which this PR is not.Idling
Out of the box, aergia-controller does not support Traefik. It is possible to extend it to support Traefik using middlewares, however it does require a few things:
--providers.kubernetescrd.allowcrossnamespace=trueto allow the aergia backend to be availableerrors.Notes
Traefik ingress-nginx provider
Traefik needs to be configured with the following flags to enable the
ingress-nginxsupportHowever, the
ingressClasson existing ingress still needs to be left pointing to whateveringress-nginxwould have created (usuallynginx). This means the remote-controller needs to haveLAGOON_FEATURE_FLAG_DEFAULT_INGRESS_CLASS=nginxset.Using this provider though with the
nginxingress class, you aren't able to leverage any other Traefik features like middlewares.Middlewares
Traefik middlewares offer a potential path out. Things like adding headers etc can mostly be done with middlewares.
Supporting middlewares would likely mean we should create specific lagoon yaml entries for things. A lot of people use the annotations to set permanent redirects, or IP whitelists. This would give us a structure that could potentially apply to other ingress controllers.
Linked