-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
87 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,72 @@ | ||
## OpenAPI 3.0.X Kuadrant Extensions | ||
|
||
TODO | ||
### Info level kuadrant extension | ||
|
||
Kuadrant extension that can be added at the info level of the OpenAPI spec. | ||
|
||
```yaml | ||
info: | ||
x-kuadrant: | ||
route: ## HTTPRoute metadata | ||
name: "petstore" | ||
namespace: "petstore" | ||
hostnames: ## []gateway.networking.k8s.io/v1beta1.Hostname | ||
- example.com | ||
parentRefs: ## []gateway.networking.k8s.io/v1beta1.ParentReference | ||
- name: apiGateway | ||
namespace: gateways | ||
``` | ||
### Path level kuadrant extension | ||
Kuadrant extension that can be added at the path level of the OpenAPI spec. | ||
This configuration at the path level | ||
is the default when there is no operation level configuration. | ||
```yaml | ||
paths: | ||
/cat: | ||
x-kuadrant: ## Path level Kuadrant Extension | ||
enable: true ## Add to the HTTPRoute. Optional. Default: false | ||
backendRefs: ## Backend references to be included in the HTTPRoute. []gateway.networking.k8s.io/v1beta1.HTTPBackendRef. Optional. | ||
- name: petstore | ||
namespace: petstore | ||
rate_limit: ## Rate limit config. Optional. | ||
rates: ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.Rate | ||
- limit: 1 | ||
duration: 10 | ||
unit: second | ||
counters: ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.CountextSelector | ||
- auth.identity.username | ||
when: ## Kuadrant API []github.com/kuadrant/kuadrant-operator/api/v1beta2.WhenCondition | ||
- selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.identity.userid | ||
operator: eq | ||
value: alice | ||
``` | ||
### Operation level kuadrant extension | ||
Kuadrant extension that can be added at the operation level of the OpenAPI spec. | ||
Same schema as path level kuadrant extension. | ||
```yaml | ||
paths: | ||
/cat: | ||
get: | ||
x-kuadrant: ## Path level Kuadrant Extension | ||
enable: true ## Add to the HTTPRoute. Optional. Default: false | ||
backendRefs: ## Backend references to be included in the HTTPRoute. Optional. | ||
- name: petstore | ||
namespace: petstore | ||
rate_limit: ## Rate limit config. Optional. | ||
rates: ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.Rate | ||
- limit: 1 | ||
duration: 10 | ||
unit: second | ||
counters: ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.CountextSelector | ||
- auth.identity.username | ||
when: ## Kuadrant API github.com/kuadrant/kuadrant-operator/api/v1beta2.WhenCondition | ||
- selector: metadata.filter_metadata.envoy\.filters\.http\.ext_authz.identity.userid | ||
operator: eq | ||
value: alice | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters