Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RLP docs and examples for v1beta2 #233

Merged
merged 9 commits into from
Aug 30, 2023
Merged

Update RLP docs and examples for v1beta2 #233

merged 9 commits into from
Aug 30, 2023

Conversation

guicassolato
Copy link
Contributor

@guicassolato guicassolato commented Aug 22, 2023

  • Main Rate limit docs page located at doc/rate-limiting.md
  • RateLimitPolicy CRD reference doc
  • Basic RLP examples of targeting a HTTPRoute and targeting a Gateway
  • User guides
    • Simple Rate Limiting for Application Developers
    • Authenticated Rate Limiting for Application Developers
    • Rate Limiting for Cluster Operators
    • Authenticated Rate Limiting with JWTs and Kubernetes RBAC

Closes #215

@guicassolato guicassolato self-assigned this Aug 22, 2023
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #233 (7b50255) into main (6f3b3fd) will decrease coverage by 2.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   64.79%   62.59%   -2.21%     
==========================================
  Files          33       33              
  Lines        3224     3224              
==========================================
- Hits         2089     2018      -71     
- Misses        972     1021      +49     
- Partials      163      185      +22     
Flag Coverage Δ
integration 67.18% <ø> (-4.63%) ⬇️
unit 58.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) ∅ <ø> (∅)
pkg/common (u) 76.99% <ø> (ø)
pkg/istio (u) 29.69% <ø> (ø)
pkg/log (u) 31.81% <ø> (ø)
pkg/reconcilers (u) 33.68% <ø> (ø)
pkg/rlptools (u) 57.63% <ø> (ø)
controllers (i) 67.18% <ø> (-4.63%) ⬇️

see 7 files with indirect coverage changes

@guicassolato guicassolato force-pushed the docs/rlp-v2 branch 2 times, most recently from 7e8b911 to a6b9af4 Compare August 25, 2023 13:53
@guicassolato guicassolato marked this pull request as ready for review August 28, 2023 11:26
@guicassolato guicassolato requested a review from a team as a code owner August 28, 2023 11:26
Copy link
Contributor

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work 🎖️

Minor changes requested


## How: Implementation details

### The WASM Filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of pity to lose this piece of information. People will recurrently ask the famous question: "why are you guys using Wasm module instead of Envoy's rate limit filter?" This section captures the rationale behind that decision.

What about moving this part to a separated file called rate-limiting-using-wasm-module.md?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a little while to re-write it, but I've added the section back to the doc.


Create the namesapce:

```sh
kubectl create namespace keycloak
```

Deploy Keycloak:
Deploy Keycloak with a [bootstrap](https://github.com/kuadrant/authorino-examples#keycloak) realm, users, and clients:

```sh
kubectl apply -n keycloak -f https://raw.githubusercontent.com/Kuadrant/authorino-examples/main/keycloak/keycloak-deploy.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe not for this PR, but we may want to bring (a copy of) these resources to this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that having a shared repo that the different components can pull sample apps from may contribute to keeping consistent user guides and user stories across. Maybe we could make https://github.com/Kuadrant/authorino-examples more about Kuadrant as well? I wouldn't mind renaming it to "kuadrant-examples" if we think that would help.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My request was not about ownership. In other words authorino-examples is ok for me. It was about, what if you change those resources to accommodate to new features or spec of Authorino? I fear that it would break the guides in the kuadrant operator. Anyway, raising this for awareness, not for this PR.

@@ -1,41 +1,77 @@
# Rate-limiting and protecting an API with JSON Web Tokens (JWTs) and Kubernetes authnz using Kuadrant
# Authenticated Rate Limiting with JWTs and Kubernetes RBAC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea for the future. It would be very nice to run e2e tests exactly as the user guides define, adding some assertions. Even better would be to run tests reading the markdown files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#39

doc/user-guides/gateway-rl-for-cluster-operators.md Outdated Show resolved Hide resolved
doc/user-guides/gateway-rl-for-cluster-operators.md Outdated Show resolved Hide resolved
doc/user-guides/gateway-rl-for-cluster-operators.md Outdated Show resolved Hide resolved
doc/user-guides/gateway-rl-for-cluster-operators.md Outdated Show resolved Hide resolved

Create a HTTPRoute to route traffic to the service via Istio Ingress Gateway:

![](https://i.imgur.com/rdN8lo3.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be moving to ascii diagrams at some point

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not for this PR, unless you want to

@@ -1,5 +1,4 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find any reference to this file. It must be a leftover from and old user guide. I vote for deleting the files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided offline to keep them for now.

@@ -1,5 +1,4 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find any reference to this file. It must be a leftover from and old user guide. I vote for deleting the files

@guicassolato guicassolato merged commit aa05f01 into main Aug 30, 2023
16 of 17 checks passed
@guicassolato guicassolato deleted the docs/rlp-v2 branch August 30, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rlp-v2] Updates to How to guides and examples.
2 participants