Merge pull request #143 from jkaninda/docs
docs: update Kubernetes deployment
This commit is contained in:
@@ -99,7 +99,7 @@ It's designed to be straightforward and efficient, offering a rich set of featur
|
|||||||
- **HTTP Method Restrictions**
|
- **HTTP Method Restrictions**
|
||||||
Limit HTTP methods for specific routes to enhance control.
|
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.
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ It's designed to be straightforward and efficient, offering a rich set of featur
|
|||||||
- **HTTP Method Restrictions**
|
- **HTTP Method Restrictions**
|
||||||
Limit HTTP methods for specific routes to enhance control.
|
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:
|
Architecture:
|
||||||
|
|||||||
@@ -92,4 +92,34 @@ Create a file in `/etc/goma/extra` using `yaml` or `.yaml` extension.
|
|||||||
middlewares:
|
middlewares:
|
||||||
- auth-middleware
|
- 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/*
|
||||||
```
|
```
|
||||||
@@ -13,15 +13,13 @@ data:
|
|||||||
readTimeout: 15
|
readTimeout: 15
|
||||||
# Proxy idle timeout
|
# Proxy idle timeout
|
||||||
idleTimeout: 30
|
idleTimeout: 30
|
||||||
## SSL Certificate file
|
## TLS Certificate file
|
||||||
sslCertFile: '' #cert.pem
|
tlsCertFile: '' #cert.pem
|
||||||
## SSL Private Key file
|
## TLS Private Key file
|
||||||
sslKeyFile: ''#key.pem
|
tlsKeyFile: ''#key.pem
|
||||||
# Proxy rate limit, it's In-Memory IP based
|
# Proxy rate limit, it's In-Memory IP based
|
||||||
rateLimit: 0
|
rateLimit: 0
|
||||||
logLevel: info # debug, trace, off
|
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 connexion for distributed rate limiting, when using multiple instances | It's optional
|
||||||
#redis:
|
#redis:
|
||||||
#addr: redis:6379
|
#addr: redis:6379
|
||||||
|
|||||||
51
examples/extra-configs.yaml
Normal file
51
examples/extra-configs.yaml
Normal 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
|
||||||
@@ -32,8 +32,8 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: /readyz
|
path: /readyz
|
||||||
port: 8080
|
port: 8080
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 15
|
||||||
periodSeconds: 10
|
periodSeconds: 15
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /etc/goma/
|
mountPath: /etc/goma/
|
||||||
|
|||||||
Reference in New Issue
Block a user