Skip to content

Commit

Permalink
Merge pull request #17 from openearthplatforminitiative/traefik-ingress
Browse files Browse the repository at this point in the history
Changed to traefik ingress
  • Loading branch information
kstigen authored Jan 31, 2024
2 parents 578cc55 + 647a54b commit 3e9b2d2
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions deployment/kubernetes/deforestation-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,30 @@ spec:
selector:
app: deforestation-api
---
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: stripprefix-deforestation
spec:
stripPrefix:
prefixes:
- /deforestation
forceSlash: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: deforestation-api
spec:
http:
- name: deforestation-api
match:
paths:
- /deforestation/*
backends:
- serviceName: deforestation-api
servicePort: 80
plugins:
- name: proxy-rewrite
enable: true
config:
regex_uri:
- "^/deforestation/(.*)"
- "/$1"
entryPoints:
- web
routes:
- kind: Rule
match: PathPrefix(`/deforestation`)
services:
- kind: Service
name: deforestation-api
port: 80
middlewares:
- name: stripprefix-deforestation

0 comments on commit 3e9b2d2

Please sign in to comment.