14
compose.yaml
14
compose.yaml
@@ -1,14 +0,0 @@
|
||||
services:
|
||||
goma-gateway:
|
||||
image: jkaninda/goma-gateway
|
||||
command: server
|
||||
healthcheck:
|
||||
test: curl -f http://localhost/healthz || exit 1
|
||||
interval: 30s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./config:/config/
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
image: jkaninda/goma-gateway
|
||||
command: server
|
||||
healthcheck:
|
||||
test: curl -f http://localhost/healthz || exit 1
|
||||
test: curl -f http://localhost/readyz || exit 1
|
||||
interval: 30s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
@@ -49,7 +49,7 @@ data:
|
||||
path: /public
|
||||
## Rewrite a request path
|
||||
# e.g rewrite: /store to /
|
||||
rewrite: /healthz
|
||||
rewrite: /
|
||||
destination: https://example.com
|
||||
#DisableHeaderXForward Disable X-forwarded header.
|
||||
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
||||
@@ -73,26 +73,18 @@ data:
|
||||
##### Define route middlewares from middlewares names
|
||||
## The name must be unique
|
||||
## List of middleware name
|
||||
middlewares:
|
||||
- api-forbidden-paths
|
||||
- basic-auth
|
||||
# Example of a route | 2
|
||||
- name: Authentication service
|
||||
path: /auth
|
||||
rewrite: /
|
||||
destination: 'http://security-service:8080'
|
||||
healthCheck: /internal/health/ready
|
||||
cors: {}
|
||||
middlewares:
|
||||
- api-forbidden-paths
|
||||
# Example of a route | 3
|
||||
- name: Basic auth
|
||||
path: /protected
|
||||
rewrite: /
|
||||
destination: 'http://notification-service:8080'
|
||||
destination: https://example.com
|
||||
healthCheck:
|
||||
cors: {}
|
||||
middlewares: []
|
||||
middlewares:
|
||||
- api-forbidden-paths
|
||||
- basic-auth
|
||||
|
||||
#Defines proxy middlewares
|
||||
# middleware name must be unique
|
||||
@@ -133,17 +125,17 @@ data:
|
||||
#
|
||||
# Add header to the next request from AuthRequest header, depending on your requirements
|
||||
# Key is AuthRequest's response header Key, and value is Request's header Key
|
||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
||||
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||
headers:
|
||||
userId: X-Auth-UserId
|
||||
userCountryId: X-Auth-UserCountryId
|
||||
# In case you want to get headers from the Authentication service and inject them to the next request's params
|
||||
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||
params:
|
||||
userCountryId: countryId
|
||||
# The server will return 404
|
||||
# The server will return 403
|
||||
- name: api-forbidden-paths
|
||||
type: access
|
||||
## Forbidden paths
|
||||
## prevents access paths
|
||||
paths:
|
||||
- /swagger-ui/*
|
||||
- /v2/swagger-ui/*
|
||||
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
timeoutSeconds: 10
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config2/
|
||||
mountPath: /config/
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
|
||||
Reference in New Issue
Block a user