-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David BRAQUART <[email protected]>
- Loading branch information
Showing
11 changed files
with
86 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
12 changes: 6 additions & 6 deletions
12
...al/spreadsheet-config-server-ingress.yaml → ...ve/local/study-config-server-ingress.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: spreadsheet-config-server-ingress | ||
name: study-config-server-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/configuration-snippet: | | ||
# our containers host at '/' so can't possibly make a difference between | ||
# '/XXX/' and '/XXX' (trailing slash) (which would respectively become | ||
# '/' and '' inside the container but an empty path doesn't exist in http) | ||
# so always redirect '/XXX' to '/XXX/' in the client outside the container | ||
rewrite ^/spreadsheet-config-server$ /spreadsheet-config-server/ permanent; | ||
rewrite ^/study-config-server$ /study-config-server/ permanent; | ||
# springfox swagger-ui uses X-Forwarded-Prefix to find the | ||
# base url when behind a reverse proxy. | ||
# nginx-ingress-controller has an annotation to do the same thing | ||
# (nginx.ingress.kubernetes.io/x-forwarded-prefix) | ||
# but it only works when using rewrite-target, which we can't use because | ||
# we have properly encoded slashs in urls | ||
proxy_set_header X-Forwarded-Prefix /spreadsheet-config-server/; | ||
proxy_set_header X-Forwarded-Prefix /study-config-server/; | ||
# using this instead of standard rewrite as a workaround to avoid decoding slashes in urls | ||
# we sometimes have ids in the urls that contain properly encoded slashes | ||
if ($request_uri ~ "^/spreadsheet-config-server(/.*)") { | ||
if ($request_uri ~ "^/study-config-server(/.*)") { | ||
proxy_pass http://upstream_balancer$1; | ||
break; | ||
} | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /spreadsheet-config-server(/|$) | ||
- path: /study-config-server(/|$) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: spreadsheet-config-server | ||
name: study-config-server | ||
port: | ||
number: 80 |
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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