mirror of https://github.com/istio/istio.io.git
Fix a few formatting problems with the rate limiting doc.
This commit is contained in:
parent
dcf7362976
commit
f66eddc31b
|
@ -283,19 +283,16 @@ You can pull in an external file and display its content as a preformatted block
|
||||||
config file or a test file. To do so, you use a statement such as:
|
config file or a test file. To do so, you use a statement such as:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* file_content url="https://raw.githubusercontent.com/istio/istio/master/Makefile" */>}}
|
{{</* file_content url="https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/kube/mixer-rule-ratings-ratelimit.yaml" lang="yaml" */>}}
|
||||||
```
|
```
|
||||||
which produces the following result:
|
which produces the following result:
|
||||||
|
|
||||||
{{< file_content url="https://raw.githubusercontent.com/istio/istio/master/Makefile" >}}
|
{{< file_content url="https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/kube/mixer-rule-ratings-ratelimit.yaml" lang="yaml" >}}
|
||||||
|
|
||||||
If the file is from a different origin site, CORS should be enabled on that site. Note that the
|
If the file is from a different origin site, CORS should be enabled on that site. Note that the
|
||||||
GitHub raw content site (raw.githubusercontent.com) is CORS
|
GitHub raw content site (raw.githubusercontent.com) is CORS
|
||||||
enabled so it may be used here.
|
enabled so it may be used here.
|
||||||
|
|
||||||
Note that unlike normal preformatted blocks, dynamically loaded preformatted blocks unfortunately
|
|
||||||
do not get syntax colored.
|
|
||||||
|
|
||||||
## Renaming or moving pages
|
## Renaming or moving pages
|
||||||
|
|
||||||
If you move pages around and would like to ensure existing links continue to work, you can add
|
If you move pages around and would like to ensure existing links continue to work, you can add
|
||||||
|
|
|
@ -17,7 +17,7 @@ The latest Istio snapshot release is {{< istio_version >}} ([release notes](/abo
|
||||||
$ curl -L https://git.io/getLatestIstio | sh -
|
$ curl -L https://git.io/getLatestIstio | sh -
|
||||||
```
|
```
|
||||||
|
|
||||||
The most recent stable release is 0.8. You can [download 0.8](https://github.com/istio/istio/releases/tag/0.8) with:
|
The most recent stable release is 0.8. You can download 0.8 with:
|
||||||
|
|
||||||
```command
|
```command
|
||||||
$ curl -L https://git.io/getIstio | sh -
|
$ curl -L https://git.io/getIstio | sh -
|
||||||
|
|
|
@ -25,12 +25,12 @@ service.
|
||||||
$ istioctl create -f samples/bookinfo/kube/route-rule-reviews-v3.yaml
|
$ istioctl create -f samples/bookinfo/kube/route-rule-reviews-v3.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
> If you have conflicting rule that you set in previous tasks,
|
> If you have a conflicting rule that you set in previous tasks,
|
||||||
use `istioctl replace` instead of `istioctl create`.
|
use `istioctl replace` instead of `istioctl create`.
|
||||||
|
|
||||||
## Rate limits
|
## Rate limits
|
||||||
|
|
||||||
Istio enables users to rate limit traffic to a service.
|
Istio enables you to rate limit traffic to a service.
|
||||||
|
|
||||||
Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
`1qps` free quota. Using Istio we can ensure that `1qps` is not breached.
|
`1qps` free quota. Using Istio we can ensure that `1qps` is not breached.
|
||||||
|
@ -54,15 +54,13 @@ Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
```
|
```
|
||||||
|
|
||||||
The file looks like:
|
The file looks like:
|
||||||
{{< file_content url="https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/kube/mixer-rule-ratings-ratelimit.yaml" >}}
|
|
||||||
|
{{< file_content url="https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/kube/mixer-rule-ratings-ratelimit.yaml" lang="yaml" >}}
|
||||||
|
|
||||||
1. Confirm the `memquota` was created:
|
1. Confirm the `memquota` was created:
|
||||||
|
|
||||||
```command
|
```command-output-as-yaml
|
||||||
$ kubectl -n istio-system get memquota handler -o yaml
|
$ kubectl -n istio-system get memquota handler -o yaml
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: config.istio.io/v1alpha2
|
apiVersion: config.istio.io/v1alpha2
|
||||||
kind: memquota
|
kind: memquota
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -95,11 +93,8 @@ Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
|
|
||||||
1. Confirm the `quota` was created:
|
1. Confirm the `quota` was created:
|
||||||
|
|
||||||
```command
|
```command-output-as-yaml
|
||||||
$ kubectl -n istio-system get quotas requestcount -o yaml
|
$ kubectl -n istio-system get quotas requestcount -o yaml
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: config.istio.io/v1alpha2
|
apiVersion: config.istio.io/v1alpha2
|
||||||
kind: quota
|
kind: quota
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -122,11 +117,8 @@ Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
|
|
||||||
1. Confirm the `rule` was created:
|
1. Confirm the `rule` was created:
|
||||||
|
|
||||||
```command
|
```command-output-as-yaml
|
||||||
$ kubectl -n istio-system get rules quota -o yaml
|
$ kubectl -n istio-system get rules quota -o yaml
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: config.istio.io/v1alpha2
|
apiVersion: config.istio.io/v1alpha2
|
||||||
kind: rule
|
kind: rule
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -146,11 +138,8 @@ Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
|
|
||||||
1. Confirm the `QuotaSpec` was created:
|
1. Confirm the `QuotaSpec` was created:
|
||||||
|
|
||||||
```command
|
```command-output-as-yaml
|
||||||
$ kubectl -n istio-system get QuotaSpec request-count -o yaml
|
$ kubectl -n istio-system get QuotaSpec request-count -o yaml
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: config.istio.io/v1alpha2
|
apiVersion: config.istio.io/v1alpha2
|
||||||
kind: QuotaSpec
|
kind: QuotaSpec
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -168,11 +157,8 @@ Consider `ratings` as an external paid service like Rotten Tomatoes® with
|
||||||
|
|
||||||
1. Confirm the `QuotaSpecBinding` was created:
|
1. Confirm the `QuotaSpecBinding` was created:
|
||||||
|
|
||||||
```command
|
```command-output-as-yaml
|
||||||
$ kubectl -n istio-system get QuotaSpecBinding request-count -o yaml
|
$ kubectl -n istio-system get QuotaSpecBinding request-count -o yaml
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
kind: QuotaSpecBinding
|
kind: QuotaSpecBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: request-count
|
name: request-count
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
<div class="highlight">
|
<pre data-src="{{ .Get "url" }}"><code class="language-{{ .Get "lang" }}"></code></pre>
|
||||||
<pre data-src="{{ .Get "url" }}"><code></code></pre>
|
|
||||||
</div>
|
|
Loading…
Reference in New Issue