Merge pull request #143 from jkaninda/docs

docs: update Kubernetes deployment
This commit is contained in:
2024-12-01 19:32:20 +01:00
committed by GitHub
6 changed files with 89 additions and 10 deletions

View File

@@ -99,7 +99,7 @@ It's designed to be straightforward and efficient, offering a rich set of featur
- **HTTP Method Restrictions**
Limit HTTP methods for specific routes to enhance control.
Define your routes and middleware directly in code for seamless configuration.
Declarative API Gateway Management, define your routes and middleware directly in code for seamless configuration.
----

View File

@@ -73,7 +73,7 @@ It's designed to be straightforward and efficient, offering a rich set of featur
- **HTTP Method Restrictions**
Limit HTTP methods for specific routes to enhance control.
Define your routes and middleware directly in code for seamless configuration.
Declarative API Gateway Management, define your routes and middleware directly in code for seamless configuration.
----
Architecture:

View File

@@ -93,3 +93,33 @@ Create a file in `/etc/goma/extra` using `yaml` or `.yaml` extension.
- auth-middleware
```
## Extra Middlewares
Create a file in `/etc/goma/extra` using `yaml` or `.yaml` extension.
```yaml
##### Extra Middlewares
middlewares:
# Enable Basic auth authorization based
- name: extra-basic-auth
# Authentication types | jwt, basic, OAuth
type: basic
paths:
- /user
- /admin
- /account
rule:
username: admin
password: admin
# The server will return 403
- name: extra-api-forbidden-paths
type: access
## prevents access paths
paths:
- /swagger-ui/*
- /v2/swagger-ui/*
- /api-docs/*
- /internal/*
- /actuator/*
```

View File

@@ -13,15 +13,13 @@ data:
readTimeout: 15
# Proxy idle timeout
idleTimeout: 30
## SSL Certificate file
sslCertFile: '' #cert.pem
## SSL Private Key file
sslKeyFile: ''#key.pem
## TLS Certificate file
tlsCertFile: '' #cert.pem
## TLS Private Key file
tlsKeyFile: ''#key.pem
# Proxy rate limit, it's In-Memory IP based
rateLimit: 0
logLevel: info # debug, trace, off
accessLog: "/dev/Stdout"
errorLog: "/dev/stderr"
## Redis connexion for distributed rate limiting, when using multiple instances | It's optional
#redis:
#addr: redis:6379

View File

@@ -0,0 +1,51 @@
##### Extra Middlewares
middlewares:
# Enable Basic auth authorization based
- name: extra-basic-auth
# Authentication types | jwt, basic, OAuth
type: basic
paths:
- /user
- /admin
- /account
rule:
username: admin
password: admin
# The server will return 403
- name: extra-api-forbidden-paths
type: access
## prevents access paths
paths:
- /swagger-ui/*
- /v2/swagger-ui/*
- /api-docs/*
- /internal/*
- /actuator/*
##### Extra routes
routes:
# Example of a route | 1
- path: /extra
name: Extra # Name is optional
# host Domain/host based request routing
hosts: [] # Hosts are optional
## Rewrite a request path
# e.g rewrite: /store to /
rewrite: /
destination: https://example.com
# Limit HTTP methods allowed for this route
methods: [POST, PUT, GET]
#disableHostFording proxy host forwarding
disableHostFording: false
# Route Cors, global cors will be overridden by route
cors:
# Route Origins Cors, route will override global cors origins
origins:
- https://dev.example.com
- http://localhost:3000
- https://example.com
# Route Cors headers, route will override global cors headers
headers:
Access-Control-Allow-Methods: 'GET'
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
Access-Control-Allow-Credentials: 'true'
Access-Control-Max-Age: 1728000

View File

@@ -32,8 +32,8 @@ spec:
httpGet:
path: /readyz
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
initialDelaySeconds: 15
periodSeconds: 15
volumeMounts:
- name: config
mountPath: /etc/goma/