mirror of https://github.com/istio/istio.io.git
Add a lint check for incorrectly indented code blocks. (#1800)
Fixed a problem reported by the link check.
This commit is contained in:
parent
2006185024
commit
f4a0656ab1
|
@ -30,7 +30,7 @@ Istio 的 RBAC 引擎做了下面两件事:
|
||||||
|
|
||||||
### 请求上下文
|
### 请求上下文
|
||||||
|
|
||||||
在当前版本中,Istio RBAC 引擎被实现为一个 [Mixer 适配器](/docs/concepts/policies-and-telemetry/#adapter)。请求上下文则作为[授权模板](https://github.com/istio/istio/blob/master/mixer/template/authorization/template.proto)的实例。请求上下文包含请求和授权模块需要环境的所有信息。特别是两个部分:
|
在当前版本中,Istio RBAC 引擎被实现为一个 [Mixer 适配器](/docs/concepts/policies-and-telemetry/#adapters)。请求上下文则作为[授权模板](https://github.com/istio/istio/blob/master/mixer/template/authorization/template.proto)的实例。请求上下文包含请求和授权模块需要环境的所有信息。特别是两个部分:
|
||||||
|
|
||||||
* 主题 包含调用者标识的属性列表,包括`"user"` name/ID,主题属于`“group”`,或者关于主题的任意附加属性,比如命名空间、服务名称。
|
* 主题 包含调用者标识的属性列表,包括`"user"` name/ID,主题属于`“group”`,或者关于主题的任意附加属性,比如命名空间、服务名称。
|
||||||
|
|
||||||
|
|
|
@ -100,40 +100,40 @@ Istio 的故障注入规则可帮助您识别此类异常,而不会影响最
|
||||||
|
|
||||||
1. 为用户 “jason” 创建故障注入规则发送 HTTP 中止
|
1. 为用户 “jason” 创建故障注入规则发送 HTTP 中止
|
||||||
|
|
||||||
{{< text bash >}}
|
{{< text bash >}}
|
||||||
$ istioctl replace -f @samples/bookinfo/networking/virtual-service-ratings-test-abort.yaml@
|
$ istioctl replace -f @samples/bookinfo/networking/virtual-service-ratings-test-abort.yaml@
|
||||||
{{< /text >}}
|
{{< /text >}}
|
||||||
|
|
||||||
确认已创建规则
|
确认已创建规则
|
||||||
|
|
||||||
{{< text bash yaml >}}
|
{{< text bash yaml >}}
|
||||||
$ istioctl get virtualservice ratings -o yaml
|
$ istioctl get virtualservice ratings -o yaml
|
||||||
apiVersion: networking.istio.io/v1alpha3
|
apiVersion: networking.istio.io/v1alpha3
|
||||||
kind: VirtualService
|
kind: VirtualService
|
||||||
metadata:
|
metadata:
|
||||||
name: ratings
|
name: ratings
|
||||||
...
|
...
|
||||||
spec:
|
spec:
|
||||||
hosts:
|
hosts:
|
||||||
- ratings
|
- ratings
|
||||||
http:
|
http:
|
||||||
- fault:
|
- fault:
|
||||||
abort:
|
abort:
|
||||||
httpStatus: 500
|
httpStatus: 500
|
||||||
percent: 100
|
percent: 100
|
||||||
match:
|
match:
|
||||||
- headers:
|
- headers:
|
||||||
cookie:
|
cookie:
|
||||||
regex: ^(.*?;)?(user=jason)(;.*)?$
|
regex: ^(.*?;)?(user=jason)(;.*)?$
|
||||||
route:
|
route:
|
||||||
- destination:
|
- destination:
|
||||||
host: ratings
|
host: ratings
|
||||||
subset: v1
|
subset: v1
|
||||||
- route:
|
- route:
|
||||||
- destination:
|
- destination:
|
||||||
host: ratings
|
host: ratings
|
||||||
subset: v1
|
subset: v1
|
||||||
{{< /text >}}
|
{{< /text >}}
|
||||||
|
|
||||||
1. 观察应用程序行为
|
1. 观察应用程序行为
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,13 @@ check_content() {
|
||||||
check_content content --en-us
|
check_content content --en-us
|
||||||
check_content content_zh --zh-cn
|
check_content content_zh --zh-cn
|
||||||
|
|
||||||
|
grep -nr -e "ERROR: markdown" ./public
|
||||||
|
if [ "$?" == "0" ]
|
||||||
|
then
|
||||||
|
echo "Ensure text blocks are either not indented, or indented by a multiple of 4 spaces"
|
||||||
|
FAILED=1
|
||||||
|
fi
|
||||||
|
|
||||||
htmlproofer ./public --check-html --assume-extension --timeframe 2d --storage-dir .htmlproofer --url-ignore "/localhost/,/github.com/istio/istio.github.io/edit/master/,/github.com/istio/istio/issues/new/choose/"
|
htmlproofer ./public --check-html --assume-extension --timeframe 2d --storage-dir .htmlproofer --url-ignore "/localhost/,/github.com/istio/istio.github.io/edit/master/,/github.com/istio/istio/issues/new/choose/"
|
||||||
if [ "$?" != "0" ]
|
if [ "$?" != "0" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue