docs: update Kubernetes deployment example
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Goma Gateway - simple Lightweight High-Performance API Gateway Management.
|
# Goma Gateway - simple Lightweight High-Performance Declarative API Gateway Management.
|
||||||
|
|
||||||
```
|
```
|
||||||
_____
|
_____
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
\_____|\___/|_| |_| |_|\__,_|
|
\_____|\___/|_| |_| |_|\__,_|
|
||||||
|
|
||||||
```
|
```
|
||||||
Goma Gateway is a lightweight High-Performance API Gateway Management.
|
Goma Gateway is a lightweight High-Performance Declarative API Gateway Management.
|
||||||
|
|
||||||
[](https://github.com/jkaninda/goma-gateway/actions/workflows/test.yml)
|
[](https://github.com/jkaninda/goma-gateway/actions/workflows/test.yml)
|
||||||
[](https://github.com/jkaninda/goma-gateway/releases)
|
[](https://github.com/jkaninda/goma-gateway/releases)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ nav_order: 1
|
|||||||
|
|
||||||
# Goma Gateway
|
# Goma Gateway
|
||||||
{:.no_toc}
|
{:.no_toc}
|
||||||
Goma Gateway is a lightweight API Gateway Management.
|
Goma Gateway is a lightweight High-Performance Declarative API Gateway Management.
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/jkaninda/goma-gateway/main/logo.png" width="150" alt="Goma logo">
|
<img src="https://raw.githubusercontent.com/jkaninda/goma-gateway/main/logo.png" width="150" alt="Goma logo">
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
# The version of Goma Gateway
|
# The version of Goma Gateway
|
||||||
# See: https://github.com/jkaninda/goma-gateway/releases
|
# See: https://github.com/jkaninda/goma-gateway/releases
|
||||||
gatewayVersion: latest # 0.2.2
|
gatewayVersion: latest
|
||||||
## Server config
|
## Server config
|
||||||
server:
|
server:
|
||||||
# Kubernetes tls secret name
|
# Kubernetes tls secret name
|
||||||
|
|||||||
@@ -27,3 +27,10 @@ With Goma, you can create custom middleware tailored to your needs and apply the
|
|||||||
- Validates user permissions or access rights for specific route paths.
|
- Validates user permissions or access rights for specific route paths.
|
||||||
|
|
||||||
Middleware provides a flexible and powerful way to enhance the functionality, security, and performance of your API.
|
Middleware provides a flexible and powerful way to enhance the functionality, security, and performance of your API.
|
||||||
|
|
||||||
|
## Configuration Options
|
||||||
|
|
||||||
|
- **`name`** (`string`): Name of the middleware without white space.
|
||||||
|
- **`type`** (`string`): Type of the middleware.
|
||||||
|
- **`paths`** (`array of string`): Paths to prevent or protect.
|
||||||
|
- **`rule`** (`dictionary`): Middleware rule, changes depending on their type.
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ These settings enable precise control over traffic flow and routing within your
|
|||||||
|
|
||||||
## Configuration Options
|
## Configuration Options
|
||||||
|
|
||||||
- **`sslCertFile`** (`string`): Path to the SSL certificate file.
|
- **`tlsCertFile`** (`string`): Path to the TLS certificate file.
|
||||||
- **`sslKeyFile`** (`string`): Path to the SSL certificate private key file.
|
- **`tlsKeyFile`** (`string`): Path to the TLS certificate private key file.
|
||||||
- **`redis`**: Redis configuration settings.
|
- **`redis`**: Redis configuration settings.
|
||||||
- **`writeTimeout`** (`integer`): Timeout for writing responses (in seconds).
|
- **`writeTimeout`** (`integer`): Timeout for writing responses (in seconds).
|
||||||
- **`readTimeout`** (`integer`): Timeout for reading requests (in seconds).
|
- **`readTimeout`** (`integer`): Timeout for reading requests (in seconds).
|
||||||
@@ -103,7 +103,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
# The version of Goma Gateway
|
# The version of Goma Gateway
|
||||||
# See: https://github.com/jkaninda/goma-gateway/releases
|
# See: https://github.com/jkaninda/goma-gateway/releases
|
||||||
gatewayVersion: latest # 0.2.2
|
gatewayVersion: latest
|
||||||
server:
|
server:
|
||||||
# Kubernetes tls secret name
|
# Kubernetes tls secret name
|
||||||
tlsSecretName: '' #Optional, tls-secret
|
tlsSecretName: '' #Optional, tls-secret
|
||||||
|
|||||||
95
examples/kubernetes-advanced.yaml
Normal file
95
examples/kubernetes-advanced.yaml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
## Example of advanced Kubernetes deployment
|
||||||
|
## Requirements:
|
||||||
|
# - CRDs and the Goma Gateway Operator
|
||||||
|
# Kubernetes Operator: https://github.com/jkaninda/goma-operator
|
||||||
|
### Middleware
|
||||||
|
apiVersion: gomaproj.github.io/v1beta1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: basic-middleware-sample
|
||||||
|
spec:
|
||||||
|
type: basic
|
||||||
|
paths:
|
||||||
|
- /admin/*
|
||||||
|
rule:
|
||||||
|
username: admin
|
||||||
|
password: admin
|
||||||
|
---
|
||||||
|
## Gateway
|
||||||
|
apiVersion: gomaproj.github.io/v1beta1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
labels: {}
|
||||||
|
name: gateway-sample
|
||||||
|
spec:
|
||||||
|
# The version of Goma Gateway
|
||||||
|
# See: https://github.com/jkaninda/goma-gateway/releases
|
||||||
|
gatewayVersion: latest #
|
||||||
|
## Server config
|
||||||
|
server:
|
||||||
|
# Kubernetes tls secret name
|
||||||
|
tlsSecretName: '' #Optional, tls-secret
|
||||||
|
#Redis configs for distributed rate limiting across multiple instances
|
||||||
|
redis:
|
||||||
|
addr: '' #Optional, redis:6379
|
||||||
|
password: '' #Optional, password
|
||||||
|
writeTimeout: 10
|
||||||
|
readTimeout: 15
|
||||||
|
idleTimeout: 30
|
||||||
|
logLevel: info
|
||||||
|
disableHealthCheckStatus: false
|
||||||
|
disableKeepAlive: false
|
||||||
|
enableMetrics: true
|
||||||
|
replicaCount: 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
# Enable auto scaling
|
||||||
|
autoScaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
|
maxReplicas: 5
|
||||||
|
targetCPUUtilizationPercentage: 80
|
||||||
|
targetMemoryUtilizationPercentage: 80
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
---
|
||||||
|
## Route
|
||||||
|
apiVersion: gomaproj.github.io/v1beta1
|
||||||
|
kind: Route
|
||||||
|
metadata:
|
||||||
|
labels: {}
|
||||||
|
name: route-sample
|
||||||
|
spec:
|
||||||
|
gateway: gateway-sample
|
||||||
|
path: /
|
||||||
|
hosts: []
|
||||||
|
rewrite: /
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
destination: https://example.com
|
||||||
|
backends: []
|
||||||
|
insecureSkipVerify: false
|
||||||
|
healthCheck:
|
||||||
|
path: /
|
||||||
|
interval: 10s
|
||||||
|
timeout: 10s
|
||||||
|
healthyStatuses:
|
||||||
|
- 200
|
||||||
|
- 404
|
||||||
|
cors:
|
||||||
|
origins: []
|
||||||
|
headers: {}
|
||||||
|
rateLimit: 15
|
||||||
|
disableHostFording: true
|
||||||
|
interceptErrors: []
|
||||||
|
blockCommonExploits: false
|
||||||
|
## Middleware names
|
||||||
|
middlewares:
|
||||||
|
- basic-middleware-sample
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
## Example of a simple deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
Reference in New Issue
Block a user