Skip to content

Commit

Permalink
Merge pull request #1688 from OpenC3/traefik3
Browse files Browse the repository at this point in the history
Traefik v3 (COSMOS 6)
  • Loading branch information
jmthomas authored Nov 8, 2024
2 parents 74aa4b7 + 3d528cb commit d727a03
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 34 deletions.
6 changes: 3 additions & 3 deletions examples/hostinstall/centos7/traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 5
# Route to minio user interface
Expand All @@ -57,7 +57,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -66,7 +66,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down
3 changes: 1 addition & 2 deletions openc3-traefik/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG OPENC3_DEPENDENCY_REGISTRY=docker.io
ARG TRAEFIK_CONFIG=traefik.yaml
# NOTE: 2.11.2 is the last valid 2.11 version on IronBank
FROM ${OPENC3_DEPENDENCY_REGISTRY}/traefik:v2.11.2
FROM ${OPENC3_DEPENDENCY_REGISTRY}/traefik:v3.2.0

# An ARG declared before a FROM is outside of a build stage, so it can’t be
# used in any instruction after a FROM. So we need to re-ARG.
Expand Down
10 changes: 5 additions & 5 deletions openc3-traefik/traefik-allow-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 6
# Route to other tool plugins hosted statically in Minio
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -66,7 +66,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -84,7 +84,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -93,7 +93,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down
8 changes: 4 additions & 4 deletions openc3-traefik/traefik-dev-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 4
# Route to other tool plugins hosted statically in Minio
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -64,7 +64,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -73,7 +73,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
service: service-web
priority: 1
services:
Expand Down
10 changes: 5 additions & 5 deletions openc3-traefik/traefik-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 6
# Route to other tool plugins hosted statically in Minio
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -66,7 +66,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -84,7 +84,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -93,7 +93,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down
10 changes: 5 additions & 5 deletions openc3-traefik/traefik-letsencrypt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 6
tls:
Expand All @@ -85,7 +85,7 @@ http:
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -99,7 +99,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -125,7 +125,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -138,7 +138,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down
10 changes: 5 additions & 5 deletions openc3-traefik/traefik-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 6
tls: {}
# Route to other tool plugins hosted statically in Minio
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -87,7 +87,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -107,7 +107,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -117,7 +117,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down
10 changes: 5 additions & 5 deletions openc3-traefik/traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
tools-router:
rule: Path(`/tools/{id:.*/.*[.].*}`)
rule: PathRegexp(`/tools/.*/.*[.].*`)
service: service-minio
priority: 6
# Route to other tool plugins hosted statically in Minio
# Where we need to add index.html to the path
# Matches any tool name that starts with static and ends with slash
statictools-index-router:
rule: Path(`/tools/static{rest:.*}/`)
rule: PathRegexp(`/tools/static.*/`)
middlewares:
# add index.html to the end
- "addIndexHtml"
Expand All @@ -66,7 +66,7 @@ http:
# Where we need to add .html to the path
# Matches any tool name that starts with static
statictools-dothtml-router:
rule: Path(`/tools/static{rest:.*}`)
rule: PathRegexp(`/tools/static.*`)
middlewares:
# add .html to the end
- "addDotHtml"
Expand All @@ -84,7 +84,7 @@ http:
# Matches any path with a file extension which is assumed to be
# a static file
base-router:
rule: Path(`/{id:.*[.].*}`)
rule: PathRegexp(`/.*[.].*`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand All @@ -93,7 +93,7 @@ http:
# This is the default route for everything that doesn't match a more specific route
# It gets us to the base openc3 application
web-router:
rule: HostRegexp(`{name:.*}`)
rule: HostRegexp(`.*`)
middlewares:
# Serve /tools/base/index.html from minio
- "gotoToolsBaseIndex"
Expand Down

0 comments on commit d727a03

Please sign in to comment.