update K8s deployment example

This commit is contained in:
2024-11-02 21:39:05 +01:00
parent e803bebf08
commit 1620c4b951
2 changed files with 10 additions and 18 deletions

View File

@@ -49,7 +49,7 @@ data:
path: /public path: /public
## Rewrite a request path ## Rewrite a request path
# e.g rewrite: /store to / # e.g rewrite: /store to /
rewrite: /healthz rewrite: /
destination: https://example.com destination: https://example.com
#DisableHeaderXForward Disable X-forwarded header. #DisableHeaderXForward Disable X-forwarded header.
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ] # [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
@@ -73,26 +73,18 @@ data:
##### Define route middlewares from middlewares names ##### Define route middlewares from middlewares names
## The name must be unique ## The name must be unique
## List of middleware name ## 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: middlewares:
- api-forbidden-paths - api-forbidden-paths
# Example of a route | 3 # Example of a route | 3
- name: Basic auth - name: Basic auth
path: /protected path: /protected
rewrite: / rewrite: /
destination: 'http://notification-service:8080' destination: https://example.com
healthCheck: healthCheck:
cors: {} cors: {}
middlewares: [] middlewares:
- api-forbidden-paths
- basic-auth
#Defines proxy middlewares #Defines proxy middlewares
# middleware name must be unique # middleware name must be unique
@@ -133,17 +125,17 @@ data:
# #
# Add header to the next request from AuthRequest header, depending on your requirements # 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 # 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: headers:
userId: X-Auth-UserId userId: X-Auth-UserId
userCountryId: X-Auth-UserCountryId 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: params:
userCountryId: countryId userCountryId: countryId
# The server will return 404 # The server will return 403
- name: api-forbidden-paths - name: api-forbidden-paths
type: access type: access
## Forbidden paths ## prevents access paths
paths: paths:
- /swagger-ui/* - /swagger-ui/*
- /v2/swagger-ui/* - /v2/swagger-ui/*

View File

@@ -37,7 +37,7 @@ spec:
timeoutSeconds: 10 timeoutSeconds: 10
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /config2/ mountPath: /config/
volumes: volumes:
- name: config - name: config
configMap: configMap: