Skip to content

Commit

Permalink
test: add rewrite target again
Browse files Browse the repository at this point in the history
  • Loading branch information
amber committed Oct 27, 2024
1 parent c286038 commit 5386e19
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 15 deletions.
36 changes: 21 additions & 15 deletions helm/nshm/templates/nshm-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,60 @@ kind: Ingress
metadata:
name: nshm-ingress
namespace: nshm
#annotations:
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/rewrite-target: /$2
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: www.nshm.store
http:
paths:
- path: /api/(.*)
pathType: Prefix
- path: /api/accounts(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: account
port:
number: 8081
- path: /api/items
pathType: Prefix

- path: /api/items(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: item
port:
number: 8082
- path: /api/wishlists
pathType: Prefix

- path: /api/wishlists(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: wishlist
port:
number: 8083
- path: /api/notification
pathType: Prefix

- path: /api/notification(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: notification
port:
number: 8085
- path: /rabbitmq
pathType: Prefix

- path: /rabbitmq(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: rabbitmq
port:
number: 15672
- path: /
pathType: Prefix

- path: /(.*)
pathType: ImplementationSpecific
backend:
service:
name: web
port:
number: 3000

56 changes: 56 additions & 0 deletions helm/nshm/templates/nshm-ingress.yaml.ori
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nshm-ingress
namespace: nshm
#annotations:
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: www.nshm.store
http:
paths:
- path: /api/(.*)
pathType: Prefix
backend:
service:
name: account
port:
number: 8081
- path: /api/items
pathType: Prefix
backend:
service:
name: item
port:
number: 8082
- path: /api/wishlists
pathType: Prefix
backend:
service:
name: wishlist
port:
number: 8083
- path: /api/notification
pathType: Prefix
backend:
service:
name: notification
port:
number: 8085
- path: /rabbitmq
pathType: Prefix
backend:
service:
name: rabbitmq
port:
number: 15672
- path: /
pathType: Prefix
backend:
service:
name: web
port:
number: 3000

0 comments on commit 5386e19

Please sign in to comment.