@@ -52,6 +52,8 @@ nav_external_links:
|
|||||||
- title: GitHub Repository
|
- title: GitHub Repository
|
||||||
url: https://github.com/jkaninda/goma-gateway
|
url: https://github.com/jkaninda/goma-gateway
|
||||||
|
|
||||||
|
- title: GitHub Kubernetes Operator
|
||||||
|
url: https://github.com/jkaninda/goma-operator
|
||||||
footer_content: >-
|
footer_content: >-
|
||||||
Copyright © 2024 <a target="_blank" href="https://www.jonaskaninda.com">Jonas Kaninda</a>.
|
Copyright © 2024 <a target="_blank" href="https://www.jonaskaninda.com">Jonas Kaninda</a>.
|
||||||
Distributed under the <a href="https://github.com/jkaninda/goma-gateway/tree/main/LICENSE">Apache-2.0 License.</a><br>
|
Distributed under the <a href="https://github.com/jkaninda/goma-gateway/tree/main/LICENSE">Apache-2.0 License.</a><br>
|
||||||
|
|||||||
@@ -93,4 +93,4 @@ spec:
|
|||||||
|
|
||||||
Advanced deployment is to deploy Goma Gateway using its Kubernetes Operator.
|
Advanced deployment is to deploy Goma Gateway using its Kubernetes Operator.
|
||||||
|
|
||||||
See Operator Manuel
|
See Operator Manual
|
||||||
|
|||||||
@@ -74,36 +74,3 @@ nav_order: 5
|
|||||||
middlewares:
|
middlewares:
|
||||||
- oauth-authentik
|
- oauth-authentik
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced Kubernetes deployment
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: gomaproj.github.io/v1beta1
|
|
||||||
kind: Middleware
|
|
||||||
metadata:
|
|
||||||
name: oauth-middleware-sample
|
|
||||||
spec:
|
|
||||||
type: oauth
|
|
||||||
paths:
|
|
||||||
- /protected
|
|
||||||
- /example-of-oauth
|
|
||||||
rule:
|
|
||||||
clientId: xxx
|
|
||||||
clientSecret: xxx
|
|
||||||
# oauth provider google, gitlab, github, amazon, facebook, custom
|
|
||||||
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: https://example.com/callback
|
|
||||||
#RedirectPath is the PATH to redirect users after authentication, e.g: /my-protected-path/dashboard
|
|
||||||
redirectPath: ''
|
|
||||||
#CookiePath e.g.: /my-protected-path or / || by default is applied on a route path
|
|
||||||
cookiePath: "/"
|
|
||||||
scopes:
|
|
||||||
- email
|
|
||||||
- openid
|
|
||||||
state: randomStateString
|
|
||||||
jwtSecret: your-strong-jwt-secret | It's optional
|
|
||||||
```
|
|
||||||
@@ -77,12 +77,3 @@ spec:
|
|||||||
targetMemoryUtilizationPercentage: 80
|
targetMemoryUtilizationPercentage: 80
|
||||||
affinity: {}
|
affinity: {}
|
||||||
```
|
```
|
||||||
### Delete gateway
|
|
||||||
```shell
|
|
||||||
kubectl delete gateway (gatewayName)
|
|
||||||
```
|
|
||||||
Or
|
|
||||||
|
|
||||||
```shell
|
|
||||||
kubectl delete gateways.gomaproj.github.io (gatewayName)
|
|
||||||
```
|
|
||||||
@@ -47,3 +47,50 @@ spec:
|
|||||||
- /internal/*
|
- /internal/*
|
||||||
- /actuator/*
|
- /actuator/*
|
||||||
```
|
```
|
||||||
|
## OAuth2
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: gomaproj.github.io/v1beta1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: oauth-middleware-sample
|
||||||
|
spec:
|
||||||
|
type: oauth
|
||||||
|
paths:
|
||||||
|
- /protected
|
||||||
|
- /example-of-oauth
|
||||||
|
rule:
|
||||||
|
clientId: xxx
|
||||||
|
clientSecret: xxx
|
||||||
|
# oauth provider google, gitlab, github, amazon, facebook, custom
|
||||||
|
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: https://example.com/callback
|
||||||
|
#RedirectPath is the PATH to redirect users after authentication, e.g: /my-protected-path/dashboard
|
||||||
|
redirectPath: ''
|
||||||
|
#CookiePath e.g.: /my-protected-path or / || by default is applied on a route path
|
||||||
|
cookiePath: "/"
|
||||||
|
scopes:
|
||||||
|
- email
|
||||||
|
- openid
|
||||||
|
state: randomStateString
|
||||||
|
jwtSecret: your-strong-jwt-secret | It's optional
|
||||||
|
```
|
||||||
|
## Rate Limiting
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: gomaproj.github.io/v1beta1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: ratelimit-middleware-sample
|
||||||
|
spec:
|
||||||
|
type: ratelimit
|
||||||
|
paths:
|
||||||
|
- /*
|
||||||
|
rule:
|
||||||
|
unit: minute # or hour
|
||||||
|
requestsPerUnit: 60
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user