From 5837e3a3ed8482ddeec343a7c7073cf23dbd6078 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Mon, 2 Dec 2024 08:01:18 +0100 Subject: [PATCH 1/2] docs: update operator deployment --- docs/install/kubernetes.md | 2 +- docs/middleware/oauth.md | 33 ---------------------- docs/operator-manual/gateway.md | 9 ------ docs/operator-manual/middlware.md | 47 +++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 43 deletions(-) diff --git a/docs/install/kubernetes.md b/docs/install/kubernetes.md index 8459564..0931474 100644 --- a/docs/install/kubernetes.md +++ b/docs/install/kubernetes.md @@ -93,4 +93,4 @@ spec: Advanced deployment is to deploy Goma Gateway using its Kubernetes Operator. -See Operator Manuel +See Operator Manual diff --git a/docs/middleware/oauth.md b/docs/middleware/oauth.md index 6208c16..13e4068 100644 --- a/docs/middleware/oauth.md +++ b/docs/middleware/oauth.md @@ -74,36 +74,3 @@ nav_order: 5 middlewares: - 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 -``` \ No newline at end of file diff --git a/docs/operator-manual/gateway.md b/docs/operator-manual/gateway.md index a0f3978..118fd40 100644 --- a/docs/operator-manual/gateway.md +++ b/docs/operator-manual/gateway.md @@ -77,12 +77,3 @@ spec: targetMemoryUtilizationPercentage: 80 affinity: {} ``` -### Delete gateway -```shell -kubectl delete gateway (gatewayName) -``` -Or - -```shell -kubectl delete gateways.gomaproj.github.io (gatewayName) -``` \ No newline at end of file diff --git a/docs/operator-manual/middlware.md b/docs/operator-manual/middlware.md index a9e8a51..134b4fd 100644 --- a/docs/operator-manual/middlware.md +++ b/docs/operator-manual/middlware.md @@ -47,3 +47,50 @@ spec: - /internal/* - /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 +``` \ No newline at end of file From 69895ea413e5eaabb8be1fb2e22532872f5b72ff Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Mon, 2 Dec 2024 08:03:48 +0100 Subject: [PATCH 2/2] docs: update operator deployment --- docs/_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_config.yml b/docs/_config.yml index 6cbfab5..7356d67 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -52,6 +52,8 @@ nav_external_links: - title: GitHub Repository url: https://github.com/jkaninda/goma-gateway + - title: GitHub Kubernetes Operator + url: https://github.com/jkaninda/goma-operator footer_content: >- Copyright © 2024 Jonas Kaninda. Distributed under the Apache-2.0 License.