docs: update config deployment

This commit is contained in:
Jonas Kaninda
2024-11-12 13:26:14 +01:00
parent 542bd017c3
commit 3c7a55c5e4
7 changed files with 76 additions and 22 deletions

View File

@@ -58,7 +58,6 @@ It's designed to be straightforward and efficient, offering features, like:
- Limit HTTP methods allowed for a particular route.
### Todo:
- [ ] Load Balancing Healthcheck, disable unavailable servers
- [ ] Blocklist IP address middleware
- [ ] Distributed Rate Limiting for In-Memory client IP based across multiple instances using Redis

View File

@@ -32,8 +32,8 @@ metadata:
name: goma-config
data:
goma.yml: |
# Goma Gateway configurations
version: 0.1.7
# Goma Gateway configurations
version: 1.0
gateway:
# Proxy write timeout
writeTimeout: 15
@@ -47,6 +47,7 @@ data:
sslKeyFile: ''#key.pem
# Proxy rate limit, it's In-Memory IP based
rateLimit: 0
logLevel: info # debug, trace, off
accessLog: "/dev/Stdout"
errorLog: "/dev/stderr"
## Enable, disable routes health check
@@ -78,10 +79,10 @@ data:
##### Define routes
routes:
# Example of a route | 1
- name: Public # Name is optional
- path: /
name: Public # Name is optional
# host Domain/host based request routing
host: "" # Host is optional
path: /public
hosts: [] # Hosts are optional
## Rewrite a request path
# e.g rewrite: /store to /
rewrite: /
@@ -92,8 +93,6 @@ data:
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
# It will not match the backend route, by default, it's disabled
disableHeaderXForward: false
# Internal health check
healthCheck: '' #/internal/health/ready
# Route Cors, global cors will be overridden by route
cors:
# Route Origins Cors, route will override global cors origins
@@ -113,17 +112,27 @@ data:
middlewares:
- api-forbidden-paths
# Example of a route | 2
- name: Basic auth
path: /protected
- path: /protected
name: Basic auth
rewrite: /
destination: https://example.com
methods: []
destination: ''
backends:
- https://example.com
- https://example2.com
methods:
- GET
# Route healthcheck
healthCheck:
path: /health/live
interval: 30s
timeout: 10s
healthyStatuses:
- 200
- 404
cors: {}
middlewares:
- api-forbidden-paths
- basic-auth
#Defines proxy middlewares
# middleware name must be unique
middlewares:
@@ -176,6 +185,46 @@ data:
- /api-docs/*
- /internal/*
- /actuator/*
- name: oauth-google
type: oauth
paths:
- /protected
- /example-of-oauth
rule:
clientId: xxx
clientSecret: xxx
provider: google
endpoint:
userInfoUrl: ""
redirectUrl: http://localhost:8080/callback
redirectPath: ""
cookiePath: ""
scopes:
- https://www.googleapis.com/auth/userinfo.email
- https://www.googleapis.com/auth/userinfo.profile
state: randomStateString
jwtSecret: your-strong-jwt-secret | It's optional
- name: oauth-authentik
type: oauth
paths:
- /protected
- /example-of-oauth
rule:
clientId: xxx
clientSecret: xxx
provider: custom
endpoint:
authUrl: https://authentik.example.com/application/o/authorize/
tokenUrl: https://authentik.example.com/application/o/token/
userInfoUrl: https://authentik.example.com/application/o/userinfo/
redirectUrl: http://localhost:8080/callback
redirectPath: ""
cookiePath: ""
scopes:
- email
- openid
state: randomStateString
jwtSecret: your-strong-jwt-secret | It's optional
```
## 3. Create Kubernetes deployment

View File

@@ -20,8 +20,8 @@ gateway:
methods: []
healthCheck:
path: "/health/live"
interval: 30 # in Seconds
timeout: 10 # in Seconds
interval: 30s
timeout: 10s
healthyStatuses: [200,404] # Healthy statuses
```

View File

@@ -8,7 +8,9 @@ nav_order: 4
# Load Balancing
Goma Gateway supports rund robim load blancing
Goma Gateway supports round-robin algorithm load balancing.
It comes with an integrated load balancing backends healthcheck.
```yaml
version: 1.0
@@ -23,8 +25,8 @@ gateway:
methods: []
healthCheck:
path: "/"
interval: 0
timeout: 0
interval: 30s
timeout: 10s
healthyStatuses: [200,404]
## destination: will be override by backends
destination: ""

View File

@@ -28,3 +28,7 @@ GOMA_LOG_LEVEL=trace
### When using a configuration file
Edit the Goma settings and set `logLevel: trace`.
### Disable logging
To disable logs, you need to set `logLevel: off`, it will turn off logs

View File

@@ -4,7 +4,7 @@ metadata:
name: goma-config
data:
goma.yml: |
# Goma Gateway configurations
# Goma Gateway configurations
version: 1.0
gateway:
# Proxy write timeout
@@ -96,8 +96,8 @@ data:
# Route healthcheck
healthCheck:
path: /health/live
interval: 30
timeout: 10
interval: 30s
timeout: 10s
healthyStatuses:
- 200
- 404

View File

@@ -13,7 +13,7 @@ gateway:
sslKeyFile: ''#key.pem
# Proxy rate limit, it's In-Memory IP based
rateLimit: 0
logLevel: info # debug, trace
logLevel: info # debug, trace, off
accessLog: "/dev/Stdout"
errorLog: "/dev/stderr"
## Enable, disable routes health check